Merge branch 'master' of http://gitlab.zhidaoauto.com/ecos/app/MoGoAiCloudSdk
This commit is contained in:
@@ -28,6 +28,9 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
import static com.mogo.cloud.commons.network.NetConstants.GEOFENCE_HOST;
|
||||
import static com.mogo.cloud.commons.network.NetConstants.REALTIME_LOCATION_HOST;
|
||||
|
||||
/**
|
||||
* created by wujifei on 2021/1/21 12:26
|
||||
* describe:
|
||||
@@ -45,18 +48,17 @@ public class NetworkActivity extends AppCompatActivity {
|
||||
setContentView(R.layout.activity_network);
|
||||
btn = (Button) findViewById(R.id.btn);
|
||||
tvResult = (TextView) findViewById(R.id.tv_result);
|
||||
apiService = RetrofitFactory.INSTANCE.getInstance("http://dzt-test.zhidaozhixing.com")
|
||||
.create(ApiService.class);
|
||||
|
||||
|
||||
btn.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
tvResult.setText("结果显示");
|
||||
// queryRoadData("ZD802C1938L10797");
|
||||
// queryHelpSignal("ZD802C1938L10797");
|
||||
queryRoadData("ZD802C1938L10797");
|
||||
// queryHelpSignal("F803EB2046PZD00006");
|
||||
|
||||
//上报路况到服务端
|
||||
// uploadRoadInfo();
|
||||
// uploadRoadInfo();
|
||||
//查询路况
|
||||
// queryRoad();
|
||||
}
|
||||
@@ -126,10 +128,11 @@ public class NetworkActivity extends AppCompatActivity {
|
||||
Log.d(TAG, "NetworkActivity uploadRoadInfo onError e = " + e);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void queryRoadData(String sn) {
|
||||
apiService = RetrofitFactory.INSTANCE.getInstance(GEOFENCE_HOST)
|
||||
.create(ApiService.class);
|
||||
if (apiService != null) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("sn", sn);
|
||||
@@ -163,6 +166,8 @@ public class NetworkActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
public void queryHelpSignal(String sn) {
|
||||
apiService = RetrofitFactory.INSTANCE.getInstance("http://dzt-realtimeLocation.zhidaozhixing.com")
|
||||
.create(ApiService.class);
|
||||
if (apiService != null) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("sn", sn);
|
||||
|
||||
Reference in New Issue
Block a user