Commit dac8a496 by cuiliang.shi

【2019-4-1】添加坐标系标识,适用其他坐标系(GCJ02、BD09,不传默认为BD-09)

1 parent 84db52e3
......@@ -37,7 +37,7 @@ import java.util.List;
public class BirdService extends Service {
public static int status = 0;
private final static String DEFAULTPATH = "http://202.100.179.139:8088/api";
private final static String DEFAULTPATH = "http://202.100.190.58:8090/api/cstmzPosition";
private final static long DEFAULTINTERVAL = 30;
private String mMobile;
private String mIMEIStr;
......@@ -56,7 +56,7 @@ public class BirdService extends Service {
private Context mContext;
private String mPath = "";
private int ret_code = 0;
private String ret_cfgv = "0";
private String ret_cfgv = "2019031512";
@Override
public IBinder onBind(Intent intent) {
......@@ -115,7 +115,7 @@ public class BirdService extends Service {
DevicePreferences.getInstance(this).putBoolean("is_need_notification", true);
}
ret_cfgv = DevicePreferences.getInstance(getApplicationContext()).getString("bird_ret_cfgv", "0");
ret_cfgv = DevicePreferences.getInstance(getApplicationContext()).getString("bird_ret_cfgv", "2019031512");
mPath = DevicePreferences.getInstance(mContext).getString("bird_location_upload_url", DEFAULTPATH);
long temp = DevicePreferences.getInstance(mContext).getLong("bird_location_upload_interval", DEFAULTINTERVAL);
......@@ -164,7 +164,7 @@ public class BirdService extends Service {
public void setAlarm(){
Log.d(TAG, "setAlarm");
ret_cfgv = DevicePreferences.getInstance(getApplicationContext()).getString("bird_ret_cfgv", "0");
ret_cfgv = DevicePreferences.getInstance(getApplicationContext()).getString("bird_ret_cfgv", "2019031512");
mPath = DevicePreferences.getInstance(mContext).getString("bird_location_upload_url", DEFAULTPATH);
long temp = DevicePreferences.getInstance(mContext).getLong("bird_location_upload_interval", DEFAULTINTERVAL);
......@@ -202,6 +202,7 @@ public class BirdService extends Service {
strbuf.append("&imsi=" + mIMSIStr);
strbuf.append("&model=" + mModel);
strbuf.append("&cfgv=" + ret_cfgv);
strbuf.append("&gcs=" + "GCJ02");
Log.d(TAG, "REQUEST: URL: " + mPath + ", BODY:" + strbuf);
......@@ -323,8 +324,9 @@ public class BirdService extends Service {
mIMSIStr = temp_imsi.substring(0, temp_imsi.length() - 1);
mICCIDStr = temp_iccid.substring(0, temp_iccid.length() - 1);
String temp_model = Build.MODEL;
mModel = temp_model.trim().replaceAll(" ", "_");
// String temp_model = Build.MODEL;
// mModel = temp_model.trim().replaceAll(" ", "_");
mModel = "HBA7+";
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!