Closed Lauszus closed 11 years ago
You are welcome :)
I briefly looked into adding onPermissionAllowed/onPermissionDenied callback methods, as we discussed here: https://github.com/ksksue/PhysicaloidLibrary/pull/3#issuecomment-24555328, but I couldn't get it working. Did you ever look into it?
Also is it possible to cancel a upload? Right now when a user try to close my app it will simply wait until the upload is completed and then close the app.
Can't you solve the permission problem by listing a USB VID on the device-filter.xml? http://stackoverflow.com/questions/15255524/android-usb-device-permission-and-intent-filter
Canceling a upload is not supported now but I'll try to implement.
I tried that already: https://github.com/TKJElectronics/BalanduinoAndroidApp/commit/7a227d06b843312b48e4789eddbf9ffd8bf4d5bc, but it doesn't work, as it will then open a instance of the app on top of the previous one if you plug in the board to the USB host port. There is the same problem when using it with a USB accessory (I use both in my app). Maybe I should fill in a bug report: https://code.google.com/p/android/issues/list?
Okay thanks!
I have done the solution on stackoverflow, it seems OK. It doesn't popup the permission dialog again. https://github.com/ksksue/Android-USB-Serial-Monitor-Lite (It's newest version. Google Play's apk is still old version.)
You misunderstood me. The problem is that when you plug the board in and out it will reopen the app even if it's already running.
You mean running double application? You might set this in AndroidManifest.xml android:launchMode="singleTask"
It should be written on "activity" tag option in AndroidManifest.xml
I do that already: https://github.com/TKJElectronics/BalanduinoAndroidApp/blob/master/AndroidManifest.xml#L2.
I actually just tried it one more time and it looks like it must have been related to something else. Thanks anyway!
"manifest" has no android:launchMode option. http://developer.android.com/guide/topics/manifest/manifest-element.html It should be written on "activity" option. http://developer.android.com/guide/topics/manifest/activity-element.html
Thank you! That is properly why I had problems!
You are welcome.
I implemented cancel() and onCancel() callback methods.
Thank you!
Would you be able to implement isUploading as well? It is pretty easy for me to keep track of it. See: https://github.com/TKJElectronics/BalanduinoAndroidApp/blob/master/flavors/usb/src/com/tkjelectronics/balanduino/Upload.java#L59, but I think it would be great to have as part of the library instead.
It's a good method. Thanks.