Android's sandbox makes us jump through hoops in order to share files
with other apps. We need to declare a file provider and use specific
paths where the files are located.
Then we have java code (I couldn't make it work as JNI) that takes the
filenames and creates content:// URIs for them and then hands those off
to a sharing activity that is provided by Android.
This can then be used to create attachments for support emails, or to
share the log files with other apps - both of which will solve the
annoying maximum log file length that we have with using the binder to
add the log file text to the message body.
This also finally replaces the 'compile' directive in build.gradle with
'implementation' - removing a warning that we've had for ages.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
On Android devices that no longer get updates to the system installed
SSL root certificates, the user can easily install the updated Let's
Encrypt root certificate, but that is only used by Subsurface-mobile if
we explicitly allow the use of those user installed root certificates.
Fixes#3335
Suggested-by: Greg Hunter
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The HID devices and the Atomics Aquatics Cobalt cannot work on Android
right now. We should claim to support them.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I'm not sure this is actually relevant for anything any more, but this
adds the USB device ID's for the Scubapro G2 Console and HUD versions.
It also fixes things to use the proper vendor name (a bit too much
cut-and-paste, where the code said "Suunto" instead of "Scubapro").
The real device ID changes are in libdivecomputer, this is just the
Android xml list for recognized USB devices that likely nobody really
uses.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This way plugging in a Cobalt should pop up a question if the
user wants to open Subsurface-mobile.
Unfortunately, this, too, fails on my Android devices, so I can't test
it.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This way plugging in an EON Steel should pop up a question if the
user wants to open Subsurface-mobile. Unfortunately, the download
doesn't work, yet, and worse, if the phone goes to sleep while an
EON Steel is plugged in, this appears to trigger a hard crash on
the EON Steel.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>