We're updating our Unity app to support Android 12, and updated Airship unity plugin to 9.0.0, from 8.1.0 previously.
Upon launching, the following exception appears in Logcat:
UALib : Unable to get pending intent.
UALib : java.lang.IllegalArgumentException: com.(removed): Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
UALib : 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.
UALib : at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
UALib : at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:645)
UALib : at android.app.PendingIntent.getBroadcast(PendingIntent.java:632)
UALib : at com.urbanairship.location.UALocationProvider.getPendingIntent(UALocationProvider.java:223)
UALib : at com.urbanairship.location.UALocationProvider.areUpdatesRequested(UALocationProvider.java:211)
UALib : at com.urbanairship.location.AirshipLocationManager$7.run(AirshipLocationManager.java:379)
UALib : at android.os.Handler.handleCallback(Handler.java:938)
UALib : at android.os.Handler.dispatchMessage(Handler.java:99)
UALib : at android.os.Looper.loopOnce(Looper.java:201)
UALib : at android.os.Looper.loop(Looper.java:288)
UALib : at android.os.HandlerThread.run(HandlerThread.java:67)
UALib : at com.urbanairship.util.AirshipHandlerThread.run(AirshipHandlerThread.java:29)
However, according to the release notes, the Location module was removed. It is still present in the Android Plugin according to Git.
The same error was present with plugin version 8.1.0 .
The app does not crash, but I haven't yet confirmed that this exception will not cause issues later on, or prevent Airship from working properly.
Has anyone else experienced this on an Android 12 device, targetting API 31 or newer (android 12) ?
Please shed some light on this mystery.
Additional info:
Unity 2020.3.13f1
Target Android API 31
Device : Google Pixel 3a XL, Android 12
Comments
1 comment