mapbox / mapbox/mapbox-plugins-android
Add support for android 12
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 242
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
Description
Need to change pending intent flag
2022-03-16 14:04:48.410 11177-11177/com.sellnu.frekis E/Mbgl-Mapbox: Error occurred while initializing telemetry
java.lang.IllegalArgumentException: com.sellnu.frekis: 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 com.mapbox.android.telemetry.AlarmSchedulerFlusher.register(AlarmSchedulerFlusher.java:31)
at com.mapbox.android.telemetry.MapboxTelemetry.startAlarm(MapboxTelemetry.java:375)
at com.mapbox.android.telemetry.MapboxTelemetry.startTelemetry(MapboxTelemetry.java:369)
at com.mapbox.android.telemetry.MapboxTelemetry.enable(MapboxTelemetry.java:113)
at com.mapbox.mapboxsdk.module.telemetry.TelemetryImpl.(TelemetryImpl.java:33)
at com.mapbox.mapboxsdk.ModuleProviderImpl.obtainTelemetry(ModuleProviderImpl.java:22)
at com.mapbox.mapboxsdk.Mapbox.initializeTelemetry(Mapbox.java:167)
at com.mapbox.mapboxsdk.Mapbox.getInstance(Mapbox.java:64)
at com.sellnu.frekis.mapbox.MapBoxManager.(MapBoxManager.java:35)
at com.sellnu.frekis.mapbox.MapBoxManager.init(MapBoxManager.java:40)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with AlarmSchedulerFlusher.java at line 31, where the stack trace shows PendingIntent.getBroadcast failing on Android 12. Update the pending-intent flag handling for the reported API requirement, then run the relevant Android telemetry or plugin tests and confirm initialization succeeds when targeting Android 12.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100