diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 2c9f3703ae..e3b9eb3207 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -4,6 +4,7 @@
-
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 707ee6e613..2dc54c489f 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/config.gradle b/config.gradle
index 09aca032e8..a5ef0623ff 100644
--- a/config.gradle
+++ b/config.gradle
@@ -84,6 +84,7 @@ ext {
mogocommons : "com.mogo.commons:mogo-commons:${MOGO_COMMONS_VERSION}",
mogoutils : "com.mogo.commons:mogo-utils:${MOGO_UTILS_VERSION}",
mapamap : "com.mogo.map:map-amap:${MAP_AMAP_VERSION}",
+ mapautomap : "com.mogo.map:map-autonavi:${MAP_AUTONAVI_VERSION}",
mogomap : "com.mogo.map:mogo-map:${MOGO_MAP_VERSION}",
mogomapapi : "com.mogo.map:mogo-map-api:${MOGO_MAP_API_VERSION}",
modulecommon : "com.mogo.module:module-common:${MOGO_MODULE_COMMON_VERSION}",
diff --git a/foudations/mogo-commons/src/main/java/com/mogo/commons/debug/DebugConfig.java b/foudations/mogo-commons/src/main/java/com/mogo/commons/debug/DebugConfig.java
index 060789b43f..2768a0fc7d 100644
--- a/foudations/mogo-commons/src/main/java/com/mogo/commons/debug/DebugConfig.java
+++ b/foudations/mogo-commons/src/main/java/com/mogo/commons/debug/DebugConfig.java
@@ -73,4 +73,17 @@ public class DebugConfig {
public static void setNetMode( int netMode ) {
DebugConfig.sNetMode = netMode;
}
+
+ /**
+ * 是否拉起位置服务
+ */
+ private static boolean sLaunchLocationService = true;
+
+ public static boolean isLaunchLocationService() {
+ return sLaunchLocationService;
+ }
+
+ public static void setLaunchLocationService( boolean launchLocationService ) {
+ DebugConfig.sLaunchLocationService = launchLocationService;
+ }
}
diff --git a/foudations/mogo-commons/src/main/res/values-ldpi/dimens.xml b/foudations/mogo-commons/src/main/res/values-ldpi/dimens.xml
deleted file mode 100644
index 54534fb37b..0000000000
--- a/foudations/mogo-commons/src/main/res/values-ldpi/dimens.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
- 30px
- 30px
- 16px
- 16px
- 22px
- 371px
- 500px
- 72px
-
\ No newline at end of file
diff --git a/foudations/mogo-commons/src/main/res/values/dimens.xml b/foudations/mogo-commons/src/main/res/values/dimens.xml
index c1558d9ba0..54534fb37b 100644
--- a/foudations/mogo-commons/src/main/res/values/dimens.xml
+++ b/foudations/mogo-commons/src/main/res/values/dimens.xml
@@ -1,13 +1,11 @@
- 50px
- 50px
- 32px
- 32px
- 40px
- 698px
- 900px
- 130px
-
-
-
+ 30px
+ 30px
+ 16px
+ 16px
+ 22px
+ 371px
+ 500px
+ 72px
+
\ No newline at end of file
diff --git a/foudations/mogo-utils/src/main/java/com/mogo/utils/AppUtils.java b/foudations/mogo-utils/src/main/java/com/mogo/utils/AppUtils.java
index 85b659db4c..cce182c8b2 100644
--- a/foudations/mogo-utils/src/main/java/com/mogo/utils/AppUtils.java
+++ b/foudations/mogo-utils/src/main/java/com/mogo/utils/AppUtils.java
@@ -3,6 +3,9 @@ package com.mogo.utils;
import android.app.ActivityManager;
import android.content.ComponentName;
import android.content.Context;
+import android.content.pm.PackageInfo;
+import android.content.pm.PackageManager;
+import android.text.TextUtils;
import java.util.List;
@@ -25,4 +28,22 @@ public class AppUtils {
}
return false;
}
+
+ public static boolean isAppInstalled( Context context, String pkg ) {
+ PackageInfo packageInfo;
+ if ( TextUtils.isEmpty( pkg ) ) {
+ return false;
+ }
+ try {
+ packageInfo = context.getPackageManager().getPackageInfo( pkg, 0 );
+ } catch ( PackageManager.NameNotFoundException e ) {
+ packageInfo = null;
+ e.printStackTrace();
+ }
+ if ( packageInfo == null ) {
+ return false;
+ } else {
+ return true;
+ }
+ }
}
diff --git a/gradle.properties b/gradle.properties
index c44c657668..f2f0479cb7 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -30,6 +30,7 @@ RELEASE=false
MOGO_COMMONS_VERSION=1.1.0.15
MOGO_UTILS_VERSION=1.1.0.15
MAP_AMAP_VERSION=1.1.0.15
+MAP_AUTONAVI_VERSION=1.1.0.15
MOGO_MAP_VERSION=1.1.0.15
MOGO_MAP_API_VERSION=1.1.0.15
MOGO_SERVICE_VERSION=1.1.0.15
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_1.png b/libraries/map-amap/src/main/res/drawable/ic_1.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_1.png
rename to libraries/map-amap/src/main/res/drawable/ic_1.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_10.png b/libraries/map-amap/src/main/res/drawable/ic_10.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_10.png
rename to libraries/map-amap/src/main/res/drawable/ic_10.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_11.png b/libraries/map-amap/src/main/res/drawable/ic_11.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_11.png
rename to libraries/map-amap/src/main/res/drawable/ic_11.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_12.png b/libraries/map-amap/src/main/res/drawable/ic_12.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_12.png
rename to libraries/map-amap/src/main/res/drawable/ic_12.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_13.png b/libraries/map-amap/src/main/res/drawable/ic_13.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_13.png
rename to libraries/map-amap/src/main/res/drawable/ic_13.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_14.png b/libraries/map-amap/src/main/res/drawable/ic_14.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_14.png
rename to libraries/map-amap/src/main/res/drawable/ic_14.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_15.png b/libraries/map-amap/src/main/res/drawable/ic_15.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_15.png
rename to libraries/map-amap/src/main/res/drawable/ic_15.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_16.png b/libraries/map-amap/src/main/res/drawable/ic_16.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_16.png
rename to libraries/map-amap/src/main/res/drawable/ic_16.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_17.png b/libraries/map-amap/src/main/res/drawable/ic_17.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_17.png
rename to libraries/map-amap/src/main/res/drawable/ic_17.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_18.png b/libraries/map-amap/src/main/res/drawable/ic_18.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_18.png
rename to libraries/map-amap/src/main/res/drawable/ic_18.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_19.png b/libraries/map-amap/src/main/res/drawable/ic_19.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_19.png
rename to libraries/map-amap/src/main/res/drawable/ic_19.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_2.png b/libraries/map-amap/src/main/res/drawable/ic_2.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_2.png
rename to libraries/map-amap/src/main/res/drawable/ic_2.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_20.png b/libraries/map-amap/src/main/res/drawable/ic_20.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_20.png
rename to libraries/map-amap/src/main/res/drawable/ic_20.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_21.png b/libraries/map-amap/src/main/res/drawable/ic_21.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_21.png
rename to libraries/map-amap/src/main/res/drawable/ic_21.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_22.png b/libraries/map-amap/src/main/res/drawable/ic_22.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_22.png
rename to libraries/map-amap/src/main/res/drawable/ic_22.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_23.png b/libraries/map-amap/src/main/res/drawable/ic_23.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_23.png
rename to libraries/map-amap/src/main/res/drawable/ic_23.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_24.png b/libraries/map-amap/src/main/res/drawable/ic_24.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_24.png
rename to libraries/map-amap/src/main/res/drawable/ic_24.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_25.png b/libraries/map-amap/src/main/res/drawable/ic_25.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_25.png
rename to libraries/map-amap/src/main/res/drawable/ic_25.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_26.png b/libraries/map-amap/src/main/res/drawable/ic_26.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_26.png
rename to libraries/map-amap/src/main/res/drawable/ic_26.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_27.png b/libraries/map-amap/src/main/res/drawable/ic_27.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_27.png
rename to libraries/map-amap/src/main/res/drawable/ic_27.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_28.png b/libraries/map-amap/src/main/res/drawable/ic_28.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_28.png
rename to libraries/map-amap/src/main/res/drawable/ic_28.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_4.png b/libraries/map-amap/src/main/res/drawable/ic_4.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_4.png
rename to libraries/map-amap/src/main/res/drawable/ic_4.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_5.png b/libraries/map-amap/src/main/res/drawable/ic_5.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_5.png
rename to libraries/map-amap/src/main/res/drawable/ic_5.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_50.png b/libraries/map-amap/src/main/res/drawable/ic_50.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_50.png
rename to libraries/map-amap/src/main/res/drawable/ic_50.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_51.png b/libraries/map-amap/src/main/res/drawable/ic_51.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_51.png
rename to libraries/map-amap/src/main/res/drawable/ic_51.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_52.png b/libraries/map-amap/src/main/res/drawable/ic_52.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_52.png
rename to libraries/map-amap/src/main/res/drawable/ic_52.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_53.png b/libraries/map-amap/src/main/res/drawable/ic_53.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_53.png
rename to libraries/map-amap/src/main/res/drawable/ic_53.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_54.png b/libraries/map-amap/src/main/res/drawable/ic_54.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_54.png
rename to libraries/map-amap/src/main/res/drawable/ic_54.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_55.png b/libraries/map-amap/src/main/res/drawable/ic_55.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_55.png
rename to libraries/map-amap/src/main/res/drawable/ic_55.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_56.png b/libraries/map-amap/src/main/res/drawable/ic_56.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_56.png
rename to libraries/map-amap/src/main/res/drawable/ic_56.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_57.png b/libraries/map-amap/src/main/res/drawable/ic_57.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_57.png
rename to libraries/map-amap/src/main/res/drawable/ic_57.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_58.png b/libraries/map-amap/src/main/res/drawable/ic_58.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_58.png
rename to libraries/map-amap/src/main/res/drawable/ic_58.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_59.png b/libraries/map-amap/src/main/res/drawable/ic_59.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_59.png
rename to libraries/map-amap/src/main/res/drawable/ic_59.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_6.png b/libraries/map-amap/src/main/res/drawable/ic_6.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_6.png
rename to libraries/map-amap/src/main/res/drawable/ic_6.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_60.png b/libraries/map-amap/src/main/res/drawable/ic_60.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_60.png
rename to libraries/map-amap/src/main/res/drawable/ic_60.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_61.png b/libraries/map-amap/src/main/res/drawable/ic_61.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_61.png
rename to libraries/map-amap/src/main/res/drawable/ic_61.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_62.png b/libraries/map-amap/src/main/res/drawable/ic_62.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_62.png
rename to libraries/map-amap/src/main/res/drawable/ic_62.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_63.png b/libraries/map-amap/src/main/res/drawable/ic_63.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_63.png
rename to libraries/map-amap/src/main/res/drawable/ic_63.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_64.png b/libraries/map-amap/src/main/res/drawable/ic_64.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_64.png
rename to libraries/map-amap/src/main/res/drawable/ic_64.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_65.png b/libraries/map-amap/src/main/res/drawable/ic_65.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_65.png
rename to libraries/map-amap/src/main/res/drawable/ic_65.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_66.png b/libraries/map-amap/src/main/res/drawable/ic_66.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_66.png
rename to libraries/map-amap/src/main/res/drawable/ic_66.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_67.png b/libraries/map-amap/src/main/res/drawable/ic_67.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_67.png
rename to libraries/map-amap/src/main/res/drawable/ic_67.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_68.png b/libraries/map-amap/src/main/res/drawable/ic_68.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_68.png
rename to libraries/map-amap/src/main/res/drawable/ic_68.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_69.png b/libraries/map-amap/src/main/res/drawable/ic_69.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_69.png
rename to libraries/map-amap/src/main/res/drawable/ic_69.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_7.png b/libraries/map-amap/src/main/res/drawable/ic_7.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_7.png
rename to libraries/map-amap/src/main/res/drawable/ic_7.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_8.png b/libraries/map-amap/src/main/res/drawable/ic_8.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_8.png
rename to libraries/map-amap/src/main/res/drawable/ic_8.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_9.png b/libraries/map-amap/src/main/res/drawable/ic_9.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_9.png
rename to libraries/map-amap/src/main/res/drawable/ic_9.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/ic_endpoint.png b/libraries/map-amap/src/main/res/drawable/ic_endpoint.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/ic_endpoint.png
rename to libraries/map-amap/src/main/res/drawable/ic_endpoint.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_10.png b/libraries/map-amap/src/main/res/drawable/tc_10.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_10.png
rename to libraries/map-amap/src/main/res/drawable/tc_10.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_11.png b/libraries/map-amap/src/main/res/drawable/tc_11.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_11.png
rename to libraries/map-amap/src/main/res/drawable/tc_11.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_12.png b/libraries/map-amap/src/main/res/drawable/tc_12.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_12.png
rename to libraries/map-amap/src/main/res/drawable/tc_12.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_13.png b/libraries/map-amap/src/main/res/drawable/tc_13.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_13.png
rename to libraries/map-amap/src/main/res/drawable/tc_13.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_14.png b/libraries/map-amap/src/main/res/drawable/tc_14.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_14.png
rename to libraries/map-amap/src/main/res/drawable/tc_14.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_15.png b/libraries/map-amap/src/main/res/drawable/tc_15.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_15.png
rename to libraries/map-amap/src/main/res/drawable/tc_15.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_16.png b/libraries/map-amap/src/main/res/drawable/tc_16.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_16.png
rename to libraries/map-amap/src/main/res/drawable/tc_16.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_17.png b/libraries/map-amap/src/main/res/drawable/tc_17.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_17.png
rename to libraries/map-amap/src/main/res/drawable/tc_17.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_20.png b/libraries/map-amap/src/main/res/drawable/tc_20.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_20.png
rename to libraries/map-amap/src/main/res/drawable/tc_20.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_21.png b/libraries/map-amap/src/main/res/drawable/tc_21.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_21.png
rename to libraries/map-amap/src/main/res/drawable/tc_21.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_22.png b/libraries/map-amap/src/main/res/drawable/tc_22.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_22.png
rename to libraries/map-amap/src/main/res/drawable/tc_22.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_23.png b/libraries/map-amap/src/main/res/drawable/tc_23.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_23.png
rename to libraries/map-amap/src/main/res/drawable/tc_23.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_24.png b/libraries/map-amap/src/main/res/drawable/tc_24.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_24.png
rename to libraries/map-amap/src/main/res/drawable/tc_24.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_25.png b/libraries/map-amap/src/main/res/drawable/tc_25.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_25.png
rename to libraries/map-amap/src/main/res/drawable/tc_25.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_26.png b/libraries/map-amap/src/main/res/drawable/tc_26.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_26.png
rename to libraries/map-amap/src/main/res/drawable/tc_26.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_27.png b/libraries/map-amap/src/main/res/drawable/tc_27.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_27.png
rename to libraries/map-amap/src/main/res/drawable/tc_27.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_28.png b/libraries/map-amap/src/main/res/drawable/tc_28.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_28.png
rename to libraries/map-amap/src/main/res/drawable/tc_28.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_30.png b/libraries/map-amap/src/main/res/drawable/tc_30.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_30.png
rename to libraries/map-amap/src/main/res/drawable/tc_30.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_31.png b/libraries/map-amap/src/main/res/drawable/tc_31.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_31.png
rename to libraries/map-amap/src/main/res/drawable/tc_31.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_32.png b/libraries/map-amap/src/main/res/drawable/tc_32.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_32.png
rename to libraries/map-amap/src/main/res/drawable/tc_32.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_33.png b/libraries/map-amap/src/main/res/drawable/tc_33.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_33.png
rename to libraries/map-amap/src/main/res/drawable/tc_33.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_34.png b/libraries/map-amap/src/main/res/drawable/tc_34.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_34.png
rename to libraries/map-amap/src/main/res/drawable/tc_34.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_35.png b/libraries/map-amap/src/main/res/drawable/tc_35.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_35.png
rename to libraries/map-amap/src/main/res/drawable/tc_35.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_36.png b/libraries/map-amap/src/main/res/drawable/tc_36.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_36.png
rename to libraries/map-amap/src/main/res/drawable/tc_36.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_37.png b/libraries/map-amap/src/main/res/drawable/tc_37.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_37.png
rename to libraries/map-amap/src/main/res/drawable/tc_37.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_38.png b/libraries/map-amap/src/main/res/drawable/tc_38.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_38.png
rename to libraries/map-amap/src/main/res/drawable/tc_38.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_39.png b/libraries/map-amap/src/main/res/drawable/tc_39.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_39.png
rename to libraries/map-amap/src/main/res/drawable/tc_39.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_40.png b/libraries/map-amap/src/main/res/drawable/tc_40.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_40.png
rename to libraries/map-amap/src/main/res/drawable/tc_40.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_41.png b/libraries/map-amap/src/main/res/drawable/tc_41.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_41.png
rename to libraries/map-amap/src/main/res/drawable/tc_41.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_42.png b/libraries/map-amap/src/main/res/drawable/tc_42.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_42.png
rename to libraries/map-amap/src/main/res/drawable/tc_42.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_43.png b/libraries/map-amap/src/main/res/drawable/tc_43.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_43.png
rename to libraries/map-amap/src/main/res/drawable/tc_43.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_44.png b/libraries/map-amap/src/main/res/drawable/tc_44.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_44.png
rename to libraries/map-amap/src/main/res/drawable/tc_44.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_68.png b/libraries/map-amap/src/main/res/drawable/tc_68.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_68.png
rename to libraries/map-amap/src/main/res/drawable/tc_68.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_84.png b/libraries/map-amap/src/main/res/drawable/tc_84.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_84.png
rename to libraries/map-amap/src/main/res/drawable/tc_84.png
diff --git a/libraries/map-amap/src/main/res/drawable-ldpi/tc_85.png b/libraries/map-amap/src/main/res/drawable/tc_85.png
similarity index 100%
rename from libraries/map-amap/src/main/res/drawable-ldpi/tc_85.png
rename to libraries/map-amap/src/main/res/drawable/tc_85.png
diff --git a/libraries/map-autonavi/.gitignore b/libraries/map-autonavi/.gitignore
new file mode 100644
index 0000000000..42afabfd2a
--- /dev/null
+++ b/libraries/map-autonavi/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/libraries/map-autonavi/build.gradle b/libraries/map-autonavi/build.gradle
new file mode 100644
index 0000000000..941f9b2ff5
--- /dev/null
+++ b/libraries/map-autonavi/build.gradle
@@ -0,0 +1,45 @@
+apply plugin: 'com.android.library'
+
+android {
+ compileSdkVersion rootProject.ext.android.compileSdkVersion
+ // buildToolsVersion rootProject.ext.android.buildToolsVersion
+ defaultConfig {
+ minSdkVersion rootProject.ext.android.minSdkVersion
+ targetSdkVersion rootProject.ext.android.targetSdkVersion
+ versionCode Integer.valueOf(VERSION_CODE)
+ versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
+
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ consumerProguardFiles "consumer-rules.pro"
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ }
+ }
+
+ compileOptions {
+ sourceCompatibility 1.8
+ targetCompatibility 1.8
+ }
+}
+
+dependencies {
+ implementation fileTree(dir: "libs", include: ["*.jar"])
+ if (Boolean.valueOf(RELEASE)) {
+ implementation rootProject.ext.dependencies.mogoutils
+ implementation rootProject.ext.dependencies.mogomapapi
+ implementation rootProject.ext.dependencies.mogocommons
+ implementation rootProject.ext.dependencies.mogomapapi
+ implementation rootProject.ext.dependencies.mapamap
+ } else {
+ implementation project(':foudations:mogo-utils')
+ implementation project(':libraries:mogo-map-api')
+ implementation project(':foudations:mogo-commons')
+ implementation project(':services:mogo-service-api')
+ implementation project(':libraries:map-amap')
+
+ }
+}
\ No newline at end of file
diff --git a/libraries/map-autonavi/consumer-rules.pro b/libraries/map-autonavi/consumer-rules.pro
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/libraries/map-autonavi/gradle.properties b/libraries/map-autonavi/gradle.properties
new file mode 100644
index 0000000000..b57696e52a
--- /dev/null
+++ b/libraries/map-autonavi/gradle.properties
@@ -0,0 +1,3 @@
+GROUP=com.mogo.map
+POM_ARTIFACT_ID=map-autonavi
+VERSION_CODE=1
\ No newline at end of file
diff --git a/libraries/map-autonavi/proguard-rules.pro b/libraries/map-autonavi/proguard-rules.pro
new file mode 100644
index 0000000000..481bb43481
--- /dev/null
+++ b/libraries/map-autonavi/proguard-rules.pro
@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
\ No newline at end of file
diff --git a/libraries/map-autonavi/src/main/AndroidManifest.xml b/libraries/map-autonavi/src/main/AndroidManifest.xml
new file mode 100644
index 0000000000..122d03b210
--- /dev/null
+++ b/libraries/map-autonavi/src/main/AndroidManifest.xml
@@ -0,0 +1,5 @@
+
+
+ /
+
\ No newline at end of file
diff --git a/libraries/map-autonavi/src/main/java/com/mogo/map/impl/automap/navi/AutoNaviClient.java b/libraries/map-autonavi/src/main/java/com/mogo/map/impl/automap/navi/AutoNaviClient.java
new file mode 100644
index 0000000000..389182a5c3
--- /dev/null
+++ b/libraries/map-autonavi/src/main/java/com/mogo/map/impl/automap/navi/AutoNaviClient.java
@@ -0,0 +1,228 @@
+package com.mogo.map.impl.automap.navi;
+
+import android.content.Context;
+import android.content.Intent;
+import android.graphics.Rect;
+import android.location.Location;
+
+import com.mogo.map.MogoLatLng;
+import com.mogo.map.impl.amap.navi.NaviClient;
+import com.mogo.map.navi.IMogoCarLocationChangedListener2;
+import com.mogo.map.navi.IMogoNavi;
+import com.mogo.map.navi.MogoCalculatePath;
+import com.mogo.map.navi.MogoNaviConfig;
+import com.mogo.map.navi.OnCalculatePathItemClickInteraction;
+import com.mogo.utils.logger.Logger;
+
+import java.util.List;
+
+/**
+ * @author congtaowang
+ * @since 2020/6/2
+ *
+ * 使用高德车机版导航
+ */
+public class AutoNaviClient implements IMogoNavi {
+
+ private static final String TAG = "NaviClient";
+
+ public static final String ACTION_AUTO_MAP = "AUTO NAVI_STANDARD_BRO ADCAST_RECV";
+
+ public static final String KEY_TYPE = "KEY_TYPE";
+ public static final String SOURCE_APP = "SOURCE_APP";
+ public static final String LAT = "LAT";
+ public static final String LON = "LON";
+ public static final String ENTRY_LAT = "ENTRY_LAT";
+ public static final String ENTRY_LON = "ENTRY_LON";
+ public static final String DEV = "DEV"; // (int)是否偏移(0:lat 和 lon 是已经加密后的,不需要国测加密; 1:需要国测加密)
+
+ /**
+ * (必填)(int)导航方式
+ * =1(避免收费)
+ * =2(多策略算路)
+ * =3 (不走高速)
+ * =4(躲避拥堵)
+ * =5(不走高速且避免收费)
+ * =6(不走高速且躲避拥堵)
+ * =7(躲避收费且躲避拥堵)
+ * =8(不走高速躲避收费和拥堵)
+ * =20 (高速优先)
+ * =24(高速优先且躲避拥堵)
+ * =-1(地图内部设置默认规则)
+ */
+ public static final String STYLE = "STYLE";
+
+ private static volatile AutoNaviClient sInstance;
+ private final Context mContext;
+
+ private AutoNaviClient( Context context ) {
+ mContext = context;
+ }
+
+ public static AutoNaviClient getInstance( Context context ) {
+ if ( sInstance == null ) {
+ synchronized ( AutoNaviClient.class ) {
+ if ( sInstance == null ) {
+ sInstance = new AutoNaviClient( context );
+ }
+ }
+ }
+ return sInstance;
+ }
+
+ public synchronized void release() {
+ sInstance = null;
+ }
+
+ @Override
+ public void naviTo( MogoLatLng endPoint ) {
+ Intent intent = new Intent();
+ intent.putExtra( KEY_TYPE, 10038 );
+ intent.putExtra( LAT, endPoint.lat );
+ intent.putExtra( LON, endPoint.lon );
+ intent.putExtra( ENTRY_LAT, endPoint.lat );
+ intent.putExtra( ENTRY_LON, endPoint.lon );
+ intent.putExtra( DEV, 0 );
+ intent.putExtra( STYLE, -1 );
+ intent.putExtra( SOURCE_APP, "Third App" );
+ startNaviByIntent( intent );
+ }
+
+ @Override
+ public void naviTo( MogoLatLng endPoint, MogoNaviConfig config ) {
+ naviTo( endPoint );
+ }
+
+ @Override
+ public void naviTo( MogoLatLng endPoint, List< MogoLatLng > wayPoints ) {
+ naviTo( endPoint );
+ }
+
+ @Override
+ public void naviTo( MogoLatLng endPoint, List< MogoLatLng > wayPoints, MogoNaviConfig config ) {
+ naviTo( endPoint );
+ }
+
+ @Override
+ public void reCalculateRoute( MogoNaviConfig config ) {
+ Logger.w( TAG, "高德车机导航,不支持此设置" );
+ }
+
+ @Override
+ public void stopNavi() {
+ Logger.w( TAG, "高德车机导航,不支持此设置" );
+ }
+
+ @Override
+ public void startNavi( boolean isRealNavi ) {
+ Logger.w( TAG, "高德车机导航,不支持此设置" );
+ }
+
+ private void startNaviByIntent( Intent intent ) {
+ intent.setAction( ACTION_AUTO_MAP );
+ intent.addFlags( Intent.FLAG_INCLUDE_STOPPED_PACKAGES );
+ mContext.sendBroadcast( intent );
+ }
+
+ @Override
+ public boolean isNaviing() {
+ Logger.w( TAG, "高德车机导航,不支持此设置" );
+ return false;
+ }
+
+ @Override
+ public List< MogoCalculatePath > getCalculatedStrategies() {
+ Logger.w( TAG, "高德车机导航,不支持此设置" );
+ return null;
+ }
+
+ @Override
+ public List< MogoLatLng > getCalculatedPathPos() {
+ Logger.w( TAG, "高德车机导航,不支持此设置" );
+ return null;
+ }
+
+ @Override
+ public OnCalculatePathItemClickInteraction getItemClickInteraction() {
+ Logger.w( TAG, "高德车机导航,不支持此设置" );
+ return null;
+ }
+
+ @Override
+ public void setLineClickInteraction( OnCalculatePathItemClickInteraction itemClickInteraction ) {
+ Logger.w( TAG, "高德车机导航,不支持此设置" );
+ }
+
+ @Override
+ public void clearCalculatePaths() {
+ Logger.w( TAG, "高德车机导航,不支持此设置" );
+ }
+
+ @Override
+ public void setCalculatePathDisplayBounds( Rect bounds ) {
+ Logger.w( TAG, "高德车机导航,不支持此设置" );
+ }
+
+ @Override
+ public MogoNaviConfig getNaviConfig() {
+ Logger.w( TAG, "高德车机导航,不支持此设置" );
+ return NaviClient.getInstance( mContext ).getNaviConfig();
+ }
+
+ @Override
+ public boolean setBroadcastMode( int mode ) {
+ Logger.w( TAG, "高德车机导航,不支持此设置" );
+ return false;
+ }
+
+ @Override
+ public List< MogoLatLng > getNaviPathCoordinates() {
+ Logger.w( TAG, "高德车机导航,不支持此设置" );
+ return null;
+ }
+
+ @Override
+ public MogoLatLng getCarLocation() {
+ return NaviClient.getInstance( mContext ).getCarLocation();
+ }
+
+ @Override
+ public Location getCarLocation2() {
+ return NaviClient.getInstance( mContext ).getCarLocation2();
+ }
+
+ @Override
+ public void registerCarLocationChangedListener( IMogoCarLocationChangedListener2 listener ) {
+ NaviClient.getInstance( mContext ).registerCarLocationChangedListener( listener );
+ }
+
+ @Override
+ public void startAimlessMode() {
+ Logger.w( TAG, "高德车机导航,不支持此设置" );
+ }
+
+ @Override
+ public void stopAimlessMode() {
+ Logger.w( TAG, "高德车机导航,不支持此设置" );
+ }
+
+ @Override
+ public void setAimlessModeStatus( boolean open ) {
+ Logger.w( TAG, "高德车机导航,不支持此设置" );
+ }
+
+ @Override
+ public void displayOverview( Rect bounds ) {
+ Logger.w( TAG, "高德车机导航,不支持此设置" );
+ }
+
+ @Override
+ public void setUseExtraGPSData( boolean use ) {
+ NaviClient.getInstance( mContext ).setUseExtraGPSData( use );
+ }
+
+ @Override
+ public void setExtraGPSData( double lon, double lat, float speed, float accuracy, float bearing, long timestamp ) {
+ NaviClient.getInstance( mContext ).setExtraGPSData( lon, lat, speed, accuracy, bearing, timestamp );
+ }
+}
diff --git a/libraries/map-autonavi/src/main/java/com/mogo/map/impl/automap/navi/AutoNaviReceiver.java b/libraries/map-autonavi/src/main/java/com/mogo/map/impl/automap/navi/AutoNaviReceiver.java
new file mode 100644
index 0000000000..d53fc12983
--- /dev/null
+++ b/libraries/map-autonavi/src/main/java/com/mogo/map/impl/automap/navi/AutoNaviReceiver.java
@@ -0,0 +1,69 @@
+package com.mogo.map.impl.automap.navi;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.text.TextUtils;
+
+import com.mogo.map.navi.MogoNaviInfo;
+import com.mogo.map.navi.MogoNaviListenerHandler;
+import com.mogo.utils.logger.Logger;
+
+/**
+ * @author congtaowang
+ * @since 2020/6/2
+ *
+ * 高德公版地图透出信息广播接收者
+ */
+public class AutoNaviReceiver extends BroadcastReceiver {
+
+ private static final String TAG = "AutoNaviReceiver";
+
+ public static final String ACTION_AUTONAVI_SEND = "AUTO NAVI_STANDARD_BROADCAST_SEND";
+ private static AutoNaviReceiver autoNaviReceiver;
+ private static boolean sRegisterFlag = false;
+
+
+ public static void register( Context context ) {
+ IntentFilter filter = new IntentFilter();
+ filter.addAction( ACTION_AUTONAVI_SEND );
+ autoNaviReceiver = new AutoNaviReceiver();
+ context.registerReceiver( autoNaviReceiver, filter );
+ sRegisterFlag = true;
+ }
+
+ public static void unregister( Context context ) {
+ if ( autoNaviReceiver != null && sRegisterFlag ) {
+ try {
+ context.unregisterReceiver( autoNaviReceiver );
+ } catch ( Exception e ) {
+ Logger.e( TAG, e, "error. " );
+ }
+ }
+ }
+
+ @Override
+ public void onReceive( Context context, Intent intent ) {
+ String action = intent.getAction();
+ if ( !TextUtils.equals( ACTION_AUTONAVI_SEND, action ) ) {
+ return;
+ }
+ int keyType = intent.getIntExtra( "KEY_TYPE", 0 );
+ switch ( keyType ) {
+ case 10001:
+ MogoNaviInfo naviInfo = new MogoNaviInfo();
+ naviInfo.setCurrentLimitSpeed( intent.getIntExtra( GuideInfoExtraKey.CAMERA_SPEED, 0 ) );
+ naviInfo.setCurrentRoadName( intent.getStringExtra( GuideInfoExtraKey.CUR_ROAD_NAME ) );
+ naviInfo.setCurrentSpeed( intent.getIntExtra( GuideInfoExtraKey.CUR_SPEED, 0 ) );
+ naviInfo.setCurStepRetainDistance( intent.getIntExtra( GuideInfoExtraKey.SEG_REMAIN_DIS, 0 ) );
+ naviInfo.setCurStepRetainTime( intent.getIntExtra( GuideInfoExtraKey.SEG_REMAIN_TIME, 0 ) );
+ naviInfo.setIconResId( intent.getIntExtra( GuideInfoExtraKey.NEW_ICON, 0 ) );
+ naviInfo.setNextRoadName( intent.getStringExtra( GuideInfoExtraKey.NEXT_ROAD_NAME ) );
+ naviInfo.setPathRetainDistance( intent.getIntExtra( GuideInfoExtraKey.ROUTE_REMAIN_DIS, 0 ) );
+ naviInfo.setPathRetainTime( intent.getIntExtra( GuideInfoExtraKey.ROUTE_REMAIN_TIME, 0 ) );
+ MogoNaviListenerHandler.getInstance().onNaviInfoUpdate( naviInfo );
+ break;
+ }
+ }
+}
diff --git a/libraries/map-autonavi/src/main/java/com/mogo/map/impl/automap/navi/GuideInfoExtraKey.java b/libraries/map-autonavi/src/main/java/com/mogo/map/impl/automap/navi/GuideInfoExtraKey.java
new file mode 100644
index 0000000000..51dce46f4e
--- /dev/null
+++ b/libraries/map-autonavi/src/main/java/com/mogo/map/impl/automap/navi/GuideInfoExtraKey.java
@@ -0,0 +1,112 @@
+package com.mogo.map.impl.automap.navi;
+
+//引导信息对应的KEY值机器描述
+public class GuideInfoExtraKey {
+ /**
+ * 导航类型,对应的值为int类型
+ * 0:GPS导航
+ * 1:模拟导航
+ * 2:巡航
+ */
+ public static final String TYPE = "TYPE";
+
+ /**
+ * 当前道路名称,对应的值为String类型
+ */
+ public static final String CUR_ROAD_NAME = "CUR_ROAD_NAME";
+
+ /**
+ * 下一道路名,对应的值为String类型
+ */
+ public static final String NEXT_ROAD_NAME = "NEXT_ROAD_NAME";
+
+ /**
+ * 电子眼限速度,对应的值为int类型,无限速则为0,单位:公里/小时
+ */
+ public static final String CAMERA_SPEED = "CAMERA_SPEED";
+
+ /**
+ * 导航转向图标,对应的值为int类型
+ */
+ public static final String ICON = "ICON";
+
+ /**
+ * 导航最新的转向图标,对应的值为int类型
+ */
+ public static final String NEW_ICON = "NEW_ICON";
+
+ /**
+ * 路径剩余距离,对应的值为int类型,单位:米
+ */
+ public static final String ROUTE_REMAIN_DIS = "ROUTE_REMAIN_DIS";
+ /**
+ * 路径剩余时间,对应的值为int类型,单位:秒
+ */
+ public static final String ROUTE_REMAIN_TIME = "ROUTE_REMAIN_TIME";
+
+ /**
+ * 当前导航段剩余距离,对应的值为int类型,单位:米
+ */
+ public static final String SEG_REMAIN_DIS = "SEG_REMAIN_DIS";
+
+ /**
+ * 当前导航段剩余时间,对应的值为int类型,单位:秒
+ */
+ public static final String SEG_REMAIN_TIME = "SEG_REMAIN_TIME";
+
+ /**
+ * 路径总距离,对应的值为int类型,单位:米
+ */
+ public static final String ROUTE_ALL_DIS = "ROUTE_ALL_DIS";
+
+ /**
+ * 路径总时间,对应的值为int类型,单位:秒
+ */
+ public static final String ROUTE_ALL_TIME = "ROUTE_ALL_TIME";
+
+ /**
+ * 当前车速,对应的值为int类型,单位:公里/小时
+ */
+ public static final String CUR_SPEED = "CUR_SPEED";
+
+ /**
+ * 当前道路类型,对应的值为int类型
+ * 0:高速公路
+ * 1:国道
+ * 2:省道
+ * 3:县道
+ * 4:乡公路
+ * 5:县乡村内部道路
+ * 6:主要大街、城市快速道 * 7:主要道路
+ * 8:次要道路
+ * 9:普通道路
+ * 10:非导航道路
+ */
+ public static final String ROAD_TYPE = "ROAD_TYPE";
+
+ /**
+ * 路径剩余时间,对应的值为String类型,单位:天/小时/分钟 比如:1天2小时, 21小时30分
+ * 钟(只用于长安)
+ */
+ public static final String ROUTE_REMAIN_TIME_STRING = "ROUTE_REMAIN_TIME_S TRING";
+
+ /**
+ * 下下个路名名称,对应的值为String类型
+ */
+ public static final String NEXT_NEXT_ROAD_NAME = "NEXT_NEXT_ROAD_NAME";
+ /**
+ * 下下个路口转向图标,对应的值为int类型
+ */
+
+ public static final String NEXT_NEXT_TURN_ICON = "NEXT_NEXT_TURN_ICON";
+
+ /**
+ * 距离下下个路口剩余距离,对应的值为int类型,单位:米
+ */
+ public static final String NEXT_SEG_REMAIN_DIS = "NEXT_SEG_REMAIN_DIS";
+
+ /**
+ * 距离下下个路口剩余时间,对应的值为int类型,单位:秒
+ */
+ public static final String NEXT_SEG_REMAIN_TIME = "NEXT_SEG_REMAIN_TIME";
+}
\ No newline at end of file
diff --git a/libraries/mogo-map-api/src/main/res/drawable-ldpi/ic_amap_navi_cursor.png b/libraries/mogo-map-api/src/main/res/drawable/ic_amap_navi_cursor.png
similarity index 100%
rename from libraries/mogo-map-api/src/main/res/drawable-ldpi/ic_amap_navi_cursor.png
rename to libraries/mogo-map-api/src/main/res/drawable/ic_amap_navi_cursor.png
diff --git a/libraries/mogo-map-api/src/main/res/drawable-ldpi/ic_navi_start.png b/libraries/mogo-map-api/src/main/res/drawable/ic_navi_start.png
similarity index 100%
rename from libraries/mogo-map-api/src/main/res/drawable-ldpi/ic_navi_start.png
rename to libraries/mogo-map-api/src/main/res/drawable/ic_navi_start.png
diff --git a/libraries/mogo-map-api/src/main/res/drawable-ldpi/ic_navi_target.png b/libraries/mogo-map-api/src/main/res/drawable/ic_navi_target.png
similarity index 100%
rename from libraries/mogo-map-api/src/main/res/drawable-ldpi/ic_navi_target.png
rename to libraries/mogo-map-api/src/main/res/drawable/ic_navi_target.png
diff --git a/libraries/mogo-map-api/src/main/res/drawable-ldpi/map_api_ic_current_location2.png b/libraries/mogo-map-api/src/main/res/drawable/map_api_ic_current_location2.png
similarity index 100%
rename from libraries/mogo-map-api/src/main/res/drawable-ldpi/map_api_ic_current_location2.png
rename to libraries/mogo-map-api/src/main/res/drawable/map_api_ic_current_location2.png
diff --git a/libraries/mogo-map/build.gradle b/libraries/mogo-map/build.gradle
index 064d1d82b8..6cfbecae4f 100644
--- a/libraries/mogo-map/build.gradle
+++ b/libraries/mogo-map/build.gradle
@@ -29,10 +29,14 @@ dependencies {
implementation rootProject.ext.dependencies.mogoutils
implementation rootProject.ext.dependencies.mogomapapi
api rootProject.ext.dependencies.mapamap
+ api rootProject.ext.dependencies.mapautomap
+ implementation rootProject.ext.dependencies.mogocommons
} else {
implementation project(':foudations:mogo-utils')
implementation project(':libraries:mogo-map-api')
api project(':libraries:map-amap')
+ api project(':libraries:map-autonavi')
+ implementation project(':foudations:mogo-commons')
}
}
diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/MogoNavi.java b/libraries/mogo-map/src/main/java/com/mogo/map/MogoNavi.java
index 74e6615a7c..cd43c4147c 100644
--- a/libraries/mogo-map/src/main/java/com/mogo/map/MogoNavi.java
+++ b/libraries/mogo-map/src/main/java/com/mogo/map/MogoNavi.java
@@ -1,16 +1,19 @@
package com.mogo.map;
import android.content.Context;
+import android.content.pm.PackageInfo;
+import android.content.pm.PackageManager;
import android.graphics.Rect;
import android.location.Location;
import com.mogo.map.impl.amap.navi.NaviClient;
-import com.mogo.map.navi.IMogoCarLocationChangedListener;
+import com.mogo.map.impl.automap.navi.AutoNaviClient;
import com.mogo.map.navi.IMogoCarLocationChangedListener2;
import com.mogo.map.navi.IMogoNavi;
import com.mogo.map.navi.MogoCalculatePath;
import com.mogo.map.navi.MogoNaviConfig;
import com.mogo.map.navi.OnCalculatePathItemClickInteraction;
+import com.mogo.utils.AppUtils;
import java.util.List;
@@ -26,15 +29,19 @@ public class MogoNavi implements IMogoNavi {
private static volatile MogoNavi sInstance;
- private MogoNavi(Context context) {
- mDelegate = NaviClient.getInstance(context);
+ private MogoNavi( Context context ) {
+ if ( AppUtils.isAppInstalled( context, "com.autonavi.amapauto" ) ) {
+ mDelegate = AutoNaviClient.getInstance( context );
+ } else {
+ mDelegate = NaviClient.getInstance( context );
+ }
}
- public static MogoNavi getInstance(Context context) {
- if (sInstance == null) {
- synchronized (MogoNavi.class) {
- if (sInstance == null) {
- sInstance = new MogoNavi(context);
+ public static MogoNavi getInstance( Context context ) {
+ if ( sInstance == null ) {
+ synchronized ( MogoNavi.class ) {
+ if ( sInstance == null ) {
+ sInstance = new MogoNavi( context );
}
}
}
@@ -46,72 +53,73 @@ public class MogoNavi implements IMogoNavi {
}
@Override
- public void naviTo(MogoLatLng endPoint) {
- if (mDelegate != null) {
- mDelegate.naviTo(endPoint);
+ public void naviTo( MogoLatLng endPoint ) {
+ if ( mDelegate != null ) {
+ mDelegate.naviTo( endPoint );
}
}
@Override
- public void naviTo(MogoLatLng endPoint, MogoNaviConfig config) {
- if (mDelegate != null) {
- mDelegate.naviTo(endPoint, config);
+ public void naviTo( MogoLatLng endPoint, MogoNaviConfig config ) {
+ if ( mDelegate != null ) {
+ mDelegate.naviTo( endPoint, config );
}
}
@Override
- public void naviTo(MogoLatLng endPoint, List wayPoints) {
- if (mDelegate != null) {
- mDelegate.naviTo(endPoint, wayPoints);
+ public void naviTo( MogoLatLng endPoint, List< MogoLatLng > wayPoints ) {
+ if ( mDelegate != null ) {
+ mDelegate.naviTo( endPoint, wayPoints );
}
}
@Override
- public void naviTo(MogoLatLng endPoint, List wayPoints, MogoNaviConfig config) {
- if (mDelegate != null) {
- mDelegate.naviTo(endPoint, wayPoints, config);
+ public void naviTo( MogoLatLng endPoint, List< MogoLatLng > wayPoints, MogoNaviConfig config ) {
+ if ( mDelegate != null ) {
+ mDelegate.naviTo( endPoint, wayPoints, config );
}
}
@Override
- public void reCalculateRoute(MogoNaviConfig config) {
- if (mDelegate != null) {
- mDelegate.reCalculateRoute(config);
+ public void reCalculateRoute( MogoNaviConfig config ) {
+ if ( mDelegate != null ) {
+ mDelegate.reCalculateRoute( config );
}
}
@Override
public void stopNavi() {
- if (mDelegate != null) {
+ if ( mDelegate != null ) {
mDelegate.stopNavi();
}
}
@Override
- public void startNavi(boolean isRealNavi) {
- if (mDelegate != null) {
- mDelegate.startNavi(isRealNavi);
+ public void startNavi( boolean isRealNavi ) {
+ if ( mDelegate != null ) {
+ mDelegate.startNavi( isRealNavi );
}
}
@Override
public boolean isNaviing() {
- if (mDelegate != null) {
+ if ( mDelegate != null ) {
return mDelegate.isNaviing();
}
return false;
}
@Override
- public List getCalculatedStrategies() {
- if (mDelegate != null) {
+ public List< MogoCalculatePath > getCalculatedStrategies() {
+ if ( mDelegate != null ) {
return mDelegate.getCalculatedStrategies();
}
return null;
}
- @Override public List getCalculatedPathPos() {
- if (mDelegate != null) {
+ @Override
+ public List< MogoLatLng > getCalculatedPathPos() {
+ if ( mDelegate != null ) {
return mDelegate.getCalculatedPathPos();
}
return null;
@@ -119,43 +127,45 @@ public class MogoNavi implements IMogoNavi {
@Override
public OnCalculatePathItemClickInteraction getItemClickInteraction() {
- if (mDelegate != null) {
+ if ( mDelegate != null ) {
return mDelegate.getItemClickInteraction();
}
return null;
}
@Override
- public void setLineClickInteraction(OnCalculatePathItemClickInteraction itemClickInteraction) {
- if (mDelegate != null) {
- mDelegate.setLineClickInteraction(itemClickInteraction);
+ public void setLineClickInteraction( OnCalculatePathItemClickInteraction itemClickInteraction ) {
+ if ( mDelegate != null ) {
+ mDelegate.setLineClickInteraction( itemClickInteraction );
}
}
@Override
public void clearCalculatePaths() {
- if (mDelegate != null) {
+ if ( mDelegate != null ) {
mDelegate.clearCalculatePaths();
}
}
@Override
- public void setCalculatePathDisplayBounds(Rect bounds) {
- if (mDelegate != null) {
- mDelegate.setCalculatePathDisplayBounds(bounds);
+ public void setCalculatePathDisplayBounds( Rect bounds ) {
+ if ( mDelegate != null ) {
+ mDelegate.setCalculatePathDisplayBounds( bounds );
}
}
- @Override public MogoNaviConfig getNaviConfig() {
- if (mDelegate != null) {
+ @Override
+ public MogoNaviConfig getNaviConfig() {
+ if ( mDelegate != null ) {
return mDelegate.getNaviConfig();
}
return null;
}
- @Override public boolean setBroadcastMode(int mode) {
- if (mDelegate != null) {
- return mDelegate.setBroadcastMode(mode);
+ @Override
+ public boolean setBroadcastMode( int mode ) {
+ if ( mDelegate != null ) {
+ return mDelegate.setBroadcastMode( mode );
}
return false;
}
@@ -215,7 +225,7 @@ public class MogoNavi implements IMogoNavi {
@Override
public void displayOverview( Rect bounds ) {
if ( mDelegate != null ) {
- mDelegate.displayOverview(bounds);
+ mDelegate.displayOverview( bounds );
}
}
diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java
index bb7370c404..1b5027ac8d 100644
--- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java
+++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java
@@ -1,5 +1,6 @@
package com.mogo.module.service;
+import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
@@ -273,6 +274,7 @@ public class MogoServices implements IMogoMapListener,
public void init( Context context ) {
mContext = context;
+
initWorkThread();
MarkerServiceHandler.init( mContext );
@@ -323,6 +325,22 @@ public class MogoServices implements IMogoMapListener,
mFragmentManager.addMainFragmentStackTransactionListener( this );
CarIconDisplayStrategy.getInstance().changeCarIconStatus( mStatusManager.isSeekHelping() );
+
+ if ( DebugConfig.isLaunchLocationService() ) {
+ initLocationServiceProcess( context );
+ }
+ }
+
+ private void initLocationServiceProcess( Context context ) {
+ try {
+ Intent intent = new Intent();
+ intent.setAction( "com.zhidao.locationinfo.service.uploaddataservice" );
+ ComponentName cn = new ComponentName( "com.zhidao.locationinfo", "com.zhidao.locationinfo.service.UploadDataService" );
+ intent.setComponent( cn );
+ context.startService( intent );
+ } catch ( Exception e ) {
+ Logger.e( TAG, e, "start location service error." );
+ }
}
private void initWorkThread() {
diff --git a/settings.gradle b/settings.gradle
index 03d4c6868f..26b3a6a783 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -24,3 +24,4 @@ include ':foudations:mogo-connection'
include ':modules:mogo-module-gps-simulator'
include ':modules:mogo-module-gps-simulator-debug'
include ':modules:mogo-module-gps-simulator-noop'
+include ':libraries:map-autonavi'
diff --git a/upload.sh b/upload.sh
index 69ea42b918..ac1050eb8a 100755
--- a/upload.sh
+++ b/upload.sh
@@ -6,6 +6,7 @@
./gradlew :services:mogo-service-api:clean :services:mogo-service-api:uploadArchives
./gradlew :foudations:mogo-connection:clean :foudations:mogo-connection:uploadArchives
./gradlew :libraries:map-amap:clean :libraries:map-amap:uploadArchives
+./gradlew :libraries:map-autommap:clean :libraries:map-autommap:uploadArchives
./gradlew :libraries:mogo-map:clean :libraries:mogo-map:uploadArchives
./gradlew :services:mogo-service:clean :services:mogo-service:uploadArchives
./gradlew :modules:mogo-module-common:clean :modules:mogo-module-common:uploadArchives