diff --git a/lib/android/src/main/java/cn/feewee/amap3d/modules/AMapGeolocationModule.java b/lib/android/src/main/java/cn/feewee/amap3d/modules/AMapGeolocationModule.java index 5d80545..7727b57 100644 --- a/lib/android/src/main/java/cn/feewee/amap3d/modules/AMapGeolocationModule.java +++ b/lib/android/src/main/java/cn/feewee/amap3d/modules/AMapGeolocationModule.java @@ -7,6 +7,7 @@ import com.amap.api.location.AMapLocationListener; import com.amap.api.services.core.AMapException; import com.amap.api.services.core.LatLonPoint; import com.amap.api.services.core.PoiItemV2; +import com.amap.api.services.core.ServiceSettings; import com.amap.api.services.geocoder.GeocodeSearch; import com.amap.api.services.geocoder.RegeocodeAddress; import com.amap.api.services.geocoder.RegeocodeQuery; @@ -64,6 +65,8 @@ public class AMapGeolocationModule extends ReactContextBaseJavaModule implements AMapLocationClient.setApiKey(key); AMapLocationClient.updatePrivacyShow(reactContext, true, true); AMapLocationClient.updatePrivacyAgree(reactContext, true); + ServiceSettings.updatePrivacyShow(reactContext,true,true); + ServiceSettings.updatePrivacyAgree(reactContext,true); client = new AMapLocationClient(reactContext); geocodeSearch = new GeocodeSearch(reactContext); client.setLocationListener(this); diff --git a/package.json b/package.json index 6d965cc..e00d6a0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cqfw/react-native-amap3d", - "version": "0.2.3", + "version": "0.2.4", "description": "react-native 高德地图组件,支持 Android + iOS", "author": "feewee", "license": "MIT",