question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Scanner broken when targeting Android 12+

See original GitHub issue

This looks to be preventing us from targeting 12 at the moment.

 java.lang.IllegalArgumentException: co.dance.rider: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
    Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
        at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
        at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:645)
        at android.app.PendingIntent.getBroadcast(PendingIntent.java:632)
        at no.nordicsemi.android.support.v18.scanner.BluetoothLeScannerImplOreo.createStartingPendingIntent(BluetoothLeScannerImplOreo.java:171)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
roumcommented, Sep 30, 2021

@philips77 I’ve been testing the changes in #108 on our fork, and though it does prevent fatal crashes on Android 12+ caused by the mutability flag not being explicitly set, it now prevents scan results from being received in PendingIntentReceiver (i.e. the intent received has no extras). This tells me that the correct flag there may be FLAG_MUTABLE, which can only be used if the project targets API 31 which it currently doesn’t.

This issue may need to be reopened, and hopefully inspire a deeper look into how the project can safely target 31.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Behavior changes: Apps targeting Android 12
Learn about changes in Android 12 that will affect apps when they target ... Android 12 makes all notifications visually consistent and easy...
Read more >
When I install my application again then show Apps targeting ...
Since your application is targeting Android 12, please take a look at your AndroidManifest.xml and make sure to add this android:exported .
Read more >
BM83SM1-00AB : fail to retrieve ble services on Android 12
Hello, From Android 12 phones, we can not retrieve the BLE services of the BLE device (which use BM83). We can scan and...
Read more >
Use of All files access (MANAGE_EXTERNAL_STORAGE ...
This is only applicable to apps that target Android 11 (API level 30) and ... Without this core functionality, the app is "broken"...
Read more >
Bug - Android 12 App crashes on startup due to error with ...
My unity project uses Google Ad Mob Unity Plugin v6.1.2 which is the latest version. Target api level is 31. The game runs...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found