bump targetSdkVersion to 31
Here's what needs to be reviewed and potentially fixed to bump targetSdkVersion to the 31 (this has been partially covered by the basic work:
-
If your app targets Android 12 or higher and contains activities, services, or broadcast receivers that use intent filters, you must explicitly declare the android:exported attribute for these app components. https://developer.android.com/about/versions/12/behavior-changes-12#exported -
specify the mutability of each PendingIntent
object that your app creates https://developer.android.com/about/versions/12/behavior-changes-12#pending-intent-mutability -
Apps that target Android 12 or higher can't start foreground services while running in the background, https://developer.android.com/about/versions/12/behavior-changes-12#foreground-service-launch-restrictions -
Port SDCardScannerService
to WorkManager or maybeJobIntentService
https://developer.android.com/reference/android/app/Service#startForeground(int,%20android.app.Notification)
-
-
Apps can't start activities from services or broadcast receivers that are used as notification trampolines. In other words, after the user taps on a notification, or an action button within the notification, your app cannot call startActivity() inside of a service or broadcast receiver. https://developer.android.com/about/versions/12/behavior-changes-12#notification-trampolines -
Switch to BLUETOOTH_SCAN, BLUETOOTH_ADVERTISE, and BLUETOOTH_CONNECT permissions https://developer.android.com/about/versions/12/behavior-changes-12#bluetooth-permissions https://developer.android.com/develop/connectivity/bluetooth/bt-permissions -
Check updated non-SDK restrictions https://developer.android.com/about/versions/12/behavior-changes-12#non-sdk-restrictions