Commit 5fa27d5acc4751aa93f252848f1d8dbdc2256931

Authored by 张志伟
1 parent 35b2484b

🚚 chore(*): 更新sdk返回模拟定位相关方法

lib/android/src/main/java/cn/feewee/amap3d/modules/AMapGeolocationModule.java
... ... @@ -297,6 +297,14 @@ public class AMapGeolocationModule extends ReactContextBaseJavaModule implements
297 297 map.putString("deviceId", AMapLocationClient.getDeviceId(reactContext));
298 298 map.putString("sdkVersion", client.getVersion());
299 299 map.putString("locationDetail", location.getLocationDetail());
  300 + AMapLocation lastKnownLocation = client.getLastKnownLocation();
  301 + if (lastKnownLocation != null) {
  302 + if (lastKnownLocation.getLocationQualityReport() != null) {
  303 + boolean isInstalledHighDangerMockApp = lastKnownLocation.getLocationQualityReport().isInstalledHighDangerMockApp();
  304 + map.putBoolean("isInstalledHighDangerMockApp", isInstalledHighDangerMockApp);
  305 + }
  306 + }
  307 + map.putBoolean("isMock", location.isMock());
300 308 if (location.getErrorCode() == AMapLocation.LOCATION_SUCCESS) {
301 309 map.putDouble("timestamp", location.getTime());
302 310 map.putDouble("accuracy", location.getAccuracy());
... ...