aboutsummaryrefslogtreecommitdiffstats
path: root/android-mobile/src/org/subsurfacedivelog/mobile/SubsurfaceMobileActivity.java
AgeCommit message (Collapse)Author
2020-03-16android/usb: simply restart the download after receiving permissionGravatar Dirk Hohndel
If the user tries to download from a device that he hasn't given the app permission to read from, Android will pop up a dialogue asking for that permission. With this after giving the permission we continue (well, technically, restart) the download which is likely the expected behavior. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-16android/usb: show download page again after USB permission grantedGravatar Dirk Hohndel
If the user hadn't granted USB permissions, yet, we asynchronously get informed once they did that. This ensures that the user gets taken back to the download page once they approve. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-16android/usb: pass the usbDevice for intent handlingGravatar Dirk Hohndel
Instead of creating a string with all the object information, simply pass the actual object to the C++ code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-16usb-serial-for-android: React to usb "permit granted" intent (stub)Gravatar Christof Arnosti
When a user is downloading from a DC for the first time (without using the "usb device connected" popup), the user is requested to grant permission to use the USB device. This is done asynchronously, thus the download is aborted. To be more user-friendly, we now react to the intent with the "usb granted" result. The plan here is to start the download again. Signed-off-by: Christof Arnosti <charno@charno.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-07usb-serial-for-android: ImplementationGravatar Christof Arnosti
Implement the libdivecomputer API in Java and create C/JNI translation layer. [Dirk Hohndel: whitespace harmonization - yes, some of this is Java, this still makes it much easier to read for me; also changed the FTDI conditional compilation to make sure we can still use that for mobile-on-desktop if necessary] Signed-off-by: Christof Arnosti <charno@charno.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11Whitespace cleanup, extra braces, and null checksGravatar Dirk Hohndel
Thanks to Lubomir for the review. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11Android: fix function signature in java codeGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11Android: only handle Intents after the app is initializedGravatar Dirk Hohndel
The old code happened to work because this function only got called if the app was already running, but the correct thing to do is to always wait until we have first called back from C++ code, indicating that the app is indeed fully initialized. This way we only process the Intent in one place in the Java code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11Android: add callback from IntentGravatar Dirk Hohndel
Right now all this does is add the device string to the log. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11Android: add Java class to receive IntentsGravatar Dirk Hohndel
We want to be able to respond to a USB device being plugged in. This simply logs the information we get from the device. Sadly the really useful getProductName and getManufacturerName require API level 21 (so Android 5.0 or newer) and we still have a couple hundred users on 4.1-4.4. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>