Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration to Android 12 #114

Merged
merged 6 commits into from
Oct 6, 2021
Merged

Migration to Android 12 #114

merged 6 commits into from
Oct 6, 2021

Conversation

philips77
Copy link
Member

@philips77 philips77 commented Oct 6, 2021

This PR raises the targetSdkVersion to 31 and fixes issues caused by that:

  • Adds PendingIntent.MUTABLE flag to PendingIntent. This is required for scanning to work, otherwise the results cannot be delivered. (Scanner broken when targeting Android 12+ #106)
  • Sets maxSdkVersion to 30 for BLUETOOTH and BLUETOOT_ADMIN permissions.
  • Adds new BLUETOOT_SCAN permission (more).
  • Removes ACCESS_FINE_LOCATION as no longer required from Android 12. If your app depends on this permission, make sure you add it in your Android Manifest file.
  • Fixes comments
  • Removes @RequiredPermission annotation from startScan and stopScan methods, as the required permission now depends on the Android version. Native API fixed this issue by adding new annotations, but they are hidden and lint shows errors.

@philips77 philips77 merged commit 120cc5e into master Oct 6, 2021
@philips77 philips77 deleted the android12 branch October 6, 2021 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant