Commit 669a1347 by 罗翻

locationUtils修改

parent 1c571eed
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":11},"path":"app-release.apk","properties":{"packageId":"com.dayu.bigfish","split":"","minSdkVersion":"16"}}] [{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":11},"path":"app-release.apk","properties":{"packageId":"com.dayu.bigfish.demo","split":"","minSdkVersion":"16"}}]
\ No newline at end of file \ No newline at end of file
...@@ -12,16 +12,16 @@ public class Constants { ...@@ -12,16 +12,16 @@ public class Constants {
/** /**
* 测试环境配置. * 测试环境配置.
*/ */
// public static final int LOG_LEVEL = LogUtils.LEVEL_ALL; public static final int LOG_LEVEL = LogUtils.LEVEL_ALL;
// public static final String ENVIROMENT = "debug"; public static final String ENVIROMENT = "debug";
// public static final String BASE_URL = "http://47.94.101.239:3112"; public static final String BASE_URL = "http://47.94.101.239:3112";
// public final static String UP_PHOTO = "/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply"; public final static String UP_PHOTO = "/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply";
// public final static String WEB_SOP = "http://47.94.101.239:9004/#/sop"; public final static String WEB_SOP = "http://47.94.101.239:9004/#/sop";
// public final static String CHECK_MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manyServiceResult"; public final static String CHECK_MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manyServiceResult";
// public final static String MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manySop"; public final static String MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manySop";
// public final static String WEB_SOP_DETAIL = "http://47.94.101.239:9004/#/sopdetail"; public final static String WEB_SOP_DETAIL = "http://47.94.101.239:9004/#/sopdetail";
// public final static String WEB_ZHI_SHI = "http://47.94.101.239:9004/#/detail"; public final static String WEB_ZHI_SHI = "http://47.94.101.239:9004/#/detail";
// public static final boolean IS_DEBUG = true; public static final boolean IS_DEBUG = true;
/** /**
* uat环境配置. * uat环境配置.
...@@ -40,16 +40,16 @@ public class Constants { ...@@ -40,16 +40,16 @@ public class Constants {
/** /**
* 正式环境. * 正式环境.
*/ */
public static final String ENVIROMENT = "release"; // public static final String ENVIROMENT = "release";
public static final int LOG_LEVEL = LogUtils.LEVEL_ALL; // public static final int LOG_LEVEL = LogUtils.LEVEL_ALL;
public static final String BASE_URL = "https://mobile.kf.ai"; // public static final String BASE_URL = "https://mobile.kf.ai";
public final static String UP_PHOTO = "/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply"; // public final static String UP_PHOTO = "/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply";
public final static String WEB_SOP = "https://sop.kf.ai/#/sop"; // public final static String WEB_SOP = "https://sop.kf.ai/#/sop";
public final static String WEB_SOP_DETAIL = "https://sop.kf.ai/#/sopdetail"; // public final static String WEB_SOP_DETAIL = "https://sop.kf.ai/#/sopdetail";
public final static String WEB_ZHI_SHI = "https://sop.kf.ai/#/detail"; // public final static String WEB_ZHI_SHI = "https://sop.kf.ai/#/detail";
public final static String CHECK_MULTI_WEB_SOP = "https://sop.kf.ai/#/manyServiceResult"; // public final static String CHECK_MULTI_WEB_SOP = "https://sop.kf.ai/#/manyServiceResult";
public final static String MULTI_WEB_SOP = "https://sop.kf.ai/#/manySop"; // public final static String MULTI_WEB_SOP = "https://sop.kf.ai/#/manySop";
public static final boolean IS_DEBUG = false; // public static final boolean IS_DEBUG = false;
/** /**
* 演示环境 * 演示环境
......
...@@ -393,7 +393,7 @@ ...@@ -393,7 +393,7 @@
<string name="submission_of_audit">提交审核</string> <string name="submission_of_audit">提交审核</string>
<string name="title_my_header">我的头像</string> <string name="title_my_header">我的头像</string>
<string name="modify_header_iv">修改头像</string> <string name="modify_header_iv">修改头像</string>
<string name="dayu_bang">大鱼帮</string> <string name="dayu_bang">大鱼帮</string>
<string name="header_pic">头像</string> <string name="header_pic">头像</string>
<string name="person_mobile">手机号码</string> <string name="person_mobile">手机号码</string>
......
...@@ -16,7 +16,7 @@ import com.amap.api.location.AMapLocationListener; ...@@ -16,7 +16,7 @@ import com.amap.api.location.AMapLocationListener;
public class LocationUtils { public class LocationUtils {
private static AMapLocationClient mlocationClient; private static AMapLocationClient mlocationClient;
public static AMapLocation sLocation = null; private static AMapLocation sLocation = null;
private static boolean flag = true; private static boolean flag = true;
private static MyLocationListener mListener; private static MyLocationListener mListener;
private static Handler mHandler; private static Handler mHandler;
...@@ -92,7 +92,7 @@ public class LocationUtils { ...@@ -92,7 +92,7 @@ public class LocationUtils {
@Override @Override
public void onLocationChanged(AMapLocation location) { public void onLocationChanged(AMapLocation location) {
if (location != null && flag) { if (location != null && location.getErrorCode() == 0 && flag) {
flag = false; flag = false;
mlocationClient.stopLocation(); mlocationClient.stopLocation();
sLocation = location; sLocation = location;
...@@ -112,6 +112,7 @@ public class LocationUtils { ...@@ -112,6 +112,7 @@ public class LocationUtils {
public static void destroy() { public static void destroy() {
mHandler = null; mHandler = null;
mlocationClient.onDestroy(); mlocationClient.onDestroy();
mlocationClient = null;
mListener = null; mListener = null;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment