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>
Builds were failing because gradle tried to download libraries from
bintray. JCenter is shutting down in a few weeks.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Builds started to fail because v2.2.2 (about 18 months old) couldn't be
found anymore. That issue seems to have been fixed, but it was a good
reminder not to get completely disconnected from upstream here.
This switches things to the currently latest version of the Android USB
library (which coincidentally will also provide support for additional
USB-serial chipset - not that I think that any dive computers will
benefit from that).
Some of the interfaces changed in the upstream Java library and our code
had to be adjusted to accomodate this.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Using more recent versions of the Android NDK results in a build failure
saying something like "No toolchains found in the NDK toolchains folder
for ABI with prefix: mips64el-linux-android". Mips support went away
after Android NDK, Revision r17c, and we are using r18b at this moment.
Too old Gradle stuff gets confused by this.
The solution is simple. Use a newer version of the Gradle plugin.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
At this point in time there seems something wrong with jcenter that
is used to download all Android build artifacts from. It simply does
not find the needed stuff on there and our build fails. Its unclear
if this is a temporary issue at jcenter, or its just an intended change.
This fix is a bit of a hack. It provides our own gradle build spec
instead of the one that is provided from Qt (which is pulled in using
androiddeployqt). Added is a working download link to maven, and a
newer com.android.tools.build:gradle is used compared to Qt.
All this makes Travis happy again.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>