Commit 76f67bbc by cuiliang.shi

设置超时时间

1 parent 1de34f58
...@@ -6,8 +6,8 @@ android { ...@@ -6,8 +6,8 @@ android {
applicationId "com.agenew.location_server.application" applicationId "com.agenew.location_server.application"
minSdkVersion 23 minSdkVersion 23
targetSdkVersion 28 targetSdkVersion 28
versionCode 6 versionCode 7
versionName "1.6" versionName "1.7"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
} }
buildTypes { buildTypes {
......
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":6,"versionName":"1.6","enabled":true,"outputFile":"LocationServer.apk","fullName":"release","baseName":"release"},"path":"LocationServer.apk","properties":{}}] [{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":7,"versionName":"1.7","enabled":true,"outputFile":"LocationServer.apk","fullName":"release","baseName":"release"},"path":"LocationServer.apk","properties":{}}]
\ No newline at end of file \ No newline at end of file
...@@ -390,7 +390,7 @@ public class BirdService extends Service { ...@@ -390,7 +390,7 @@ public class BirdService extends Service {
@Override @Override
public void onFailed(Exception e) { public void onFailed(Exception e) {
Log.d(TAG, "Exception:" + e.toString()); Log.d(TAG, "onFailed Exception:" + e.toString());
setAlarm(); setAlarm();
/*mErrorCount++; /*mErrorCount++;
if (mErrorCount > 5){ if (mErrorCount > 5){
......
...@@ -40,7 +40,7 @@ public class IotApi { ...@@ -40,7 +40,7 @@ public class IotApi {
.writeTimeout(TIME_OUT_WRITE, TimeUnit.SECONDS) .writeTimeout(TIME_OUT_WRITE, TimeUnit.SECONDS)
.connectTimeout(TIME_OUT_CONNECT, TimeUnit.SECONDS); .connectTimeout(TIME_OUT_CONNECT, TimeUnit.SECONDS);
try{ /* try{
MyOkHttpRetryInterceptor myOkHttpRetryInterceptor = new MyOkHttpRetryInterceptor.Builder() MyOkHttpRetryInterceptor myOkHttpRetryInterceptor = new MyOkHttpRetryInterceptor.Builder()
.executionCount(3) .executionCount(3)
.retryInterval(1000) .retryInterval(1000)
...@@ -48,7 +48,7 @@ public class IotApi { ...@@ -48,7 +48,7 @@ public class IotApi {
okHttpClientBuilder.addInterceptor(myOkHttpRetryInterceptor); okHttpClientBuilder.addInterceptor(myOkHttpRetryInterceptor);
}catch (Exception e){ }catch (Exception e){
Log.d(TAG, e.toString()); Log.d(TAG, e.toString());
} }*/
sHttpExecutor = new HttpExecutor(okHttpClientBuilder.build()); sHttpExecutor = new HttpExecutor(okHttpClientBuilder.build());
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!