mapbox / mapbox/mapbox-plugins-android
Add support for android 12
还没有人认领这个 Issue。
- 主要语言
- Java
- 星标
- 242
- 派生
- 116
- PR 合并指标
- 30 天内没有已合并 PR
描述
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)
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从第 31 行的 AlarmSchedulerFlusher.java 开始,堆栈跟踪显示 PendingIntent.getBroadcast 在 Android 12 上失败。针对报告的 API 要求更新 pending intent 标志的处理,然后运行相关的 Android telemetry 或 plugin 测试,并确认以 Android 12 为目标时初始化成功。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- android, java
- 领域
- mobile
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 45/100