Our usual policy is that targetSDK should be -1 of the current version, and the various Google/AppCompat/AndroidX dependencies be kept around that vintage, but test and develop with an Example app that targets the latest.
The goal here is to be sure that we don't bring platform dependencies forward in customers' apps, who tend to lag at least a little bit.
SDK's Android API targetSDK is now 30.
The various Google/AndroidX/Jetpack dependencies are now 2020-vintage.
Example App recreated with Compose just because I couldn't be arsed to fix a problem with the Fragment UI.
Code changes to support API 30. Mostly dealing with @Nullable annotations changing quite a bit in the Android platform
Handle the infamous Android API 31/Android 12 Intent mutability flag issue.
Ripped out custom deployment hacks no longer needed now that maven-publish works natively with Android.
Ripped out Dokka/javadoc, which we don't use anyway.
Additionally, several changes specific to location, not just exclusive to Android 12:
Location module was only sending location updates when background location was enabled. So now foreground location monitoring has been added, and is always enabled when the location permission has been added.
Resolve an issue where location monitoring might not have begun immediately upon granting permission, and rather would have waited for next app restart.
Do not attempt to start background tracking on Android 12, which just fails due to Intent mutability errors with FusedLocationProvider and Android 12.
Modify example app to demonstrate requesting background location permission (even though this will not be accepted in most of our clients' app categories on Google Play as of April 2022)
Much needed platform updates.
Our usual policy is that
targetSDK
should be -1 of the current version, and the various Google/AppCompat/AndroidX dependencies be kept around that vintage, but test and develop with an Example app that targets the latest.The goal here is to be sure that we don't bring platform dependencies forward in customers' apps, who tend to lag at least a little bit.
@Nullable
annotations changing quite a bit in the Android platformmaven-publish
works natively with Android.Additionally, several changes specific to location, not just exclusive to Android 12: