version:1.7.9
fix:修复竖屏报错 update:增加客服,适配不同版本ai精准学
This commit is contained in:
@@ -60,7 +60,6 @@ public class RemoteManager {
|
||||
for (ConnectedListener listener : mListeners) {
|
||||
listener.onConnected();
|
||||
}
|
||||
getLocation();
|
||||
try {
|
||||
String sn = mGetInfoInterface.getSerial();
|
||||
CrashReport.setDeviceId(mContext, sn);
|
||||
@@ -197,19 +196,6 @@ public class RemoteManager {
|
||||
return mMMKV.decodeString(SN_KEY, "");
|
||||
}
|
||||
|
||||
public void getLocation() {
|
||||
if (mGetInfoInterface != null) {
|
||||
try {
|
||||
String jsonString = mGetInfoInterface.getMapResult();
|
||||
mMMKV.encode(CommonConfig.MAP_LOCATION_JSON_KEY, jsonString);
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "getMapResult: " + e.getMessage());
|
||||
}
|
||||
} else {
|
||||
bindInfoService();
|
||||
}
|
||||
}
|
||||
|
||||
public String getAppUsedStatistics() {
|
||||
if (mGetInfoInterface != null) {
|
||||
try {
|
||||
@@ -224,72 +210,6 @@ public class RemoteManager {
|
||||
return null;
|
||||
}
|
||||
|
||||
public MapBean getMapBean() {
|
||||
String jsonString = mMMKV.decodeString(CommonConfig.MAP_LOCATION_JSON_KEY);
|
||||
if (TextUtils.isEmpty(jsonString)) {
|
||||
return null;
|
||||
} else {
|
||||
Gson gson = new Gson();
|
||||
Type type = new TypeToken<MapBean>() {
|
||||
}.getType();
|
||||
MapBean mapBean = gson.fromJson(jsonString, type);
|
||||
mMMKV.encode(CommonConfig.MAP_ADDRESS_KEY, mapBean.getAddress() + mapBean.getLocationDescribe());
|
||||
mMMKV.encode(CommonConfig.MAP_LONGITUDE_KEY, mapBean.getLongitude());
|
||||
mMMKV.encode(CommonConfig.MAP_LATITUDE_KEY, mapBean.getLatitude());
|
||||
return mapBean;
|
||||
}
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
MapBean mapBean = getMapBean();
|
||||
if (mapBean == null) {
|
||||
getLocation();
|
||||
return "北京";
|
||||
} else {
|
||||
return mapBean.getCity();
|
||||
}
|
||||
}
|
||||
|
||||
public String getCityDistrict() {
|
||||
MapBean mapBean = getMapBean();
|
||||
if (mapBean == null) {
|
||||
getLocation();
|
||||
return "北京";
|
||||
} else {
|
||||
return mapBean.getCity() + "\t" + mapBean.getDistrict();
|
||||
}
|
||||
}
|
||||
|
||||
public double getLongitude() {
|
||||
MapBean mapBean = getMapBean();
|
||||
if (mapBean == null) {
|
||||
getLocation();
|
||||
return 0.0;
|
||||
} else {
|
||||
return mapBean.getLongitude();
|
||||
}
|
||||
}
|
||||
|
||||
public double getLatitude() {
|
||||
MapBean mapBean = getMapBean();
|
||||
if (mapBean == null) {
|
||||
getLocation();
|
||||
return 0.0;
|
||||
} else {
|
||||
return mapBean.getLatitude();
|
||||
}
|
||||
}
|
||||
|
||||
public String getLocationTude() {
|
||||
MapBean mapBean = getMapBean();
|
||||
if (mapBean == null) {
|
||||
getLocation();
|
||||
return "0.0";
|
||||
} else {
|
||||
return mapBean.getLongitude() + "," + mapBean.getLatitude();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean getSnIsActivation() {
|
||||
try {
|
||||
return mGetInfoInterface.SnIsActivation();
|
||||
|
||||
Reference in New Issue
Block a user