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

fix:[Android] Fix amap crash and adapt amap privacy compliance interface #946

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jaydroid1024
Copy link

@jaydroid1024 jaydroid1024 commented Nov 16, 2021

高德地图相关sdk升级到最新版本(>= v8.1.0)后需要强制添加隐私合规接口否则会导致崩溃
文档地址:https://lbs.amap.com/api/android-navi-sdk/guide/create-project/configuration-considerations#t3
Dokit 中涉及到的地方

  1. app/高德路径规划
  2. dokit/实时导航悬浮窗

关于适配高德地图sdk隐私合规的代码改动

添加了三个module

  • dokit-amap-api:抹平不同版本api调用的差异

  • dokit-amap-no-privacy::高德地图sdk增加隐私合规接口之前版本的一些操作

  • dokit-amap-with-privacy::高德地图sdk增加隐私合规接口之后版本的一些操作

  • 发布脚本更新

添加版本比较工具类

  • dokit-util 添加 VersionUtils.kt

  • 添加 VersionUtils 以及对应的单元测试类VersionUtilsTest.kt

  • dokit-util 添加 Kotlin 相关配置

dokit 组件的更新

  • 依赖 dokit-amap-api 替换 AMapNavi 实例的获取方式

演示 Demo 更新

  • 测试 dokit 对不同 amap 版本的兼容性
  • 依赖 dokit-amap-api 替换 AMapNavi 实例的获取方式

@ChasonTang ChasonTang added the bug Something isn't working label Nov 17, 2021
Copy link
Contributor

@alvince alvince left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bad modification

… differences in API calls of different amap sdk versions

2. Add VersionUtils  class in dokit_util lib
3. Dokit lib update for amap privacy
4. Demo app update for amap privacy
2. Remove unnecessary modify
@jaydroid1024
Copy link
Author

@alvince
I have revised your comments
I added more code for adapting to lower amap versions
Please review the code again
cc @jtsky @ChasonTang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Platform: Android todo 接下来要做的事情
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants