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

RN v0.66.4 react-native-amap-geolocation v1.1.2 运行报错 AMapGeolocation.init 确保调用SDK任何接口前先调用更新隐私合规updatePrivacyShow、updatePrivacyAgree两个接口并且参数值都为true #144

Open
iscodeok opened this issue Jan 7, 2022 · 10 comments
Labels
android Only for android bug Something isn't working

Comments

@iscodeok
Copy link

iscodeok commented Jan 7, 2022

RN v0.66.4 react-native-amap-geolocation v1.1.2 运行报错 AMapGeolocation.init 确保调用SDK任何接口前先调用更新隐私合规updatePrivacyShow、updatePrivacyAgree两个接口并且参数值都为true

这两项参数没找到设置
updatePrivacyShow、updatePrivacyAgree

@iscodeok iscodeok added android Only for android bug Something isn't working labels Jan 7, 2022
@qiuxiang
Copy link
Owner

qiuxiang commented Jan 7, 2022

这个库挺久没更新了,我得找个时间

@iscodeok
Copy link
Author

iscodeok commented Jan 7, 2022

好的,谢谢大神

@chj-damon
Copy link

感谢大神!

@wenjianli92
Copy link

@qiuxiang 大神解决了吗?

@lixy01
Copy link

lixy01 commented Feb 18, 2022

@wenjianli92 你有用别的方案么

@zhoumi1324
Copy link

插个眼 求更新

@wenjianli92
Copy link

wenjianli92 commented Mar 1, 2022

@yu44303
最好原生集成,但自己原生不太懂,采用如下临时方案
react-native-get-location + 高德webAPI
获取GPS经纬度然后通过webAPI再转成高德经纬度
还是希望作者能及时更新啊
@qiuxiang

@jdl7758258
Copy link

我解决了android这个原生问题

@zch-123456
Copy link

我解决了android这个原生问题

老哥你这个问题怎么解决的呀,可以分享一下嘛

@jdl7758258
Copy link

@ReactMethod
public void init(String key, Promise promise) {
if (locationClient != null) {
locationClient.onDestroy();
}

    AMapLocationClient.setApiKey(key);
    try{
        locationClient = new AMapLocationClient(reactContext);
    }catch (Exception e){

    }
    AMapLocationClient.updatePrivacyShow(reactContext, true, true);
    AMapLocationClient.updatePrivacyAgree(reactContext, true);
    locationClient.setLocationListener(this);
    eventEmitter = reactContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class);
    promise.resolve(null);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Only for android bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants