1.修改log日志 2.修改数据库更新操作,保留要刪除的圖片 3.修改語言提示以及txt 文本記錄的图片顺序 4.去掉待提交的提示框
This commit is contained in:
@@ -24,6 +24,7 @@ import com.navinfo.outdoor.http.Callback;
|
|||||||
import com.navinfo.outdoor.http.HttpInterface;
|
import com.navinfo.outdoor.http.HttpInterface;
|
||||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||||
import com.navinfo.outdoor.util.FlushTokenUtil;
|
import com.navinfo.outdoor.util.FlushTokenUtil;
|
||||||
|
import com.navinfo.outdoor.util.TimestampUtil;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
@@ -122,7 +123,7 @@ public class GuidanceActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
guidanceBuilder = new StringBuilder();
|
guidanceBuilder = new StringBuilder();
|
||||||
guidanceBuilder.append("GuidanceActivity-onCreate-initData ,");
|
guidanceBuilder.append(TimestampUtil.time()).append("GuidanceActivity-onCreate-initData ,");
|
||||||
if (Constant.USHERED != null) {
|
if (Constant.USHERED != null) {
|
||||||
guidanceBuilder.append("userId:").append(Constant.USHERED).append(",");
|
guidanceBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||||
}
|
}
|
||||||
@@ -148,123 +149,135 @@ public class GuidanceActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
v.setEnabled(false);
|
v.setEnabled(false);
|
||||||
guidanceBuilder.append("点击了请查看APP使用说明 ,");
|
guidanceBuilder.append(TimestampUtil.time()).append("点击了请查看APP使用说明 ,");
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = 0x101;
|
message.what = 0x101;
|
||||||
handler.sendMessageDelayed(message, 1000);
|
handler.sendMessageDelayed(message, 1000);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
taskItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
|
taskItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
v.setEnabled(false);
|
v.setEnabled(false);
|
||||||
guidanceBuilder.append("点击了下一步 ,");
|
guidanceBuilder.append(TimestampUtil.time()).append("点击了下一步 ,");
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = 0x102;
|
message.what = 0x102;
|
||||||
handler.sendMessageDelayed(message, 500);
|
handler.sendMessageDelayed(message, 500);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
refreshItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
|
refreshItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
v.setEnabled(false);
|
v.setEnabled(false);
|
||||||
guidanceBuilder.append("点击了下一步 ,");
|
guidanceBuilder.append(TimestampUtil.time()).append("点击了下一步 ,");
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = 0x103;
|
message.what = 0x103;
|
||||||
handler.sendMessageDelayed(message, 500);
|
handler.sendMessageDelayed(message, 500);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
screenItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
|
screenItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
v.setEnabled(false);
|
v.setEnabled(false);
|
||||||
guidanceBuilder.append("点击了下一步 ,");
|
guidanceBuilder.append(TimestampUtil.time()).append("点击了下一步 ,");
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = 0x104;
|
message.what = 0x104;
|
||||||
handler.sendMessageDelayed(message, 500);
|
handler.sendMessageDelayed(message, 500);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
locationItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
|
locationItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
v.setEnabled(false);
|
v.setEnabled(false);
|
||||||
guidanceBuilder.append("点击了下一步 ,");
|
guidanceBuilder.append(TimestampUtil.time()).append("点击了下一步 ,");
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = 0x105;
|
message.what = 0x105;
|
||||||
handler.sendMessageDelayed(message, 500);
|
handler.sendMessageDelayed(message, 500);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
gatherItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
|
gatherItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
v.setEnabled(false);
|
v.setEnabled(false);
|
||||||
guidanceBuilder.append("点击了下一步 ,");
|
guidanceBuilder.append(TimestampUtil.time()).append("点击了下一步 ,");
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = 0x106;
|
message.what = 0x106;
|
||||||
handler.sendMessageDelayed(message, 500);
|
handler.sendMessageDelayed(message, 500);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
submitItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
|
submitItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
v.setEnabled(false);
|
v.setEnabled(false);
|
||||||
guidanceBuilder.append("点击了下一步 ,");
|
guidanceBuilder.append(TimestampUtil.time()).append("点击了下一步 ,");
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = 0x107;
|
message.what = 0x107;
|
||||||
handler.sendMessageDelayed(message, 500);
|
handler.sendMessageDelayed(message, 500);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
submittedItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
|
submittedItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
v.setEnabled(false);
|
v.setEnabled(false);
|
||||||
guidanceBuilder.append("点击了下一步 ,");
|
guidanceBuilder.append(TimestampUtil.time()).append("点击了下一步 ,");
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = 0x108;
|
message.what = 0x108;
|
||||||
handler.sendMessageDelayed(message, 500);
|
handler.sendMessageDelayed(message, 500);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
discoverItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
|
discoverItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
v.setEnabled(false);
|
v.setEnabled(false);
|
||||||
guidanceBuilder.append("点击了下一步 ,");
|
guidanceBuilder.append(TimestampUtil.time()).append("点击了下一步 ,");
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = 0x109;
|
message.what = 0x109;
|
||||||
handler.sendMessageDelayed(message, 500);
|
handler.sendMessageDelayed(message, 500);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
myHeadItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
|
myHeadItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
v.setEnabled(false);
|
v.setEnabled(false);
|
||||||
guidanceBuilder.append("点击了下一步 ,");
|
guidanceBuilder.append(TimestampUtil.time()).append("点击了下一步 ,");
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = 0x110;
|
message.what = 0x110;
|
||||||
handler.sendMessageDelayed(message, 500);
|
handler.sendMessageDelayed(message, 500);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
dataItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
|
dataItem.findViewById(R.id.btn_next_step).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
v.setEnabled(false);
|
v.setEnabled(false);
|
||||||
guidanceBuilder.append("点击了下一步 ,");
|
guidanceBuilder.append(TimestampUtil.time()).append("点击了下一步 ,");
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = 0x111;
|
message.what = 0x111;
|
||||||
handler.sendMessageDelayed(message, 500);
|
handler.sendMessageDelayed(message, 500);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
withdrawItem.findViewById(R.id.btn_to_learn).setOnClickListener(new View.OnClickListener() {
|
withdrawItem.findViewById(R.id.btn_to_learn).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
v.setEnabled(false);
|
v.setEnabled(false);
|
||||||
guidanceBuilder.append("点击了学会了,");
|
guidanceBuilder.append(TimestampUtil.time()).append("点击了学会了,");
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = 0x112;
|
message.what = 0x112;
|
||||||
handler.sendMessageDelayed(message, 500);
|
handler.sendMessageDelayed(message, 500);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initGuide() {
|
private void initGuide() {
|
||||||
@@ -301,26 +314,27 @@ public class GuidanceActivity extends BaseActivity {
|
|||||||
Toast.makeText(GuidanceActivity.this, message, Toast.LENGTH_SHORT).show();
|
Toast.makeText(GuidanceActivity.this, message, Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
guidanceBuilder.append("onPause,");
|
guidanceBuilder.append(TimestampUtil.time()).append("onPause,");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onStop() {
|
protected void onStop() {
|
||||||
super.onStop();
|
super.onStop();
|
||||||
guidanceBuilder.append("onStop,");
|
guidanceBuilder.append(TimestampUtil.time()).append("onStop,");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
frameLayout.removeAllViews();
|
frameLayout.removeAllViews();
|
||||||
guidanceBuilder.append("onDestroy");
|
guidanceBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||||
guidanceBuilder.append("\r\n");
|
guidanceBuilder.append("\r\n");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), guidanceBuilder.toString(), true);
|
FileUtils.writeFile(logFile.getAbsolutePath(), guidanceBuilder.toString(), true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -165,8 +165,10 @@ public class HomeActivity extends BaseActivity {
|
|||||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
|
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.EVENT_STAY_REFRESH;
|
obtain1.what = Constant.STAY_SUBMIT_ITEM;
|
||||||
|
obtain1.obj = true;
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -185,14 +187,18 @@ public class HomeActivity extends BaseActivity {
|
|||||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
|
|
||||||
|
Message obtain1 = Message.obtain();
|
||||||
|
obtain1.what = Constant.STAY_SUBMIT_ITEM;
|
||||||
|
obtain1.obj = true;
|
||||||
|
EventBus.getDefault().post(obtain1);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
} else if (data.what == Constant.EVENT_MESSAGE) {
|
||||||
}else if (data.what==Constant.EVENT_MESSAGE){
|
|
||||||
String dataString = (String) data.obj;
|
String dataString = (String) data.obj;
|
||||||
if (!dataString.equals("")){
|
if (!dataString.equals("")) {
|
||||||
Toast.makeText(this, dataString, Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, dataString, Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
//调用系统安装程序
|
//调用系统安装程序
|
||||||
//安装apk,也可以进行静默安装
|
//安装apk,也可以进行静默安装
|
||||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||||
File file = new File(Constant.NABISCO_APk , "DTXB.apk");
|
File file = new File(Constant.NABISCO_APk, "DTXB.apk");
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||||
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||||
Uri contentUri = FileProvider.getUriForFile(MainActivity.this, "com.navinfo.outdoor.fileprovider", file);
|
Uri contentUri = FileProvider.getUriForFile(MainActivity.this, "com.navinfo.outdoor.fileprovider", file);
|
||||||
@@ -197,9 +197,9 @@ public class MainActivity extends BaseActivity {
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout")||message.equals("Read time out")){
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
Toast.makeText(MainActivity.this, "请求超时", Toast.LENGTH_SHORT).show();
|
Toast.makeText(MainActivity.this, "请求超时", Toast.LENGTH_SHORT).show();
|
||||||
}else {
|
} else {
|
||||||
Toast.makeText(MainActivity.this, message, Toast.LENGTH_SHORT).show();
|
Toast.makeText(MainActivity.this, message, Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
initTime();
|
initTime();
|
||||||
@@ -213,13 +213,13 @@ public class MainActivity extends BaseActivity {
|
|||||||
private void showUpdateDialog(ApkVersionBean.bodyBean bodyBean) {
|
private void showUpdateDialog(ApkVersionBean.bodyBean bodyBean) {
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||||
builder.setIcon(android.R.drawable.ic_dialog_info);
|
builder.setIcon(android.R.drawable.ic_dialog_info);
|
||||||
builder.setTitle("请升级APP版本至" + bodyBean.getVersion());
|
builder.setMessage("请升级APP版本至" + bodyBean.getVersion());
|
||||||
builder.setMessage("本次升级说明:\n" +
|
/* builder.setMessage("本次升级说明:\n" +
|
||||||
"1.修复一些闪退、丢任务、丢数据、卡顿问题\n" +
|
"1.修复一些闪退、丢任务、丢数据、卡顿问题\n" +
|
||||||
"2.修复点击保存,持续提示问题,上传任务中也可继续作业\n" +
|
"2.修复点击保存,持续提示问题,上传任务中也可继续作业\n" +
|
||||||
"3.修复连拍照片错乱问题\n" +
|
"3.修复连拍照片错乱问题\n" +
|
||||||
"4.修复起终点判断问题\n" +
|
"4.修复起终点判断问题\n" +
|
||||||
"5.新增默认地图缩放比例、身份证姓名自动识别功能");
|
"5.新增默认地图缩放比例、身份证姓名自动识别功能");*/
|
||||||
builder.setCancelable(false);
|
builder.setCancelable(false);
|
||||||
if (bodyBean.getUpdateState() == 0) {//非必须更新
|
if (bodyBean.getUpdateState() == 0) {//非必须更新
|
||||||
builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
|
builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
|
||||||
@@ -351,9 +351,9 @@ public class MainActivity extends BaseActivity {
|
|||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout")||message.equals("Read time out")){
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
Toast.makeText(MainActivity.this, "请求超时", Toast.LENGTH_SHORT).show();
|
Toast.makeText(MainActivity.this, "请求超时", Toast.LENGTH_SHORT).show();
|
||||||
}else {
|
} else {
|
||||||
Toast.makeText(MainActivity.this, message, Toast.LENGTH_SHORT).show();
|
Toast.makeText(MainActivity.this, message, Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -375,44 +375,44 @@ public class MainActivity extends BaseActivity {
|
|||||||
.cls(LoginOauthTokenBean.class)
|
.cls(LoginOauthTokenBean.class)
|
||||||
.params(httpParams);
|
.params(httpParams);
|
||||||
okGoBuilder.postRequest(new Callback<LoginOauthTokenBean>() {
|
okGoBuilder.postRequest(new Callback<LoginOauthTokenBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(LoginOauthTokenBean response, int id) {
|
public void onSuccess(LoginOauthTokenBean response, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
if (response.getCode() == 200) {
|
if (response.getCode() == 200) {
|
||||||
LoginOauthTokenBean.BodyBean body = response.getBody();
|
LoginOauthTokenBean.BodyBean body = response.getBody();
|
||||||
if (body.getUserId() != null && !body.getUserId().equals("")) {
|
if (body.getUserId() != null && !body.getUserId().equals("")) {
|
||||||
Constant.initRootFolder(body.getUserId());
|
Constant.initRootFolder(body.getUserId());
|
||||||
HttpInterface.initHttpInter(body.getUserId());
|
HttpInterface.initHttpInter(body.getUserId());
|
||||||
navInfoEditor.putString("access_token", body.getAccess_token());
|
navInfoEditor.putString("access_token", body.getAccess_token());
|
||||||
Constant.ACCESS_TOKEN = body.getAccess_token();
|
Constant.ACCESS_TOKEN = body.getAccess_token();
|
||||||
navInfoEditor.putString("refresh_token", body.getRefresh_token());
|
navInfoEditor.putString("refresh_token", body.getRefresh_token());
|
||||||
Constant.REFRESH_TOKEN = body.getRefresh_token();
|
Constant.REFRESH_TOKEN = body.getRefresh_token();
|
||||||
navInfoEditor.putString("user_id", body.getUserId());
|
navInfoEditor.putString("user_id", body.getUserId());
|
||||||
Constant.USHERED = body.getUserId();
|
Constant.USHERED = body.getUserId();
|
||||||
navInfoEditor.commit();
|
navInfoEditor.commit();
|
||||||
initGetUserInfo();//获取用户信息
|
initGetUserInfo();//获取用户信息
|
||||||
}else {
|
} else {
|
||||||
Toast.makeText(MainActivity.this, "获取用户id失败,请重试", Toast.LENGTH_SHORT).show();
|
Toast.makeText(MainActivity.this, "获取用户id失败,请重试", Toast.LENGTH_SHORT).show();
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Intent intent = new Intent(MainActivity.this, LoginActivity.class);
|
|
||||||
startActivity(intent);
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
Intent intent = new Intent(MainActivity.this, LoginActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout")||message.equals("Read time out")){
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
Toast.makeText(MainActivity.this, "请求超时", Toast.LENGTH_SHORT).show();
|
Toast.makeText(MainActivity.this, "请求超时", Toast.LENGTH_SHORT).show();
|
||||||
}else {
|
} else {
|
||||||
Toast.makeText(MainActivity.this, message, Toast.LENGTH_SHORT).show();
|
Toast.makeText(MainActivity.this, message, Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
@@ -452,7 +452,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
FileOutputStream fileOutputStream = null;
|
FileOutputStream fileOutputStream = null;
|
||||||
if (is != null) {
|
if (is != null) {
|
||||||
//对apk进行保存
|
//对apk进行保存
|
||||||
File file = new File(Constant.NABISCO_APk , "DTXB.apk");
|
File file = new File(Constant.NABISCO_APk, "DTXB.apk");
|
||||||
fileOutputStream = new FileOutputStream(file);
|
fileOutputStream = new FileOutputStream(file);
|
||||||
byte[] buf = new byte[1024];
|
byte[] buf = new byte[1024];
|
||||||
int ch;
|
int ch;
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import com.navinfo.outdoor.R;
|
|||||||
import com.navinfo.outdoor.api.Constant;
|
import com.navinfo.outdoor.api.Constant;
|
||||||
import com.navinfo.outdoor.base.BaseActivity;
|
import com.navinfo.outdoor.base.BaseActivity;
|
||||||
import com.navinfo.outdoor.util.SystemTTS;
|
import com.navinfo.outdoor.util.SystemTTS;
|
||||||
|
import com.navinfo.outdoor.util.TimestampUtil;
|
||||||
import com.otaliastudios.cameraview.CameraListener;
|
import com.otaliastudios.cameraview.CameraListener;
|
||||||
import com.otaliastudios.cameraview.CameraLogger;
|
import com.otaliastudios.cameraview.CameraLogger;
|
||||||
import com.otaliastudios.cameraview.CameraView;
|
import com.otaliastudios.cameraview.CameraView;
|
||||||
@@ -62,7 +63,7 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (v.getId() == R.id.capture_picture) {
|
if (v.getId() == R.id.capture_picture) {
|
||||||
photographBuilder.append("onClick:点击了拍摄 ,");
|
photographBuilder.append(TimestampUtil.time()).append("onClick:点击了拍摄 ,");
|
||||||
cameraView.takePicture();
|
cameraView.takePicture();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -94,7 +95,7 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
photographBuilder = new StringBuilder();
|
photographBuilder = new StringBuilder();
|
||||||
photographBuilder.append("PhotographActivity-onCreate-initData ,");
|
photographBuilder.append(TimestampUtil.time()).append("PhotographActivity-onCreate-initData ,");
|
||||||
if (Constant.USHERED != null) {
|
if (Constant.USHERED != null) {
|
||||||
photographBuilder.append("userId:").append(Constant.USHERED).append(",");
|
photographBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||||
}
|
}
|
||||||
@@ -118,9 +119,9 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
|
|||||||
public void onPictureTaken(@NonNull PictureResult result) {
|
public void onPictureTaken(@NonNull PictureResult result) {
|
||||||
super.onPictureTaken(result);
|
super.onPictureTaken(result);
|
||||||
if (Objects.requireNonNull(cameraView.getPictureSize()).getWidth() < cameraView.getPictureSize().getHeight()) {
|
if (Objects.requireNonNull(cameraView.getPictureSize()).getWidth() < cameraView.getPictureSize().getHeight()) {
|
||||||
photographBuilder.append("cameraView 用户竖向拍摄 ,");
|
photographBuilder.append(TimestampUtil.time()).append("cameraView 用户竖向拍摄 ,");
|
||||||
} else {
|
} else {
|
||||||
photographBuilder.append("cameraView 用户横屏拍摄 ,");
|
photographBuilder.append(TimestampUtil.time()).append("cameraView 用户横屏拍摄 ,");
|
||||||
}
|
}
|
||||||
File file = new File(photo_path);
|
File file = new File(photo_path);
|
||||||
/*File destFolder = new File(file.getParentFile().getAbsolutePath()+"aaa");
|
/*File destFolder = new File(file.getParentFile().getAbsolutePath()+"aaa");
|
||||||
@@ -207,14 +208,14 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
|
|||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
photographBuilder.append("onResume ,");
|
photographBuilder.append(TimestampUtil.time()).append("onResume ,");
|
||||||
cameraView.open();
|
cameraView.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
photographBuilder.append("onPause ,");
|
photographBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||||
cameraView.close();
|
cameraView.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -222,7 +223,7 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
|
|||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
cameraView.destroy();
|
cameraView.destroy();
|
||||||
photographBuilder.append("onDestroy ");
|
photographBuilder.append(TimestampUtil.time()).append("onDestroy ");
|
||||||
photographBuilder.append("\r\n");
|
photographBuilder.append("\r\n");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), photographBuilder.toString(), true);
|
FileUtils.writeFile(logFile.getAbsolutePath(), photographBuilder.toString(), true);
|
||||||
if (EventBus.getDefault().isRegistered(this)) {
|
if (EventBus.getDefault().isRegistered(this)) {
|
||||||
|
|||||||
@@ -157,6 +157,12 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
if (finalVideoPath != null) {
|
if (finalVideoPath != null) {
|
||||||
File file = new File(finalVideoPath);
|
File file = new File(finalVideoPath);
|
||||||
paperFile = new File(Objects.requireNonNull(file.getParentFile()).getAbsoluteFile() + "/" + "paper.txt");
|
paperFile = new File(Objects.requireNonNull(file.getParentFile()).getAbsoluteFile() + "/" + "paper.txt");
|
||||||
|
videoIndex = Integer.parseInt(file.getName().replace(".webp", ""));
|
||||||
|
if (videoIndex == 0) {
|
||||||
|
videoIndex = -1;
|
||||||
|
} else {
|
||||||
|
videoIndex = videoIndex - 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
formatter = new SimpleDateFormat("yyyyMMdd HHmmss");
|
formatter = new SimpleDateFormat("yyyyMMdd HHmmss");
|
||||||
@@ -320,7 +326,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
message.what = 0x103;
|
message.what = 0x103;
|
||||||
handler.sendMessage(message);
|
handler.sendMessage(message);
|
||||||
}*/
|
}*/
|
||||||
if (file.exists() && file!= null) {
|
if (file.exists() && file != null) {
|
||||||
WebPNative webPNative = new WebPNative();
|
WebPNative webPNative = new WebPNative();
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@@ -719,11 +725,11 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
sb.append("\r\n");
|
sb.append("\r\n");
|
||||||
if (isBack) {
|
if (isBack) {
|
||||||
|
//快到终点的语音播报
|
||||||
|
initTerminus();
|
||||||
FileUtils.writeFile(paperFile.getAbsolutePath(), sb.toString(), true);
|
FileUtils.writeFile(paperFile.getAbsolutePath(), sb.toString(), true);
|
||||||
//公里限速提醒
|
//公里限速提醒
|
||||||
initSpeed();
|
initSpeed();
|
||||||
//快到终点的语音播报
|
|
||||||
initTerminus();
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
UMCrash.generateCustomLog(e, "自定义");
|
UMCrash.generateCustomLog(e, "自定义");
|
||||||
@@ -777,24 +783,24 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
LatLng endLatLng = new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude());//新的坐标
|
LatLng endLatLng = new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude());//新的坐标
|
||||||
double geometry = GeometryTools.distanceToDouble(startLatLng, endLatLng);//米
|
double geometry = GeometryTools.distanceToDouble(startLatLng, endLatLng);//米
|
||||||
if (type == 3) {
|
if (type == 3) {
|
||||||
if (radioPicture==2){
|
if (radioPicture == 2) {
|
||||||
double speeds = ((geometry / 1) * 3600 / 1000);
|
double speeds = ((geometry / 1) * 3600 / 1000);
|
||||||
if (speeds > 40) {//40千米/h
|
if (speeds > 40) {//40千米/h
|
||||||
systemTTS.playText("您已超速");
|
systemTTS.playText("您已超速");
|
||||||
}
|
}
|
||||||
}else if (radioPicture==3){
|
} else if (radioPicture == 3) {
|
||||||
double speeds = ((geometry / 2) * 3600 / 1000);
|
double speeds = ((geometry / 2) * 3600 / 1000);
|
||||||
if (speeds > 40) {//40千米/h
|
if (speeds > 40) {//40千米/h
|
||||||
systemTTS.playText("您已超速");
|
systemTTS.playText("您已超速");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (type == 4) {
|
} else if (type == 4) {
|
||||||
if (radioPicture==2){
|
if (radioPicture == 2) {
|
||||||
double speeds = ((geometry / 1) * 3600 / 1000);
|
double speeds = ((geometry / 1) * 3600 / 1000);
|
||||||
if (speeds > 80) {//80千米/h
|
if (speeds > 80) {//80千米/h
|
||||||
systemTTS.playText("您已超速");
|
systemTTS.playText("您已超速");
|
||||||
}
|
}
|
||||||
}else if (radioPicture==3){
|
} else if (radioPicture == 3) {
|
||||||
double speeds = ((geometry / 2) * 3600 / 1000);
|
double speeds = ((geometry / 2) * 3600 / 1000);
|
||||||
if (speeds > 80) {//80千米/h
|
if (speeds > 80) {//80千米/h
|
||||||
systemTTS.playText("您已超速");
|
systemTTS.playText("您已超速");
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ public class CapacityMeasureAdapter extends RecyclerView.Adapter<CapacityMeasure
|
|||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
View inflate = LayoutInflater.from(context).inflate(R.layout.measure_item, parent, false);
|
View inflate = LayoutInflater.from(context).inflate(R.layout.measure_item, parent, false);
|
||||||
return new ViewHolder(inflate);
|
return new ViewHolder(inflate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,18 +57,18 @@ public class CapacityMeasureAdapter extends RecyclerView.Adapter<CapacityMeasure
|
|||||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||||
final boolean single = measureList.get(position).isSingle();//是否多选
|
final boolean single = measureList.get(position).isSingle();//是否多选
|
||||||
if (single) {
|
if (single) {
|
||||||
holder.tvMeasure.setText((position + 1)+"、" + measureList.get(position).getQuestion()+"(单选)");
|
holder.tvMeasure.setText((position + 1) + "、" + measureList.get(position).getQuestion() + "(单选)");
|
||||||
RadioGroup radioGroup = new RadioGroup(context);
|
RadioGroup radioGroup = new RadioGroup(context);
|
||||||
radioGroup.setOrientation(LinearLayout.VERTICAL);
|
radioGroup.setOrientation(LinearLayout.VERTICAL);
|
||||||
holder.llOption.addView(radioGroup);
|
holder.llOption.addView(radioGroup);
|
||||||
List<?> optionList = measureList.get(position).getOption();
|
List<?> optionList = measureList.get(position).getOption();
|
||||||
if (optionList != null && !optionList.isEmpty()) {
|
if (optionList != null && !optionList.isEmpty()) {
|
||||||
for (int i = 0; i < optionList.size(); i++) {
|
for (int i = 0; i < optionList.size(); i++) {
|
||||||
obtainOptionLayout(radioGroup, i, (String) optionList.get(i), true,measureList.get(position).getId());
|
obtainOptionLayout(radioGroup, i, (String) optionList.get(i), true, measureList.get(position).getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
holder.tvMeasure.setText((position + 1)+"、" + measureList.get(position).getQuestion()+"(多选)");
|
holder.tvMeasure.setText((position + 1) + "、" + measureList.get(position).getQuestion() + "(多选)");
|
||||||
List<?> optionList = measureList.get(position).getOption();
|
List<?> optionList = measureList.get(position).getOption();
|
||||||
if (optionList != null && !optionList.isEmpty()) {
|
if (optionList != null && !optionList.isEmpty()) {
|
||||||
for (int i = 0; i < optionList.size(); i++) {
|
for (int i = 0; i < optionList.size(); i++) {
|
||||||
@@ -78,7 +78,7 @@ public class CapacityMeasureAdapter extends RecyclerView.Adapter<CapacityMeasure
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void obtainOptionLayout(ViewGroup parentLayout, int optionIndex, String option, boolean isSingle, String questionId) {
|
private void obtainOptionLayout(ViewGroup parentLayout, int optionIndex, String option, boolean isSingle, String questionId) {
|
||||||
LinearLayout optionLayer = (LinearLayout) LayoutInflater.from(context).inflate(R.layout.capacity_measure_option, null);
|
LinearLayout optionLayer = (LinearLayout) LayoutInflater.from(context).inflate(R.layout.capacity_measure_option, null);
|
||||||
parentLayout.addView(optionLayer);
|
parentLayout.addView(optionLayer);
|
||||||
RadioButton tvOptionIndex = optionLayer.findViewById(R.id.tv_option_layer_index);
|
RadioButton tvOptionIndex = optionLayer.findViewById(R.id.tv_option_layer_index);
|
||||||
@@ -97,9 +97,7 @@ public class CapacityMeasureAdapter extends RecyclerView.Adapter<CapacityMeasure
|
|||||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
checkedChangeRadioButton(parentLayout, buttonView);
|
checkedChangeRadioButton(parentLayout, buttonView);
|
||||||
|
// Toast.makeText(context, "option" + option, Toast.LENGTH_SHORT).show();
|
||||||
// Toast.makeText(context, "option" + option, Toast.LENGTH_SHORT).show();
|
|
||||||
|
|
||||||
updateCheckedMap(questionId, buttonView, parentLayout);
|
updateCheckedMap(questionId, buttonView, parentLayout);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,11 +109,8 @@ public class CapacityMeasureAdapter extends RecyclerView.Adapter<CapacityMeasure
|
|||||||
updateCheckedMap(questionId, buttonView, parentLayout);
|
updateCheckedMap(questionId, buttonView, parentLayout);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// ImageView ivOption = optionLayer.findViewById(R.id.iv_option_img);
|
||||||
// ImageView ivOption = optionLayer.findViewById(R.id.iv_option_img);
|
|
||||||
|
|
||||||
TextView tvOptionContent = optionLayer.findViewById(R.id.tv_option_content);
|
TextView tvOptionContent = optionLayer.findViewById(R.id.tv_option_content);
|
||||||
|
|
||||||
if (option != null) {
|
if (option != null) {
|
||||||
if (!option.startsWith("http")) {
|
if (!option.startsWith("http")) {
|
||||||
tvOptionContent.setText(option);
|
tvOptionContent.setText(option);
|
||||||
@@ -139,9 +134,7 @@ public class CapacityMeasureAdapter extends RecyclerView.Adapter<CapacityMeasure
|
|||||||
//indent内容
|
//indent内容
|
||||||
private String getOptionIndex(int index) {
|
private String getOptionIndex(int index) {
|
||||||
char A = (char) (65 + index);
|
char A = (char) (65 + index);
|
||||||
return A + ":";
|
return A + ":";
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import android.view.LayoutInflater;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
|
import android.widget.CompoundButton;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
@@ -62,7 +63,7 @@ public class StaySubmitAdapter extends RecyclerView.Adapter<StaySubmitAdapter.Vi
|
|||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
PoiEntity poiEntity = (PoiEntity) iterator.next();
|
PoiEntity poiEntity = (PoiEntity) iterator.next();
|
||||||
if (poiEntity.isChecked()) {
|
if (poiEntity.isChecked()) {
|
||||||
PoiEntityDeleteUtil.getInstance().deleteUtil(context,poiEntity);
|
/*PoiEntityDeleteUtil.getInstance().deleteUtil(context,poiEntity);*/
|
||||||
poiEntity.setTaskStatus(100);
|
poiEntity.setTaskStatus(100);
|
||||||
PoiDatabase.getInstance(context).getPoiDao().updatePoiEntity(poiEntity);
|
PoiDatabase.getInstance(context).getPoiDao().updatePoiEntity(poiEntity);
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
@@ -70,7 +71,6 @@ public class StaySubmitAdapter extends RecyclerView.Adapter<StaySubmitAdapter.Vi
|
|||||||
}
|
}
|
||||||
handler.sendEmptyMessage(0x105);
|
handler.sendEmptyMessage(0x105);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,7 +130,6 @@ public class Constant {
|
|||||||
public static final int EVENT_WHAT_CURRENT_MARKER = 41; // 显示当前正在编辑的POI类型数据的Event的What值
|
public static final int EVENT_WHAT_CURRENT_MARKER = 41; // 显示当前正在编辑的POI类型数据的Event的What值
|
||||||
// CompleteTask
|
// CompleteTask
|
||||||
public static final int EVENT_WHAT_COMPLETE_TASK = 42; // 点击记录跳转开始采集
|
public static final int EVENT_WHAT_COMPLETE_TASK = 42; // 点击记录跳转开始采集
|
||||||
public static final int EVENT_STAY_REFRESH = 44; // 刷新记录页面
|
|
||||||
public static final int EVENT_WORK_HOME = 45; //切换到寻宝
|
public static final int EVENT_WORK_HOME = 45; //切换到寻宝
|
||||||
public static final int REGISTER_WORD = 46; //注册的返回
|
public static final int REGISTER_WORD = 46; //注册的返回
|
||||||
public static final int VIDEO_FINISH_ROAD = 47;//录像视频列表的返回
|
public static final int VIDEO_FINISH_ROAD = 47;//录像视频列表的返回
|
||||||
@@ -166,7 +165,7 @@ public class Constant {
|
|||||||
public static SlidingUpPanelLayout SLIDING_LAYOUT = null;//設置
|
public static SlidingUpPanelLayout SLIDING_LAYOUT = null;//設置
|
||||||
public static boolean IS_FILTER_LIST_ITEM = true;//poi页面的查重
|
public static boolean IS_FILTER_LIST_ITEM = true;//poi页面的查重
|
||||||
public static TencentMap.OnMarkerClickListener markerClickListener = null;
|
public static TencentMap.OnMarkerClickListener markerClickListener = null;
|
||||||
public static final String NAVIN_FO = "11.17";//版本日期
|
public static final String NAVIN_FO = "11.18";//版本日期
|
||||||
|
|
||||||
//marker
|
//marker
|
||||||
public static final BitmapDescriptor MARKER_POI_SHOW = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_show);
|
public static final BitmapDescriptor MARKER_POI_SHOW = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_show);
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ import com.kongzue.dialog.interfaces.OnDialogButtonClickListener;
|
|||||||
import com.kongzue.dialog.util.BaseDialog;
|
import com.kongzue.dialog.util.BaseDialog;
|
||||||
import com.kongzue.dialog.v3.MessageDialog;
|
import com.kongzue.dialog.v3.MessageDialog;
|
||||||
import com.navinfo.outdoor.util.FlushTokenUtil;
|
import com.navinfo.outdoor.util.FlushTokenUtil;
|
||||||
|
import com.navinfo.outdoor.util.TimestampUtil;
|
||||||
|
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
|
|
||||||
@@ -117,7 +118,7 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
capacityMeasureBuilder = new StringBuilder();
|
capacityMeasureBuilder = new StringBuilder();
|
||||||
capacityMeasureBuilder.append("CapacityMeasurementFragment-onCreate-initData ,");
|
capacityMeasureBuilder.append(TimestampUtil.time()).append("CapacityMeasurementFragment-onCreate-initData ,");
|
||||||
if (Constant.USHERED != null) {
|
if (Constant.USHERED != null) {
|
||||||
capacityMeasureBuilder.append("userId:").append(Constant.USHERED).append(",");
|
capacityMeasureBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||||
}
|
}
|
||||||
@@ -189,11 +190,11 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.iv_measurement_finish:
|
case R.id.iv_measurement_finish:
|
||||||
capacityMeasureBuilder.append("点击了返回的按钮 ,");
|
capacityMeasureBuilder.append(TimestampUtil.time()).append("点击了返回的按钮 ,");
|
||||||
Objects.requireNonNull(getActivity()).finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
break;
|
break;
|
||||||
case R.id.btn:
|
case R.id.btn:
|
||||||
capacityMeasureBuilder.append("点击了提交的的按钮 ,");
|
capacityMeasureBuilder.append(TimestampUtil.time()).append("点击了提交的的按钮 ,");
|
||||||
if (baleen.size() != 0) {
|
if (baleen.size() != 0) {
|
||||||
Map<String, String> checkedMap = capacityMeasureAdapter.getCheckedMap();
|
Map<String, String> checkedMap = capacityMeasureAdapter.getCheckedMap();
|
||||||
for (int i = 0; i < baleen.size(); i++) {
|
for (int i = 0; i < baleen.size(); i++) {
|
||||||
@@ -284,19 +285,19 @@ public class CapacityMeasurementFragment extends BaseFragment implements View.On
|
|||||||
@Override
|
@Override
|
||||||
public void onPause() {
|
public void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
capacityMeasureBuilder.append("onPause ,");
|
capacityMeasureBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStop() {
|
public void onStop() {
|
||||||
super.onStop();
|
super.onStop();
|
||||||
capacityMeasureBuilder.append("onStop ,");
|
capacityMeasureBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
capacityMeasureBuilder.append("onDestroy");
|
capacityMeasureBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||||
capacityMeasureBuilder.append("\r\n");
|
capacityMeasureBuilder.append("\r\n");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), capacityMeasureBuilder.toString(), true);
|
FileUtils.writeFile(logFile.getAbsolutePath(), capacityMeasureBuilder.toString(), true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1145,10 +1145,10 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
PoiUploadBean uploadBeanResult = new Gson().fromJson(pileUpLoadResultStr, PoiUploadBean.class);
|
PoiUploadBean uploadBeanResult = new Gson().fromJson(pileUpLoadResultStr, PoiUploadBean.class);
|
||||||
if (uploadBeanResult != null) {
|
if (uploadBeanResult != null) {
|
||||||
if (uploadBeanResult.getCode() == 200) {
|
if (uploadBeanResult.getCode() == 200) {
|
||||||
PoiDatabase.getInstance(getActivity()).getChargingPileDao().deleteChargingPileEntity(chargingPileEntity);
|
/* PoiDatabase.getInstance(getActivity()).getChargingPileDao().deleteChargingPileEntity(chargingPileEntity);
|
||||||
for (int i = 0; i < chargingPileFileList.size(); i++) {
|
for (int i = 0; i < chargingPileFileList.size(); i++) {
|
||||||
chargingPileFileList.get(i).delete();
|
chargingPileFileList.get(i).delete();
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1410,9 +1410,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (taskNameBean.getCode() == 230) {
|
} else if (taskNameBean.getCode() == 230) {
|
||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@@ -1427,10 +1425,10 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
Toast.makeText(getActivity(), taskNameBean.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||||
editNameContent.setTextColor(Color.RED);
|
editNameContent.setTextColor(Color.RED);
|
||||||
btnSaveLocal.setEnabled(false);
|
btnSaveLocal.setEnabled(false);
|
||||||
btnUploading.setEnabled(false);
|
btnUploading.setEnabled(false);
|
||||||
Toast.makeText(getActivity(), taskNameBean.getMessage(), Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -1699,7 +1697,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (showPoiEntity != null) {
|
/* if (showPoiEntity != null) {
|
||||||
List<ChargingPileEntity> chargingPileEntityList = PoiDatabase.getInstance(getActivity()).getChargingPileDao().getChargingPileByStationId(showPoiEntity.getId());
|
List<ChargingPileEntity> chargingPileEntityList = PoiDatabase.getInstance(getActivity()).getChargingPileDao().getChargingPileByStationId(showPoiEntity.getId());
|
||||||
if (chargingPileEntityList != null && !chargingPileEntityList.isEmpty()) {
|
if (chargingPileEntityList != null && !chargingPileEntityList.isEmpty()) {
|
||||||
for (ChargingPileEntity chargingPileEntity : chargingPileEntityList) {
|
for (ChargingPileEntity chargingPileEntity : chargingPileEntityList) {
|
||||||
@@ -1715,12 +1713,12 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
poiEntity.setTaskStatus(100);
|
poiEntity.setTaskStatus(100);
|
||||||
poiDao.updatePoiEntity(poiEntity);
|
poiDao.updatePoiEntity(poiEntity);
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
initList();
|
//initList();
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import com.navinfo.outdoor.http.OkGoBuilder;
|
|||||||
import com.jcodecraeer.xrecyclerview.ProgressStyle;
|
import com.jcodecraeer.xrecyclerview.ProgressStyle;
|
||||||
import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
||||||
import com.navinfo.outdoor.util.FlushTokenUtil;
|
import com.navinfo.outdoor.util.FlushTokenUtil;
|
||||||
|
import com.navinfo.outdoor.util.TimestampUtil;
|
||||||
|
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
@@ -87,7 +88,7 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
eventPrefectureBuilder = new StringBuilder();
|
eventPrefectureBuilder = new StringBuilder();
|
||||||
eventPrefectureBuilder.append("EventPrefectureFragment-onCreate-initData ,");
|
eventPrefectureBuilder.append(TimestampUtil.time()).append("EventPrefectureFragment-onCreate-initData ,");
|
||||||
if (Constant.USHERED != null) {
|
if (Constant.USHERED != null) {
|
||||||
eventPrefectureBuilder.append("userId:").append(Constant.USHERED).append(",");
|
eventPrefectureBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||||
}
|
}
|
||||||
@@ -196,7 +197,7 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
|||||||
eventPrefectureAdapter.setClickItem(new EventPrefectureAdapter.clickItem() {
|
eventPrefectureAdapter.setClickItem(new EventPrefectureAdapter.clickItem() {
|
||||||
@Override
|
@Override
|
||||||
public void item(int aInt) {
|
public void item(int aInt) {
|
||||||
eventPrefectureBuilder.append("点击了item ,");
|
eventPrefectureBuilder.append(TimestampUtil.time()).append("点击了item ,");
|
||||||
HashMap<String, String> paramMap = new HashMap<>();
|
HashMap<String, String> paramMap = new HashMap<>();
|
||||||
paramMap.put("id",aInt+"");
|
paramMap.put("id",aInt+"");
|
||||||
intint2WebActivity(HttpInterface.MSG_CONTENT, paramMap);
|
intint2WebActivity(HttpInterface.MSG_CONTENT, paramMap);
|
||||||
@@ -208,26 +209,26 @@ public class EventPrefectureFragment extends BaseFragment implements View.OnClic
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (v.getId() == R.id.iv_event_task) {
|
if (v.getId() == R.id.iv_event_task) {
|
||||||
Objects.requireNonNull(getActivity()).finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
eventPrefectureBuilder.append("点击了返回的按钮 ,");
|
eventPrefectureBuilder.append(TimestampUtil.time()).append("点击了返回的按钮 ,");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPause() {
|
public void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
eventPrefectureBuilder.append("onPause ,");
|
eventPrefectureBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStop() {
|
public void onStop() {
|
||||||
super.onStop();
|
super.onStop();
|
||||||
eventPrefectureBuilder.append("onStop ,");
|
eventPrefectureBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
eventPrefectureBuilder.append("onDestroy");
|
eventPrefectureBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||||
eventPrefectureBuilder.append("\r\n");
|
eventPrefectureBuilder.append("\r\n");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), eventPrefectureBuilder.toString(), true);
|
FileUtils.writeFile(logFile.getAbsolutePath(), eventPrefectureBuilder.toString(), true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import com.navinfo.outdoor.R;
|
|||||||
import com.navinfo.outdoor.activity.FragmentManagement;
|
import com.navinfo.outdoor.activity.FragmentManagement;
|
||||||
import com.navinfo.outdoor.api.Constant;
|
import com.navinfo.outdoor.api.Constant;
|
||||||
import com.navinfo.outdoor.base.BaseFragment;
|
import com.navinfo.outdoor.base.BaseFragment;
|
||||||
|
import com.navinfo.outdoor.util.TimestampUtil;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
@@ -79,7 +80,7 @@ public class FindFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
findBuilder = new StringBuilder();
|
findBuilder = new StringBuilder();
|
||||||
findBuilder.append("FindFragment-onCreate-initData ,");
|
findBuilder.append(TimestampUtil.time()).append("FindFragment-onCreate-initData ,");
|
||||||
if (Constant.USHERED != null) {
|
if (Constant.USHERED != null) {
|
||||||
findBuilder.append("userId:").append(Constant.USHERED).append(",");
|
findBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||||
}
|
}
|
||||||
@@ -89,25 +90,25 @@ public class FindFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.linear_task_prefecture:
|
case R.id.linear_task_prefecture:
|
||||||
findBuilder.append("点击了最新公告:任务专区 跳转 ,");
|
findBuilder.append(TimestampUtil.time()).append("点击了最新公告:任务专区 跳转 ,");
|
||||||
Intent prefectureIntent = new Intent(getActivity(), FragmentManagement.class);
|
Intent prefectureIntent = new Intent(getActivity(), FragmentManagement.class);
|
||||||
prefectureIntent.putExtra("tag", 7);
|
prefectureIntent.putExtra("tag", 7);
|
||||||
startActivity(prefectureIntent);
|
startActivity(prefectureIntent);
|
||||||
break;
|
break;
|
||||||
case R.id.linear_task_explain:
|
case R.id.linear_task_explain:
|
||||||
findBuilder.append("点击了帮助中心:任务说明 跳转 ,");
|
findBuilder.append(TimestampUtil.time()).append("点击了帮助中心:任务说明 跳转 ,");
|
||||||
Intent explainIntent = new Intent(getActivity(), FragmentManagement.class);
|
Intent explainIntent = new Intent(getActivity(), FragmentManagement.class);
|
||||||
explainIntent.putExtra("tag", 8);
|
explainIntent.putExtra("tag", 8);
|
||||||
startActivity(explainIntent);
|
startActivity(explainIntent);
|
||||||
break;
|
break;
|
||||||
case R.id.linear_event_prefecture:
|
case R.id.linear_event_prefecture:
|
||||||
findBuilder.append("点击了最新公告:活动专区 跳转 ,");
|
findBuilder.append(TimestampUtil.time()).append("点击了最新公告:活动专区 跳转 ,");
|
||||||
Intent eventIntent = new Intent(getActivity(), FragmentManagement.class);
|
Intent eventIntent = new Intent(getActivity(), FragmentManagement.class);
|
||||||
eventIntent.putExtra("tag", 9);
|
eventIntent.putExtra("tag", 9);
|
||||||
startActivity(eventIntent);
|
startActivity(eventIntent);
|
||||||
break;
|
break;
|
||||||
case R.id.linear_end:
|
case R.id.linear_end:
|
||||||
findBuilder.append("点击了帮助中心:能力测评 ,");
|
findBuilder.append(TimestampUtil.time()).append("点击了帮助中心:能力测评 ,");
|
||||||
Toast.makeText(getContext(), "该功能以后上新,敬请期待", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), "该功能以后上新,敬请期待", Toast.LENGTH_SHORT).show();
|
||||||
/*Intent endIntent = new Intent(getActivity(), FragmentManagement.class);
|
/*Intent endIntent = new Intent(getActivity(), FragmentManagement.class);
|
||||||
endIntent.putExtra("tag", 11);
|
endIntent.putExtra("tag", 11);
|
||||||
@@ -119,19 +120,19 @@ public class FindFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
@Override
|
@Override
|
||||||
public void onPause() {
|
public void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
findBuilder.append("onPause ,");
|
findBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStop() {
|
public void onStop() {
|
||||||
super.onStop();
|
super.onStop();
|
||||||
findBuilder.append("onStop ,");
|
findBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
findBuilder.append("onDestroy");
|
findBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||||
findBuilder.append("\r\n");
|
findBuilder.append("\r\n");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), findBuilder.toString(), true);
|
FileUtils.writeFile(logFile.getAbsolutePath(), findBuilder.toString(), true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ import com.navinfo.outdoor.room.PoiEntity;
|
|||||||
import com.navinfo.outdoor.util.FlushTokenUtil;
|
import com.navinfo.outdoor.util.FlushTokenUtil;
|
||||||
import com.navinfo.outdoor.util.Geohash;
|
import com.navinfo.outdoor.util.Geohash;
|
||||||
import com.navinfo.outdoor.util.GeometryTools;
|
import com.navinfo.outdoor.util.GeometryTools;
|
||||||
|
import com.navinfo.outdoor.util.TimestampUtil;
|
||||||
import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
||||||
import com.vividsolutions.jts.geom.Geometry;
|
import com.vividsolutions.jts.geom.Geometry;
|
||||||
|
|
||||||
@@ -92,7 +93,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
gatherGetBuilder = new StringBuilder();
|
gatherGetBuilder = new StringBuilder();
|
||||||
gatherGetBuilder.append("GatherGetFragment-onCreate-initData ,");
|
gatherGetBuilder.append(TimestampUtil.time()).append("GatherGetFragment-onCreate-initData ,");
|
||||||
if (Constant.USHERED != null) {
|
if (Constant.USHERED != null) {
|
||||||
gatherGetBuilder.append("userId:").append(Constant.USHERED).append(",");
|
gatherGetBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||||
}
|
}
|
||||||
@@ -235,7 +236,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.btn_delete:
|
case R.id.btn_delete:
|
||||||
gatherGetBuilder.append("点击了返回的按钮 ,");
|
gatherGetBuilder.append(TimestampUtil.time()).append("点击了返回的按钮 ,");
|
||||||
assert getArguments() != null;
|
assert getArguments() != null;
|
||||||
boolean aBoolean = getArguments().getBoolean("boolean", false);
|
boolean aBoolean = getArguments().getBoolean("boolean", false);
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
@@ -248,13 +249,13 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
EventBus.getDefault().post(obtains);
|
EventBus.getDefault().post(obtains);
|
||||||
break;
|
break;
|
||||||
case R.id.btn_cancel_get://结束领取
|
case R.id.btn_cancel_get://结束领取
|
||||||
gatherGetBuilder.append("点击了结束领取的按钮 ,");
|
gatherGetBuilder.append(TimestampUtil.time()).append("点击了结束领取的按钮 ,");
|
||||||
if (poiEntity != null) {
|
if (poiEntity != null) {
|
||||||
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, poiEntity);
|
initEndReceiveTask(HttpInterface.UNRECEIVED_POLYGON_TASK, poiEntity);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case R.id.btn_get_task://领取任务
|
case R.id.btn_get_task://领取任务
|
||||||
gatherGetBuilder.append("点击了领取任务的按钮 ,");
|
gatherGetBuilder.append(TimestampUtil.time()).append("点击了领取任务的按钮 ,");
|
||||||
if (poiEntity != null) {
|
if (poiEntity != null) {
|
||||||
int type = poiEntity.getType();
|
int type = poiEntity.getType();
|
||||||
if (type == 6) {//面状任务的领取类型
|
if (type == 6) {//面状任务的领取类型
|
||||||
@@ -273,7 +274,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case R.id.btn_gather://立即采集
|
case R.id.btn_gather://立即采集
|
||||||
gatherGetBuilder.append("点击了立即采集的按钮 ,");
|
gatherGetBuilder.append(TimestampUtil.time()).append("点击了立即采集的按钮 ,");
|
||||||
//如果是领取的任务或者是新得任务就只能在当前用户位置方圆5000以内才可以使用
|
//如果是领取的任务或者是新得任务就只能在当前用户位置方圆5000以内才可以使用
|
||||||
if (poiEntity.getTaskStatus() < 2) {
|
if (poiEntity.getTaskStatus() < 2) {
|
||||||
double latitude = Constant.currentLocation.getLatitude();
|
double latitude = Constant.currentLocation.getLatitude();
|
||||||
@@ -303,7 +304,7 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case R.id.btn_finish_gather://结束采集
|
case R.id.btn_finish_gather://结束采集
|
||||||
gatherGetBuilder.append("点击了结束采集的按钮 ,");
|
gatherGetBuilder.append(TimestampUtil.time()).append("点击了结束采集的按钮 ,");
|
||||||
if (poiEntity != null) {
|
if (poiEntity != null) {
|
||||||
int type = poiEntity.getType();
|
int type = poiEntity.getType();
|
||||||
if (type == 6) {
|
if (type == 6) {
|
||||||
@@ -628,9 +629,9 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
public void run() {
|
public void run() {
|
||||||
poiEntity.setTaskStatus(100);
|
poiEntity.setTaskStatus(100);
|
||||||
poiDao.updatePoiEntity(poiEntity);
|
poiDao.updatePoiEntity(poiEntity);
|
||||||
if (poiEntity.getType() == 2) {
|
/* if (poiEntity.getType() == 2) {
|
||||||
chargingPileDao.deleteChargingFidPileEntity(poiEntity.getId());
|
chargingPileDao.deleteChargingFidPileEntity(poiEntity.getId());
|
||||||
}
|
}*/
|
||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@@ -1082,19 +1083,19 @@ public class GatherGetFragment extends BaseFragment implements View.OnClickListe
|
|||||||
@Override
|
@Override
|
||||||
public void onPause() {
|
public void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
gatherGetBuilder.append("onPause ,");
|
gatherGetBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStop() {
|
public void onStop() {
|
||||||
super.onStop();
|
super.onStop();
|
||||||
gatherGetBuilder.append("onStop ,");
|
gatherGetBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
gatherGetBuilder.append("onDestroy");
|
gatherGetBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||||
gatherGetBuilder.append("\r\n");
|
gatherGetBuilder.append("\r\n");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), gatherGetBuilder.toString(), true);
|
FileUtils.writeFile(logFile.getAbsolutePath(), gatherGetBuilder.toString(), true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -375,19 +375,19 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
|
|||||||
@Override
|
@Override
|
||||||
public void onPause() {
|
public void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
gatheringBuilder.append("onPause ,");
|
gatheringBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStop() {
|
public void onStop() {
|
||||||
super.onStop();
|
super.onStop();
|
||||||
gatheringBuilder.append("onStop ,");
|
gatheringBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
gatheringBuilder.append("onDestroy");
|
gatheringBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||||
gatheringBuilder.append("\r\n");
|
gatheringBuilder.append("\r\n");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), gatheringBuilder.toString(), true);
|
FileUtils.writeFile(logFile.getAbsolutePath(), gatheringBuilder.toString(), true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,21 +49,7 @@ import java.util.Objects;
|
|||||||
* 记录-已提交
|
* 记录-已提交
|
||||||
*/
|
*/
|
||||||
public class HasSubmitFragment extends BaseFragment implements View.OnClickListener {
|
public class HasSubmitFragment extends BaseFragment implements View.OnClickListener {
|
||||||
private TextView auditProcess;
|
private TextView auditProcess, auditThrough, auditNotThrough, chargingAuditProcess, chargingAuditThrough, chargingAuditNotThrough, roadAuditProcess, roadAuditThrough, roadAuditNotThrough, otherAuditProcess, otherAuditThrough, otherAuditNotThrough, poiVideoAuditProcess, poiVideoAuditThrough, poiVideoAuditProcessAbleNotThrough;
|
||||||
private TextView auditThrough;
|
|
||||||
private TextView auditNotThrough;
|
|
||||||
private TextView chargingAuditProcess;
|
|
||||||
private TextView chargingAuditThrough;
|
|
||||||
private TextView chargingAuditNotThrough;
|
|
||||||
private TextView roadAuditProcess;
|
|
||||||
private TextView roadAuditThrough;
|
|
||||||
private TextView roadAuditNotThrough;
|
|
||||||
private TextView otherAuditProcess;
|
|
||||||
private TextView otherAuditThrough;
|
|
||||||
private TextView otherAuditNotThrough;
|
|
||||||
private TextView poiVideoAuditProcess;
|
|
||||||
private TextView poiVideoAuditThrough;
|
|
||||||
private TextView poiVideoAuditProcessAbleNotThrough;
|
|
||||||
private StringBuilder hasSubmitBuilder;
|
private StringBuilder hasSubmitBuilder;
|
||||||
private File logFile;
|
private File logFile;
|
||||||
private HasSubmitBean.BodyBean hasSubmitBeanBody;
|
private HasSubmitBean.BodyBean hasSubmitBeanBody;
|
||||||
@@ -114,6 +100,11 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
poiVideoAuditProcess = findViewById(R.id.poiVideo_audit_process);
|
poiVideoAuditProcess = findViewById(R.id.poiVideo_audit_process);
|
||||||
poiVideoAuditThrough = findViewById(R.id.poiVideo_audit_through);
|
poiVideoAuditThrough = findViewById(R.id.poiVideo_audit_through);
|
||||||
poiVideoAuditProcessAbleNotThrough = findViewById(R.id.poiVideo_audit_process_audit_not_through);
|
poiVideoAuditProcessAbleNotThrough = findViewById(R.id.poiVideo_audit_process_audit_not_through);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResume() {
|
||||||
|
super.onResume();
|
||||||
initRequest();
|
initRequest();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -249,7 +240,6 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
} else if (hasSubmitBean.getCode() == 230) {
|
} else if (hasSubmitBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@@ -267,7 +257,6 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
|
|
||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@@ -277,8 +266,6 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@@ -326,7 +313,6 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
} else if (hasSubmitBean.getCode() == 230) {
|
} else if (hasSubmitBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@@ -337,14 +323,12 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
|
|
||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@@ -362,7 +346,6 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -474,7 +457,6 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} else if (hasSubmitBean.getCode() == 230) {
|
} else if (hasSubmitBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
@@ -487,10 +469,8 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
@@ -505,7 +485,6 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (getActivity() != null) {
|
if (getActivity() != null) {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@@ -515,7 +494,6 @@ public class HasSubmitFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -59,6 +59,9 @@ public class IssueFragment extends BaseFragment implements View.OnClickListener
|
|||||||
protected void initData() {
|
protected void initData() {
|
||||||
super.initData();
|
super.initData();
|
||||||
initNetWork(true);
|
initNetWork(true);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initNetWork(boolean b) {
|
private void initNetWork(boolean b) {
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
mainBuilder = new StringBuilder();
|
mainBuilder = new StringBuilder();
|
||||||
mainBuilder.append(TimestampUtil.time()).append(TimestampUtil.time()).append("MineFragment-onCreate-initData ,");
|
mainBuilder.append(TimestampUtil.time()).append("MineFragment-onCreate-initData ,");
|
||||||
if (Constant.USHERED != null) {
|
if (Constant.USHERED != null) {
|
||||||
mainBuilder.append("userId:").append(Constant.USHERED).append(",");
|
mainBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -894,7 +894,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
|
|||||||
poiDao.updatePoiEntity(poiEntity);
|
poiDao.updatePoiEntity(poiEntity);
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
initList();
|
//initList();
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
package com.navinfo.outdoor.fragment;
|
package com.navinfo.outdoor.fragment;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
@@ -15,6 +18,7 @@ import androidx.recyclerview.widget.GridLayoutManager;
|
|||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.github.lazylibrary.util.FileUtils;
|
||||||
import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
||||||
import com.navinfo.outdoor.R;
|
import com.navinfo.outdoor.R;
|
||||||
import com.navinfo.outdoor.adapter.PhotoAdapter;
|
import com.navinfo.outdoor.adapter.PhotoAdapter;
|
||||||
@@ -23,15 +27,19 @@ import com.navinfo.outdoor.base.BaseFragment;
|
|||||||
import com.navinfo.outdoor.bean.FileBean;
|
import com.navinfo.outdoor.bean.FileBean;
|
||||||
import com.navinfo.outdoor.room.PoiEntity;
|
import com.navinfo.outdoor.room.PoiEntity;
|
||||||
import com.navinfo.outdoor.util.AWMp4ParserHelper;
|
import com.navinfo.outdoor.util.AWMp4ParserHelper;
|
||||||
|
import com.navinfo.outdoor.util.TimestampUtil;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@@ -42,6 +50,8 @@ public class PhotoFragment extends BaseFragment implements View.OnClickListener
|
|||||||
private ArrayList<FileBean> fileBeans;
|
private ArrayList<FileBean> fileBeans;
|
||||||
private ArrayList<FileBean> deleteFiles;
|
private ArrayList<FileBean> deleteFiles;
|
||||||
private PhotoAdapter photoAdapter;
|
private PhotoAdapter photoAdapter;
|
||||||
|
private File logFile;
|
||||||
|
private StringBuilder photoBuilder;
|
||||||
|
|
||||||
public static PhotoFragment newInstance(Bundle bundle) {
|
public static PhotoFragment newInstance(Bundle bundle) {
|
||||||
PhotoFragment fragment = new PhotoFragment();
|
PhotoFragment fragment = new PhotoFragment();
|
||||||
@@ -144,6 +154,7 @@ public class PhotoFragment extends BaseFragment implements View.OnClickListener
|
|||||||
photoAdapter.setPhotoClickItem(new PhotoAdapter.photoClickItem() {
|
photoAdapter.setPhotoClickItem(new PhotoAdapter.photoClickItem() {
|
||||||
@Override
|
@Override
|
||||||
public void item(boolean isChecked, FileBean fileBean) {
|
public void item(boolean isChecked, FileBean fileBean) {
|
||||||
|
photoBuilder.append(TimestampUtil.time()).append("图片页面点击了item ,");
|
||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
deleteFiles.add(fileBean);
|
deleteFiles.add(fileBean);
|
||||||
} else {
|
} else {
|
||||||
@@ -162,6 +173,28 @@ public class PhotoFragment extends BaseFragment implements View.OnClickListener
|
|||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
super.initData();
|
super.initData();
|
||||||
|
SharedPreferences sharedPreferences = Objects.requireNonNull(getActivity()).getSharedPreferences(Constant.MESSAGE_TYPE, Context.MODE_PRIVATE);
|
||||||
|
SharedPreferences.Editor sharedEdit = sharedPreferences.edit();
|
||||||
|
@SuppressLint("SimpleDateFormat")
|
||||||
|
DateFormat formatter = new SimpleDateFormat("yyyyMMdd");
|
||||||
|
String newFormat = formatter.format(new Date(System.currentTimeMillis()));
|
||||||
|
String pictures_time = sharedPreferences.getString("pictures_time", null);
|
||||||
|
if (pictures_time == null) {
|
||||||
|
sharedEdit.putString("pictures_time", newFormat);
|
||||||
|
sharedEdit.apply();
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||||
|
} else {
|
||||||
|
if (pictures_time.equals(newFormat)) {
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + pictures_time + ".txt");
|
||||||
|
} else {
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
photoBuilder = new StringBuilder();
|
||||||
|
photoBuilder.append(TimestampUtil.time()).append("PhotoActivity-onCreate-initData ,");
|
||||||
|
if (Constant.USHERED != null) {
|
||||||
|
photoBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -174,12 +207,14 @@ public class PhotoFragment extends BaseFragment implements View.OnClickListener
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.iv_photo_final:
|
case R.id.iv_photo_final:
|
||||||
|
photoBuilder.append(TimestampUtil.time()).append("图片点击了返回 ,");
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = Constant.PHOTO_FINISH_VIDEO;
|
message.what = Constant.PHOTO_FINISH_VIDEO;
|
||||||
EventBus.getDefault().post(message);
|
EventBus.getDefault().post(message);
|
||||||
Objects.requireNonNull(getActivity()).finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
break;
|
break;
|
||||||
case R.id.tv_photo_album_delete:
|
case R.id.tv_photo_album_delete:
|
||||||
|
photoBuilder.append(TimestampUtil.time()).append("图片页面点击了删除 ,");
|
||||||
if (fileBeans != null) {
|
if (fileBeans != null) {
|
||||||
for (int i = 0; i < fileBeans.size(); i++) {
|
for (int i = 0; i < fileBeans.size(); i++) {
|
||||||
photoAdapter.deleteFile(fileBeans.get(i));
|
photoAdapter.deleteFile(fileBeans.get(i));
|
||||||
@@ -191,11 +226,26 @@ public class PhotoFragment extends BaseFragment implements View.OnClickListener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStop() {
|
||||||
|
super.onStop();
|
||||||
|
photoBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPause() {
|
||||||
|
super.onPause();
|
||||||
|
photoBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
if (EventBus.getDefault().isRegistered(this))//加上判断
|
if (EventBus.getDefault().isRegistered(this))//加上判断
|
||||||
EventBus.getDefault().unregister(this);
|
EventBus.getDefault().unregister(this);
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
|
photoBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||||
|
photoBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), photoBuilder.toString(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -887,10 +887,11 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
Toast.makeText(getActivity(), taskNameBean.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||||
btnUploading.setEnabled(false);
|
btnUploading.setEnabled(false);
|
||||||
btnSaveLocal.setEnabled(false);
|
btnSaveLocal.setEnabled(false);
|
||||||
editNameContent.setTextColor(Color.RED);
|
editNameContent.setTextColor(Color.RED);
|
||||||
Toast.makeText(getActivity(), taskNameBean.getMessage(), Toast.LENGTH_SHORT).show();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -1270,7 +1271,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
if (markerPoi != null) {
|
if (markerPoi != null) {
|
||||||
markerPoi.remove();
|
markerPoi.remove();
|
||||||
}
|
}
|
||||||
poiBuilder.append(TimestampUtil.time()).append("onDestroy ");
|
poiBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||||
poiBuilder.append("\r\n");
|
poiBuilder.append("\r\n");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), poiBuilder.toString(), true);
|
FileUtils.writeFile(logFile.getAbsolutePath(), poiBuilder.toString(), true);
|
||||||
}
|
}
|
||||||
@@ -1303,7 +1304,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
|||||||
poiDao.updatePoiEntity(poiEntity);
|
poiDao.updatePoiEntity(poiEntity);
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
initList();
|
//initList();
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
package com.navinfo.outdoor.fragment;
|
package com.navinfo.outdoor.fragment;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -12,6 +15,7 @@ import android.widget.Toast;
|
|||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
|
import com.github.lazylibrary.util.FileUtils;
|
||||||
import com.jcodecraeer.xrecyclerview.ArrowRefreshHeader;
|
import com.jcodecraeer.xrecyclerview.ArrowRefreshHeader;
|
||||||
import com.jcodecraeer.xrecyclerview.ProgressStyle;
|
import com.jcodecraeer.xrecyclerview.ProgressStyle;
|
||||||
import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
||||||
@@ -27,9 +31,14 @@ import com.navinfo.outdoor.http.Callback;
|
|||||||
import com.navinfo.outdoor.http.HttpInterface;
|
import com.navinfo.outdoor.http.HttpInterface;
|
||||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||||
import com.navinfo.outdoor.util.FlushTokenUtil;
|
import com.navinfo.outdoor.util.FlushTokenUtil;
|
||||||
|
import com.navinfo.outdoor.util.TimestampUtil;
|
||||||
import com.umeng.commonsdk.debug.D;
|
import com.umeng.commonsdk.debug.D;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@@ -42,6 +51,8 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
|||||||
private PoiTaskAdapter poiTaskAdapter;
|
private PoiTaskAdapter poiTaskAdapter;
|
||||||
private int page = 1;
|
private int page = 1;
|
||||||
private List<HasSubmitBean.BodyBean.ListBean> listBeans;
|
private List<HasSubmitBean.BodyBean.ListBean> listBeans;
|
||||||
|
private File logFile;
|
||||||
|
private StringBuilder poiTaskBuilder;
|
||||||
|
|
||||||
public static PoiTaskFragment newInstance(Bundle bundle) {
|
public static PoiTaskFragment newInstance(Bundle bundle) {
|
||||||
PoiTaskFragment fragment = new PoiTaskFragment();
|
PoiTaskFragment fragment = new PoiTaskFragment();
|
||||||
@@ -101,6 +112,29 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
|||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
super.initData();
|
super.initData();
|
||||||
|
SharedPreferences sharedPreferences = Objects.requireNonNull(getActivity()).getSharedPreferences(Constant.MESSAGE_TYPE, Context.MODE_PRIVATE);
|
||||||
|
SharedPreferences.Editor sharedEdit = sharedPreferences.edit();
|
||||||
|
@SuppressLint("SimpleDateFormat")
|
||||||
|
DateFormat formatter = new SimpleDateFormat("yyyyMMdd");
|
||||||
|
String newFormat = formatter.format(new Date(System.currentTimeMillis()));
|
||||||
|
String pictures_time = sharedPreferences.getString("pictures_time", null);
|
||||||
|
if (pictures_time == null) {
|
||||||
|
sharedEdit.putString("pictures_time", newFormat);
|
||||||
|
sharedEdit.apply();
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||||
|
} else {
|
||||||
|
if (pictures_time.equals(newFormat)) {
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + pictures_time + ".txt");
|
||||||
|
} else {
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
poiTaskBuilder = new StringBuilder();
|
||||||
|
poiTaskBuilder.append(TimestampUtil.time()).append("PoiTaskFragment-onCreate-initData ,");
|
||||||
|
if (Constant.USHERED != null) {
|
||||||
|
poiTaskBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||||
|
}
|
||||||
|
|
||||||
assert getArguments() != null;
|
assert getArguments() != null;
|
||||||
type = getArguments().getInt("type", 0);
|
type = getArguments().getInt("type", 0);
|
||||||
listBeans = new ArrayList<>();
|
listBeans = new ArrayList<>();
|
||||||
@@ -187,6 +221,27 @@ public class PoiTaskFragment extends BaseFragment implements View.OnClickListene
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (v.getId() == R.id.iv_poiTask_finish) {
|
if (v.getId() == R.id.iv_poiTask_finish) {
|
||||||
Objects.requireNonNull(getActivity()).finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
|
poiTaskBuilder.append(TimestampUtil.time()).append("点击返回按钮 ,");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPause() {
|
||||||
|
super.onPause();
|
||||||
|
poiTaskBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStop() {
|
||||||
|
super.onStop();
|
||||||
|
poiTaskBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
poiTaskBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||||
|
poiTaskBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), poiTaskBuilder.toString(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -82,18 +82,15 @@ import java.util.Objects;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClickListener {
|
public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClickListener {
|
||||||
private EditText etRoadName;
|
private EditText etRoadName,etDesc;
|
||||||
private ImageView ivPoiVideoPicture;
|
private ImageView ivPoiVideoPicture;
|
||||||
private EditText etDesc;
|
|
||||||
private Button btnRoadSave;
|
private Button btnRoadSave;
|
||||||
private PoiDao poiDao;
|
private PoiDao poiDao;
|
||||||
private File fileZip;
|
private File fileZip,logFile;
|
||||||
private FrameLayout fmPoiVideoPic;
|
private FrameLayout fmPoiVideoPic;
|
||||||
private LatLng latLng;
|
private LatLng latLng;
|
||||||
private Marker markerPoiVideo;
|
private Marker markerPoiVideo;
|
||||||
private TextView tvCombo;
|
private TextView tvCombo,tvShort;
|
||||||
private TextView tvShort;
|
|
||||||
private File logFile;
|
|
||||||
private StringBuilder poiVideoBuilder;
|
private StringBuilder poiVideoBuilder;
|
||||||
private LatLng rearLatLng;
|
private LatLng rearLatLng;
|
||||||
|
|
||||||
@@ -232,6 +229,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
|
poiVideoBuilder.append(TimestampUtil.time()).append("点击了长按删除图片的 按钮,");
|
||||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
||||||
for (int i = 0; i < fileListByUUID.size(); i++) {
|
for (int i = 0; i < fileListByUUID.size(); i++) {
|
||||||
fileListByUUID.get(i).delete();
|
fileListByUUID.get(i).delete();
|
||||||
@@ -418,12 +416,12 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
case R.id.fm_poi_video_picture:
|
case R.id.fm_poi_video_picture:
|
||||||
poiVideoBuilder.append(TimestampUtil.time()).append("点击了图片查看列表 ,");
|
poiVideoBuilder.append(TimestampUtil.time()).append("点击了图片查看列表 ,");
|
||||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
||||||
if (fileListByUUID.size()>1){
|
if (fileListByUUID.size() > 1) {
|
||||||
Intent photoAlbumIntent = new Intent(getActivity(), FragmentManagement.class);
|
Intent photoAlbumIntent = new Intent(getActivity(), FragmentManagement.class);
|
||||||
photoAlbumIntent.putExtra("tag", 36);
|
photoAlbumIntent.putExtra("tag", 36);
|
||||||
photoAlbumIntent.putExtra("showPoiEntity", showPoiEntity);
|
photoAlbumIntent.putExtra("showPoiEntity", showPoiEntity);
|
||||||
startActivity(photoAlbumIntent);
|
startActivity(photoAlbumIntent);
|
||||||
}else {
|
} else {
|
||||||
Toast.makeText(getContext(), "请拍摄", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), "请拍摄", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -670,8 +668,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
} else {
|
} else {
|
||||||
|
if (getActivity() != null) {
|
||||||
if (getActivity()!=null){
|
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@@ -683,7 +680,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
} else if (poiVideoBean.getCode() == 230) {
|
} else if (poiVideoBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
if (getActivity()!=null){
|
if (getActivity() != null) {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@@ -691,7 +688,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -701,7 +697,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
if (getActivity()!=null){
|
if (getActivity() != null) {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@@ -709,10 +705,8 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
if (getActivity() != null) {
|
||||||
if (getActivity()!=null){
|
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@@ -751,9 +745,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
initPoiVideoSharePre();
|
initPoiVideoSharePre();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* 防止程序崩溃后数据丢失*/
|
||||||
* 防止程序崩溃后数据丢失
|
|
||||||
*/
|
|
||||||
public void initPoiVideoSharePre() {
|
public void initPoiVideoSharePre() {
|
||||||
//获取SharedPreferences对象,方法中两个参数的意思为:第一个name
|
//获取SharedPreferences对象,方法中两个参数的意思为:第一个name
|
||||||
//表示文件名,系统将会在/dada/dada/包名/shared_prefs目录下生成
|
//表示文件名,系统将会在/dada/dada/包名/shared_prefs目录下生成
|
||||||
@@ -824,14 +816,14 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
poiDao.updatePoiEntity(poiEntity);
|
poiDao.updatePoiEntity(poiEntity);
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
if (poiEntity.getId() != null) {
|
/*if (poiEntity.getId() != null) {
|
||||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(poiEntity.getId());
|
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(poiEntity.getId());
|
||||||
for (int i = 0; i < fileListByUUID.size(); i++) {
|
for (int i = 0; i < fileListByUUID.size(); i++) {
|
||||||
fileListByUUID.get(i).delete();
|
fileListByUUID.get(i).delete();
|
||||||
}
|
}
|
||||||
File filePath = AWMp4ParserHelper.getInstance().getFilePath(poiEntity.getId());
|
File filePath = AWMp4ParserHelper.getInstance().getFilePath(poiEntity.getId());
|
||||||
filePath.delete();
|
filePath.delete();
|
||||||
}
|
}*/
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
@@ -847,7 +839,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -857,22 +848,23 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
if (getActivity()!=null){
|
if (getActivity() != null) {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (getActivity()!=null){
|
if (getActivity() != null) {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
});}
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ public class RecordFragment extends BaseFragment {
|
|||||||
if (tab.getPosition()==0){
|
if (tab.getPosition()==0){
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
obtain.what = Constant.STAY_SUBMIT_ITEM;
|
obtain.what = Constant.STAY_SUBMIT_ITEM;
|
||||||
obtain.obj = true;
|
obtain.obj=true;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
}else if (tab.getPosition()==1){
|
}else if (tab.getPosition()==1){
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
@@ -90,7 +90,6 @@ public class RecordFragment extends BaseFragment {
|
|||||||
@Override
|
@Override
|
||||||
public void onTabReselected(TabLayout.Tab tab) { }
|
public void onTabReselected(TabLayout.Tab tab) { }
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -31,6 +31,7 @@ import com.navinfo.outdoor.http.OkGoBuilder;
|
|||||||
import com.navinfo.outdoor.util.Base64;
|
import com.navinfo.outdoor.util.Base64;
|
||||||
import com.navinfo.outdoor.util.Md5Util;
|
import com.navinfo.outdoor.util.Md5Util;
|
||||||
import com.navinfo.outdoor.util.RegexUtil;
|
import com.navinfo.outdoor.util.RegexUtil;
|
||||||
|
import com.navinfo.outdoor.util.TimestampUtil;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
|
|
||||||
@@ -108,7 +109,7 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
registerBuilder = new StringBuilder();
|
registerBuilder = new StringBuilder();
|
||||||
registerBuilder.append("RegisterFragment-onViewCreated-initData,");
|
registerBuilder.append(TimestampUtil.time()).append("RegisterFragment-onViewCreated-initData,");
|
||||||
if (Constant.USHERED != null) {
|
if (Constant.USHERED != null) {
|
||||||
registerBuilder.append("userId:").append(Constant.USHERED).append(",");
|
registerBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||||
}
|
}
|
||||||
@@ -118,20 +119,20 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.iv_register_finish:
|
case R.id.iv_register_finish:
|
||||||
registerBuilder.append("注册点击了返回,");
|
registerBuilder.append(TimestampUtil.time()).append("注册点击了返回,");
|
||||||
Objects.requireNonNull(getActivity()).finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
break;
|
break;
|
||||||
case R.id.have_go_login:
|
case R.id.have_go_login:
|
||||||
registerBuilder.append("点击了已有账号,去登录,");
|
registerBuilder.append(TimestampUtil.time()).append("点击了已有账号,去登录,");
|
||||||
Intent registerLogin = new Intent(getActivity(), LoginActivity.class);
|
Intent registerLogin = new Intent(getActivity(), LoginActivity.class);
|
||||||
startActivity(registerLogin);
|
startActivity(registerLogin);
|
||||||
break;
|
break;
|
||||||
case R.id.btn_register:
|
case R.id.btn_register:
|
||||||
registerBuilder.append("点击了注册,");
|
registerBuilder.append(TimestampUtil.time()).append("点击了注册,");
|
||||||
initRegister();
|
initRegister();
|
||||||
break;
|
break;
|
||||||
case R.id.register_get_note:
|
case R.id.register_get_note:
|
||||||
registerBuilder.append("点击了获取短信验证码,");
|
registerBuilder.append(TimestampUtil.time()).append("点击了获取短信验证码,");
|
||||||
if (!RegexUtil.isPhone(etRegisterPhone.getText().toString())) {
|
if (!RegexUtil.isPhone(etRegisterPhone.getText().toString())) {
|
||||||
Toast.makeText(getActivity(), "手机号错误,请重新输入", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "手机号错误,请重新输入", Toast.LENGTH_SHORT).show();
|
||||||
return;
|
return;
|
||||||
@@ -309,19 +310,19 @@ public class RegisterFragment extends BaseFragment implements View.OnClickListen
|
|||||||
public void onPause() {
|
public void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
|
|
||||||
registerBuilder.append("onPause ,");
|
registerBuilder.append(TimestampUtil.time()).append("onPause ,");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStop() {
|
public void onStop() {
|
||||||
super.onStop();
|
super.onStop();
|
||||||
registerBuilder.append("onStop ,");
|
registerBuilder.append(TimestampUtil.time()).append("onStop ,");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
registerBuilder.append("onDestroy");
|
registerBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||||
registerBuilder.append("\r\n");
|
registerBuilder.append("\r\n");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), registerBuilder.toString(), true);
|
FileUtils.writeFile(logFile.getAbsolutePath(), registerBuilder.toString(), true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -437,12 +437,12 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
case R.id.fm_road_picture:
|
case R.id.fm_road_picture:
|
||||||
roadBuilder.append(TimestampUtil.time()).append("点击了图片查看列表 ,");
|
roadBuilder.append(TimestampUtil.time()).append("点击了图片查看列表 ,");
|
||||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
||||||
if (fileListByUUID.size()>1){
|
if (fileListByUUID.size() > 1) {
|
||||||
Intent photoAlbumIntent = new Intent(getActivity(), FragmentManagement.class);
|
Intent photoAlbumIntent = new Intent(getActivity(), FragmentManagement.class);
|
||||||
photoAlbumIntent.putExtra("tag", 36);
|
photoAlbumIntent.putExtra("tag", 36);
|
||||||
photoAlbumIntent.putExtra("showPoiEntity", showPoiEntity);
|
photoAlbumIntent.putExtra("showPoiEntity", showPoiEntity);
|
||||||
startActivity(photoAlbumIntent);
|
startActivity(photoAlbumIntent);
|
||||||
}else {
|
} else {
|
||||||
Toast.makeText(getContext(), "请拍摄", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getContext(), "请拍摄", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -662,24 +662,26 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
} else {
|
} else {
|
||||||
if (getActivity()!=null){
|
if (getActivity() != null) {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Toast.makeText(getActivity(),roadSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), roadSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
});}
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (roadSaveBean.getCode() == 230) {
|
} else if (roadSaveBean.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
if (getActivity()!=null){
|
if (getActivity() != null) {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Toast.makeText(getActivity(),roadSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), roadSaveBean.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
});}
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -689,21 +691,23 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
if (getActivity()!=null){
|
if (getActivity() != null) {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Toast.makeText(getActivity(),"请求超时", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
});}
|
});
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (getActivity()!=null){
|
if (getActivity() != null) {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Toast.makeText(getActivity(),message, Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
});}
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -808,14 +812,14 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
poiDao.updatePoiEntity(poiEntity);
|
poiDao.updatePoiEntity(poiEntity);
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
if (poiEntity.getId() != null) {
|
/*if (poiEntity.getId() != null) {
|
||||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(poiEntity.getId());
|
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(poiEntity.getId());
|
||||||
for (int i = 0; i < fileListByUUID.size(); i++) {
|
for (int i = 0; i < fileListByUUID.size(); i++) {
|
||||||
fileListByUUID.get(i).delete();
|
fileListByUUID.get(i).delete();
|
||||||
}
|
}
|
||||||
File filePath = AWMp4ParserHelper.getInstance().getFilePath(poiEntity.getId());
|
File filePath = AWMp4ParserHelper.getInstance().getFilePath(poiEntity.getId());
|
||||||
filePath.delete();
|
filePath.delete();
|
||||||
}
|
}*/
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
obtain.what = Constant.JOB_WORD_MONITOR;
|
obtain.what = Constant.JOB_WORD_MONITOR;
|
||||||
obtain.obj = true;
|
obtain.obj = true;
|
||||||
@@ -823,13 +827,14 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
} else if (response.getCode() == 230) {
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(getActivity());
|
FlushTokenUtil.flushToken(getActivity());
|
||||||
} else {
|
} else {
|
||||||
if (getActivity()!=null){
|
if (getActivity() != null) {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Toast.makeText(getActivity(),response.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
});}
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -839,21 +844,22 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
String message = e.getMessage();
|
String message = e.getMessage();
|
||||||
assert message != null;
|
assert message != null;
|
||||||
if (message.equals("timeout") || message.equals("Read time out")) {
|
if (message.equals("timeout") || message.equals("Read time out")) {
|
||||||
if (getActivity()!=null){
|
if (getActivity() != null) {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Toast.makeText(getActivity(),"请求超时", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请求超时", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
});}
|
});
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (getActivity()!=null){
|
if (getActivity() != null) {
|
||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Toast.makeText(getActivity(),message, Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import android.widget.CompoundButton;
|
|||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
@@ -65,7 +66,6 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
private ArrayList<PoiEntity> newEntities;
|
private ArrayList<PoiEntity> newEntities;
|
||||||
private ArrayList<PoiEntity> poiEntities;
|
private ArrayList<PoiEntity> poiEntities;
|
||||||
private CheckBox cbSelect;
|
private CheckBox cbSelect;
|
||||||
private MessageDialog messageDialog;
|
|
||||||
private File logFile;
|
private File logFile;
|
||||||
private StringBuilder staySubmitBuilder;
|
private StringBuilder staySubmitBuilder;
|
||||||
|
|
||||||
@@ -172,29 +172,26 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onEvent(Message data) {
|
public void onEvent(Message data) {
|
||||||
if (data.what == Constant.EVENT_STAY_REFRESH) {
|
if (data.what == Constant.STAY_SUBMIT_ITEM) {
|
||||||
if (Constant.currentLocation != null) {
|
|
||||||
if (Constant.USHERED != null) {
|
|
||||||
if (cbSelect != null) {
|
|
||||||
cbSelect.setChecked(false);
|
|
||||||
}
|
|
||||||
refreshData();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (data.what == Constant.NEST_WORD_SUBMIT) {
|
|
||||||
if (messageDialog != null) {
|
|
||||||
messageDialog.doDismiss();
|
|
||||||
}
|
|
||||||
} else if (data.what == Constant.STAY_SUBMIT_ITEM) {
|
|
||||||
if ((boolean) data.obj) {
|
if ((boolean) data.obj) {
|
||||||
if (cbSelect != null) {
|
if (Constant.currentLocation != null) {
|
||||||
cbSelect.setChecked(false);
|
if (Constant.USHERED != null) {
|
||||||
|
if (cbSelect != null) {
|
||||||
|
cbSelect.setChecked(false);
|
||||||
|
}
|
||||||
|
refreshData();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
refreshData();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSaveInstanceState(@NonNull Bundle outState) {
|
||||||
|
super.onSaveInstanceState(outState);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStop() {
|
public void onStop() {
|
||||||
super.onStop();
|
super.onStop();
|
||||||
@@ -255,7 +252,6 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case R.id.tv_delete:
|
case R.id.tv_delete:
|
||||||
staySubmitBuilder.append(TimestampUtil.time()).append("点击了删除按钮 ,");
|
staySubmitBuilder.append(TimestampUtil.time()).append("点击了删除按钮 ,");
|
||||||
if (Constant.isPresent) {
|
if (Constant.isPresent) {
|
||||||
@@ -286,16 +282,8 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (poiEntities.size() > 0) {
|
if (poiEntities.size() > 0) {
|
||||||
PoiSaveUtils.getInstance(getActivity()).uploadPoiEntityBatch(poiEntities);
|
|
||||||
Constant.isPresent = false;
|
Constant.isPresent = false;
|
||||||
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
PoiSaveUtils.getInstance(getActivity()).uploadPoiEntityBatch(poiEntities);
|
||||||
messageDialog = MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getActivity()), "提示", "任务正在提交中,无需重复提交", "确定").setOnOkButtonClickListener(new OnDialogButtonClickListener() {
|
|
||||||
@Override
|
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
|
||||||
baseDialog.doDismiss();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(getActivity(), "请选择要提交的数据", Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(), "请选择要提交的数据", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
@@ -393,6 +381,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
}
|
}
|
||||||
PoiDatabase roadDatabase = PoiDatabase.getInstance(getContext());
|
PoiDatabase roadDatabase = PoiDatabase.getInstance(getContext());
|
||||||
PoiDao roadDao = roadDatabase.getPoiDao();
|
PoiDao roadDao = roadDatabase.getPoiDao();
|
||||||
|
staySubmitBuilder.append(TimestampUtil.time()).append("refreshData ,");
|
||||||
if (roadDao != null) {
|
if (roadDao != null) {
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@@ -403,15 +392,13 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
if (Constant.USHERED != null) {
|
||||||
|
staySubmitBuilder.append("refreshData - userId:").append(Constant.USHERED).append(" path:").append(PoiDatabase.getDbName).append(",");
|
||||||
|
}
|
||||||
roadEntities.clear();
|
roadEntities.clear();
|
||||||
roadEntities.addAll(roadAll);
|
roadEntities.addAll(roadAll);
|
||||||
staySubmitAdapter.setAllRoad(roadEntities);
|
staySubmitAdapter.setAllRoad(roadEntities);
|
||||||
staySubmitAdapter.notifyDataSetChanged();
|
staySubmitAdapter.notifyDataSetChanged();
|
||||||
/*for (int i = 0; i < roadAll.size(); i++) {
|
|
||||||
if (roadAll.get(i).getType()!=6){
|
|
||||||
roadEntities.add(roadAll.get(i));
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -426,7 +413,6 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPause() {
|
public void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
@@ -439,7 +425,7 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
|||||||
EventBus.getDefault().unregister(this);
|
EventBus.getDefault().unregister(this);
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
dismissLoadingDialog();
|
dismissLoadingDialog();
|
||||||
staySubmitBuilder.append("onDestroy");
|
staySubmitBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||||
staySubmitBuilder.append("\r\n");
|
staySubmitBuilder.append("\r\n");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), staySubmitBuilder.toString(), true);
|
FileUtils.writeFile(logFile.getAbsolutePath(), staySubmitBuilder.toString(), true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import com.navinfo.outdoor.http.OkGoBuilder;
|
|||||||
import com.jcodecraeer.xrecyclerview.ProgressStyle;
|
import com.jcodecraeer.xrecyclerview.ProgressStyle;
|
||||||
import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
||||||
import com.navinfo.outdoor.util.FlushTokenUtil;
|
import com.navinfo.outdoor.util.FlushTokenUtil;
|
||||||
|
import com.navinfo.outdoor.util.TimestampUtil;
|
||||||
|
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
@@ -45,7 +46,6 @@ import java.util.Objects;
|
|||||||
* 发现页面的任务说明的点击条目跳转第二个页面
|
* 发现页面的任务说明的点击条目跳转第二个页面
|
||||||
*/
|
*/
|
||||||
public class TaskExplainFragment2 extends BaseFragment implements View.OnClickListener {
|
public class TaskExplainFragment2 extends BaseFragment implements View.OnClickListener {
|
||||||
|
|
||||||
private XRecyclerView taskExplain2Recycler;
|
private XRecyclerView taskExplain2Recycler;
|
||||||
private TaskExplainAdapter2 taskExplainAdapter2;
|
private TaskExplainAdapter2 taskExplainAdapter2;
|
||||||
private List<TaskPrefectureBean.BodyBean.ListBean> explainList;
|
private List<TaskPrefectureBean.BodyBean.ListBean> explainList;
|
||||||
@@ -97,7 +97,7 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
|||||||
taskExplainAdapter2.setOnItemClick(new TaskExplainAdapter2.OnItemClick2() {
|
taskExplainAdapter2.setOnItemClick(new TaskExplainAdapter2.OnItemClick2() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick2(int pos) {
|
public void onClick2(int pos) {
|
||||||
taskExplain2Builder.append("点击了item ,");
|
taskExplain2Builder.append(TimestampUtil.time()).append("点击了item ,");
|
||||||
HashMap<String, String> paramMap = new HashMap<>();
|
HashMap<String, String> paramMap = new HashMap<>();
|
||||||
paramMap.put("id", pos + "");
|
paramMap.put("id", pos + "");
|
||||||
intint2WebActivity(HttpInterface.MSG_CONTENT, paramMap);
|
intint2WebActivity(HttpInterface.MSG_CONTENT, paramMap);
|
||||||
@@ -129,7 +129,7 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
taskExplain2Builder = new StringBuilder();
|
taskExplain2Builder = new StringBuilder();
|
||||||
taskExplain2Builder.append("TaskExplainFragment-onCreate-initData ,");
|
taskExplain2Builder.append(TimestampUtil.time()).append("TaskExplainFragment-onCreate-initData ,");
|
||||||
if (Constant.USHERED != null) {
|
if (Constant.USHERED != null) {
|
||||||
taskExplain2Builder.append("userId:").append(Constant.USHERED).append(",");
|
taskExplain2Builder.append("userId:").append(Constant.USHERED).append(",");
|
||||||
}
|
}
|
||||||
@@ -212,26 +212,26 @@ public class TaskExplainFragment2 extends BaseFragment implements View.OnClickLi
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (v.getId() == R.id.iv_task_explain2_finish) {
|
if (v.getId() == R.id.iv_task_explain2_finish) {
|
||||||
Objects.requireNonNull(getActivity()).finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
taskExplain2Builder.append("点击了返回的按钮 ,");
|
taskExplain2Builder.append(TimestampUtil.time()).append("点击了返回的按钮 ,");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPause() {
|
public void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
taskExplain2Builder.append("onPause ,");
|
taskExplain2Builder.append(TimestampUtil.time()).append("onPause ,");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStop() {
|
public void onStop() {
|
||||||
super.onStop();
|
super.onStop();
|
||||||
taskExplain2Builder.append("onStop ,");
|
taskExplain2Builder.append(TimestampUtil.time()).append("onStop ,");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
taskExplain2Builder.append("onDestroy");
|
taskExplain2Builder.append(TimestampUtil.time()).append("onDestroy");
|
||||||
taskExplain2Builder.append("\r\n");
|
taskExplain2Builder.append("\r\n");
|
||||||
FileUtils.writeFile(logFile.getAbsolutePath(), taskExplain2Builder.toString(), true);
|
FileUtils.writeFile(logFile.getAbsolutePath(), taskExplain2Builder.toString(), true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ public class TaskPrefectureFragment extends BaseFragment implements View.OnClick
|
|||||||
taskPrefectureBuilder = new StringBuilder();
|
taskPrefectureBuilder = new StringBuilder();
|
||||||
taskPrefectureBuilder.append(TimestampUtil.time()).append("TaskPrefectureFragment-onCreate-initData ,");
|
taskPrefectureBuilder.append(TimestampUtil.time()).append("TaskPrefectureFragment-onCreate-initData ,");
|
||||||
if (Constant.USHERED != null) {
|
if (Constant.USHERED != null) {
|
||||||
taskPrefectureBuilder.append(TimestampUtil.time()).append("userId:").append(Constant.USHERED).append(",");
|
taskPrefectureBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -574,7 +574,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Toast.makeText(getActivity(),response.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(),response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -585,7 +585,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
|
|||||||
getActivity().runOnUiThread(new Runnable() {
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Toast.makeText(getActivity(),response.getMessage(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getActivity(),response.getMessage()+"", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -258,7 +258,6 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
|
|||||||
Matcher matcherSachs1 = patternSachs1.matcher(text);
|
Matcher matcherSachs1 = patternSachs1.matcher(text);
|
||||||
Matcher matcherSachs2 = patternSachs2.matcher(text);
|
Matcher matcherSachs2 = patternSachs2.matcher(text);
|
||||||
return !matcherSachs1.find() && !matcherSachs2.find();
|
return !matcherSachs1.find() && !matcherSachs2.find();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*中文姓名效验*/
|
/*中文姓名效验*/
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ public class VideoFragment extends BaseFragment implements View.OnClickListener
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.iv_video_final:
|
case R.id.iv_video_final:
|
||||||
|
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = Constant.VIDEO_FINISH_ROAD;
|
message.what = Constant.VIDEO_FINISH_ROAD;
|
||||||
EventBus.getDefault().post(message);
|
EventBus.getDefault().post(message);
|
||||||
|
|||||||
@@ -131,6 +131,11 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
|
|||||||
chargingReportMoney = findViewById(R.id.charging_report_money);
|
chargingReportMoney = findViewById(R.id.charging_report_money);
|
||||||
otherPushMoney = findViewById(R.id.other_push_money);
|
otherPushMoney = findViewById(R.id.other_push_money);
|
||||||
otherReportMoney = findViewById(R.id.other_report_money);
|
otherReportMoney = findViewById(R.id.other_report_money);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResume() {
|
||||||
|
super.onResume();
|
||||||
if (Constant.USHERED != null) {
|
if (Constant.USHERED != null) {
|
||||||
initNetWork();
|
initNetWork();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
package com.navinfo.outdoor.fragment;
|
package com.navinfo.outdoor.fragment;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -9,6 +12,7 @@ import android.widget.Toast;
|
|||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
|
import com.github.lazylibrary.util.FileUtils;
|
||||||
import com.jcodecraeer.xrecyclerview.ProgressStyle;
|
import com.jcodecraeer.xrecyclerview.ProgressStyle;
|
||||||
import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
||||||
import com.lzy.okgo.model.HttpParams;
|
import com.lzy.okgo.model.HttpParams;
|
||||||
@@ -23,8 +27,13 @@ import com.navinfo.outdoor.http.Callback;
|
|||||||
import com.navinfo.outdoor.http.HttpInterface;
|
import com.navinfo.outdoor.http.HttpInterface;
|
||||||
import com.navinfo.outdoor.http.OkGoBuilder;
|
import com.navinfo.outdoor.http.OkGoBuilder;
|
||||||
import com.navinfo.outdoor.util.FlushTokenUtil;
|
import com.navinfo.outdoor.util.FlushTokenUtil;
|
||||||
|
import com.navinfo.outdoor.util.TimestampUtil;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -35,6 +44,8 @@ public class WithdrawalRecordFragment extends BaseFragment implements View.OnCli
|
|||||||
private XRecyclerView rxlWithdraw;
|
private XRecyclerView rxlWithdraw;
|
||||||
private WithdrawalAdapter withdrawalAdapter;
|
private WithdrawalAdapter withdrawalAdapter;
|
||||||
private int withPage = 1;
|
private int withPage = 1;
|
||||||
|
private File logFile;
|
||||||
|
private StringBuilder withdrawalRecordBuilder;
|
||||||
|
|
||||||
public static WithdrawalRecordFragment newInstance(Bundle bundle) {
|
public static WithdrawalRecordFragment newInstance(Bundle bundle) {
|
||||||
WithdrawalRecordFragment fragment = new WithdrawalRecordFragment();
|
WithdrawalRecordFragment fragment = new WithdrawalRecordFragment();
|
||||||
@@ -47,6 +58,8 @@ public class WithdrawalRecordFragment extends BaseFragment implements View.OnCli
|
|||||||
return R.layout.withdrawal_record_fragment;
|
return R.layout.withdrawal_record_fragment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initView() {
|
protected void initView() {
|
||||||
super.initView();
|
super.initView();
|
||||||
@@ -84,6 +97,28 @@ public class WithdrawalRecordFragment extends BaseFragment implements View.OnCli
|
|||||||
@Override
|
@Override
|
||||||
protected void initData() {
|
protected void initData() {
|
||||||
super.initData();
|
super.initData();
|
||||||
|
SharedPreferences sharedPreferences = Objects.requireNonNull(getActivity()).getSharedPreferences(Constant.MESSAGE_TYPE, Context.MODE_PRIVATE);
|
||||||
|
SharedPreferences.Editor sharedEdit = sharedPreferences.edit();
|
||||||
|
@SuppressLint("SimpleDateFormat")
|
||||||
|
DateFormat formatter = new SimpleDateFormat("yyyyMMdd");
|
||||||
|
String newFormat = formatter.format(new Date(System.currentTimeMillis()));
|
||||||
|
String pictures_time = sharedPreferences.getString("pictures_time", null);
|
||||||
|
if (pictures_time == null) {
|
||||||
|
sharedEdit.putString("pictures_time", newFormat);
|
||||||
|
sharedEdit.apply();
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||||
|
} else {
|
||||||
|
if (pictures_time.equals(newFormat)) {
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + pictures_time + ".txt");
|
||||||
|
} else {
|
||||||
|
logFile = new File(Constant.LOG_FOLDER + "/" + newFormat + ".txt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
withdrawalRecordBuilder = new StringBuilder();
|
||||||
|
withdrawalRecordBuilder.append(TimestampUtil.time()).append("WithdrawalRecordFragment-onCreate-initData ,");
|
||||||
|
if (Constant.USHERED != null) {
|
||||||
|
withdrawalRecordBuilder.append("userId:").append(Constant.USHERED).append(",");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initNetwork() {
|
private void initNetwork() {
|
||||||
@@ -134,6 +169,27 @@ public class WithdrawalRecordFragment extends BaseFragment implements View.OnCli
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (v.getId() == R.id.iv_withdraw) {
|
if (v.getId() == R.id.iv_withdraw) {
|
||||||
Objects.requireNonNull(getActivity()).finish();
|
Objects.requireNonNull(getActivity()).finish();
|
||||||
|
withdrawalRecordBuilder.append(TimestampUtil.time()).append("点击了返回,");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPause() {
|
||||||
|
super.onPause();
|
||||||
|
withdrawalRecordBuilder.append(TimestampUtil.time()).append("onPause, ");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStop() {
|
||||||
|
super.onStop();
|
||||||
|
withdrawalRecordBuilder.append(TimestampUtil.time()).append("onStop, ");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
withdrawalRecordBuilder.append(TimestampUtil.time()).append("onDestroy");
|
||||||
|
withdrawalRecordBuilder.append("\r\n");
|
||||||
|
FileUtils.writeFile(logFile.getAbsolutePath(), withdrawalRecordBuilder.toString(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import java.io.File;
|
|||||||
public abstract class PoiDatabase extends RoomDatabase {
|
public abstract class PoiDatabase extends RoomDatabase {
|
||||||
private static final String DB_NAME = "navinfo.db";
|
private static final String DB_NAME = "navinfo.db";
|
||||||
private static volatile PoiDatabase instance;
|
private static volatile PoiDatabase instance;
|
||||||
|
public static String getDbName;
|
||||||
public static synchronized PoiDatabase getInstance(Context context) {
|
public static synchronized PoiDatabase getInstance(Context context) {
|
||||||
if (instance == null) {
|
if (instance == null) {
|
||||||
instance = create(context);
|
instance = create(context);
|
||||||
@@ -47,6 +47,7 @@ public abstract class PoiDatabase extends RoomDatabase {
|
|||||||
if (!dbFolder.exists()) {
|
if (!dbFolder.exists()) {
|
||||||
SdkFolderCreate.mkdirs(dbFolder.getAbsolutePath());
|
SdkFolderCreate.mkdirs(dbFolder.getAbsolutePath());
|
||||||
}
|
}
|
||||||
|
getDbName=dbFolder.getAbsolutePath()+"/"+DB_NAME;
|
||||||
return Room.databaseBuilder(context, PoiDatabase.class, Constant.POI_DAO+"/"+DB_NAME)
|
return Room.databaseBuilder(context, PoiDatabase.class, Constant.POI_DAO+"/"+DB_NAME)
|
||||||
.addMigrations(migration_1_2)
|
.addMigrations(migration_1_2)
|
||||||
//.fallbackToDestructiveMigration()//数据库更新时删除数据重新创建 改动特别大的时候在用
|
//.fallbackToDestructiveMigration()//数据库更新时删除数据重新创建 改动特别大的时候在用
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public class PoiEntity implements Serializable {
|
|||||||
private String y;//纬度
|
private String y;//纬度
|
||||||
private String detail;//需要保存的数据的wkt
|
private String detail;//需要保存的数据的wkt
|
||||||
private String dist;//距离用户位置
|
private String dist;//距离用户位置
|
||||||
private int taskStatus;//任务状态 0.未领取 1.已领取,5 立即采集,2.未保存(保存到本地但未提交成功),3.已保存(保存到本地提交成功),4已上传(结束采集),100 上传成功
|
private int taskStatus;//任务状态 0.未领取 1.已领取,5 立即采集,2.未保存(保存到本地但未提交成功),3.已保存(保存到本地提交成功),4已上传(结束采集)6上传中,100 上传成功,200 上传失败
|
||||||
private int type;//1 "POI"2 "充电站"3 "POI录像"4 "道路录像"5 "其他"6 "面状任务"
|
private int type;//1 "POI"2 "充电站"3 "POI录像"4 "道路录像"5 "其他"6 "面状任务"
|
||||||
private int station_type;//1."充电站"2 "充换电站"3 "充电桩组"4 "换电站"5 "门牌", "公交:6 情报:7
|
private int station_type;//1."充电站"2 "充换电站"3 "充电桩组"4 "换电站"5 "门牌", "公交:6 情报:7
|
||||||
private int isLocalData;//是否是本地数据 0,服务 1,本地
|
private int isLocalData;//是否是本地数据 0,服务 1,本地
|
||||||
|
|||||||
@@ -86,7 +86,8 @@ public class PoiSaveUtils {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Message obtain = Message.obtain();
|
Message obtain = Message.obtain();
|
||||||
obtain.what = Constant.EVENT_STAY_REFRESH;
|
obtain.what = Constant.STAY_SUBMIT_ITEM;
|
||||||
|
obtain.obj = true;
|
||||||
EventBus.getDefault().post(obtain);
|
EventBus.getDefault().post(obtain);
|
||||||
if (anInt + bInt > 0) {
|
if (anInt + bInt > 0) {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
@@ -258,9 +259,9 @@ public class PoiSaveUtils {
|
|||||||
}
|
}
|
||||||
//1 "POI"2 "充电站"3 "POI录像"4 "道路录像"5 "其他"6 "面状任务"
|
//1 "POI"2 "充电站"3 "POI录像"4 "道路录像"5 "其他"6 "面状任务"
|
||||||
if (poiEntity.getType() == 1) {
|
if (poiEntity.getType() == 1) {
|
||||||
initList(HttpInterface.POI_TASK_UPLOAD_PIC,photoFile,poiEntity);
|
initList(HttpInterface.POI_TASK_UPLOAD_PIC, photoFile, poiEntity);
|
||||||
} else if (poiEntity.getType() == 2) {
|
} else if (poiEntity.getType() == 2) {
|
||||||
initList(HttpInterface.C_TASK_UP_LOAD_PIC,photoFile,poiEntity);
|
initList(HttpInterface.C_TASK_UP_LOAD_PIC, photoFile, poiEntity);
|
||||||
} else if (poiEntity.getType() == 3) {
|
} else if (poiEntity.getType() == 3) {
|
||||||
List<File> videoFileList = AWMp4ParserHelper.getInstance().getFileListByUUID(poiEntity.getId());
|
List<File> videoFileList = AWMp4ParserHelper.getInstance().getFileListByUUID(poiEntity.getId());
|
||||||
if (videoFileList != null && !videoFileList.isEmpty()) {
|
if (videoFileList != null && !videoFileList.isEmpty()) {
|
||||||
@@ -268,11 +269,11 @@ public class PoiSaveUtils {
|
|||||||
ZipUtil.zipFiles(videoFileList, fileZip, null);
|
ZipUtil.zipFiles(videoFileList, fileZip, null);
|
||||||
photoFile.add(fileZip);
|
photoFile.add(fileZip);
|
||||||
}
|
}
|
||||||
if (photoFile.size()>0){
|
if (photoFile.size() > 0) {
|
||||||
long zipTrueSize = ZipUtils.getZipTrueSize(photoFile.get(0).getAbsolutePath());
|
long zipTrueSize = ZipUtils.getZipTrueSize(photoFile.get(0).getAbsolutePath());
|
||||||
if (zipTrueSize>0){
|
if (zipTrueSize > 0) {
|
||||||
initList(HttpInterface.POI_VIDEO_UPLOAD_PIC,photoFile,poiEntity);
|
initList(HttpInterface.POI_VIDEO_UPLOAD_PIC, photoFile, poiEntity);
|
||||||
}else {
|
} else {
|
||||||
for (int i = 0; i < photoFile.size(); i++) {
|
for (int i = 0; i < photoFile.size(); i++) {
|
||||||
photoFile.get(i).delete();
|
photoFile.get(i).delete();
|
||||||
}
|
}
|
||||||
@@ -288,20 +289,20 @@ public class PoiSaveUtils {
|
|||||||
ZipUtil.zipFiles(videoFileList, fileZip, null);
|
ZipUtil.zipFiles(videoFileList, fileZip, null);
|
||||||
photoFile.add(fileZip);
|
photoFile.add(fileZip);
|
||||||
}
|
}
|
||||||
if (photoFile.size()>0){
|
if (photoFile.size() > 0) {
|
||||||
long zipTrueSize = ZipUtils.getZipTrueSize(photoFile.get(0).getAbsolutePath());
|
long zipTrueSize = ZipUtils.getZipTrueSize(photoFile.get(0).getAbsolutePath());
|
||||||
if (zipTrueSize>0){
|
if (zipTrueSize > 0) {
|
||||||
initList(HttpInterface.ROAD_TASK_UPLOAD_PIC,photoFile,poiEntity);
|
initList(HttpInterface.ROAD_TASK_UPLOAD_PIC, photoFile, poiEntity);
|
||||||
}else {
|
} else {
|
||||||
for (int i = 0; i < photoFile.size(); i++) {
|
for (int i = 0; i < photoFile.size(); i++) {
|
||||||
photoFile.get(i).delete();
|
photoFile.get(i).delete();
|
||||||
}
|
}
|
||||||
bInt++;
|
bInt++;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (poiEntity.getType() == 5) {
|
} else if (poiEntity.getType() == 5) {
|
||||||
initList(HttpInterface.OTHER_TASK_UPLOAD_PIC,photoFile,poiEntity);
|
initList(HttpInterface.OTHER_TASK_UPLOAD_PIC, photoFile, poiEntity);
|
||||||
}
|
}
|
||||||
/* OkGo
|
/* OkGo
|
||||||
// 请求方式和请求url
|
// 请求方式和请求url
|
||||||
@@ -326,7 +327,7 @@ public class PoiSaveUtils {
|
|||||||
});*/
|
});*/
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initList(String url,List<File> list,PoiEntity poiEntity) {
|
private void initList(String url, List<File> list, PoiEntity poiEntity) {
|
||||||
try {
|
try {
|
||||||
HttpParams httpParams = new HttpParams();
|
HttpParams httpParams = new HttpParams();
|
||||||
httpParams.put("auditId", poiEntity.getBodyId());
|
httpParams.put("auditId", poiEntity.getBodyId());
|
||||||
@@ -354,7 +355,7 @@ public class PoiSaveUtils {
|
|||||||
if (otherUploadPicBean.getCode() == 200) {
|
if (otherUploadPicBean.getCode() == 200) {
|
||||||
poiEntity.setTaskStatus(100);
|
poiEntity.setTaskStatus(100);
|
||||||
PoiDatabase.getInstance(mContext).getPoiDao().updatePoiEntity(poiEntity);
|
PoiDatabase.getInstance(mContext).getPoiDao().updatePoiEntity(poiEntity);
|
||||||
for (int i = 0; i < list.size(); i++) {
|
/* for (int i = 0; i < list.size(); i++) {
|
||||||
list.get(i).delete();
|
list.get(i).delete();
|
||||||
}
|
}
|
||||||
if (poiEntity.getType()==3||poiEntity.getType()==4) {
|
if (poiEntity.getType()==3||poiEntity.getType()==4) {
|
||||||
@@ -366,7 +367,7 @@ public class PoiSaveUtils {
|
|||||||
File filePath = AWMp4ParserHelper.getInstance().getFilePath(poiEntity.getId());
|
File filePath = AWMp4ParserHelper.getInstance().getFilePath(poiEntity.getId());
|
||||||
filePath.delete();
|
filePath.delete();
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
Log.d("TAGss", "uploadPoiNet: 成功" + anInt);
|
Log.d("TAGss", "uploadPoiNet: 成功" + anInt);
|
||||||
anInt++;
|
anInt++;
|
||||||
return;
|
return;
|
||||||
@@ -521,10 +522,10 @@ public class PoiSaveUtils {
|
|||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
PoiUploadBean uploadBeanResult = gson.fromJson(pileUpLoadResultStr, PoiUploadBean.class);
|
PoiUploadBean uploadBeanResult = gson.fromJson(pileUpLoadResultStr, PoiUploadBean.class);
|
||||||
if (uploadBeanResult.getCode() == 200) {
|
if (uploadBeanResult.getCode() == 200) {
|
||||||
PoiDatabase.getInstance(mContext).getChargingPileDao().deleteChargingPileEntity(chargingPileEntity);
|
/* PoiDatabase.getInstance(mContext).getChargingPileDao().deleteChargingPileEntity(chargingPileEntity);
|
||||||
for (int i = 0; i < chargingPileFileList.size(); i++) {
|
for (int i = 0; i < chargingPileFileList.size(); i++) {
|
||||||
chargingPileFileList.get(i).delete();
|
chargingPileFileList.get(i).delete();
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public class PreserveUtils {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "道路:" + poiEntity.getName() + " 保存成功";
|
obtain1.obj = "道路:" + poiEntity.getName() + " 保存成功";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
@@ -72,7 +72,7 @@ public class PreserveUtils {
|
|||||||
}).start();
|
}).start();
|
||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "道路:" + poiEntity.getName() + " 保存失败";
|
obtain1.obj = "道路:" + poiEntity.getName() + " 保存失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
@@ -80,17 +80,16 @@ public class PreserveUtils {
|
|||||||
FlushTokenUtil.flushToken(mContext);
|
FlushTokenUtil.flushToken(mContext);
|
||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "道路:" + poiEntity.getName() + "保存失败";
|
obtain1.obj = "道路:" + poiEntity.getName() + "保存失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "道路:" + poiEntity.getName() + " 保存失败";
|
obtain1.obj = "道路:" + poiEntity.getName() + " 保存失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
@@ -118,7 +117,7 @@ public class PreserveUtils {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "Poi:" + poiEntity.getName() + " 保存成功";
|
obtain1.obj = "Poi:" + poiEntity.getName() + " 保存成功";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
@@ -127,7 +126,7 @@ public class PreserveUtils {
|
|||||||
}).start();
|
}).start();
|
||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "Poi:" + poiEntity.getName() + " 保存失败";
|
obtain1.obj = "Poi:" + poiEntity.getName() + " 保存失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
@@ -135,7 +134,7 @@ public class PreserveUtils {
|
|||||||
FlushTokenUtil.flushToken(mContext);
|
FlushTokenUtil.flushToken(mContext);
|
||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "Poi:" + poiEntity.getName() + "保存失败";
|
obtain1.obj = "Poi:" + poiEntity.getName() + "保存失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
@@ -145,7 +144,7 @@ public class PreserveUtils {
|
|||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "Poi:" + poiEntity.getName() + " 保存失败";
|
obtain1.obj = "Poi:" + poiEntity.getName() + " 保存失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
@@ -175,7 +174,7 @@ public class PreserveUtils {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "Poi录像:" + poiEntity.getName() + " 保存成功";
|
obtain1.obj = "Poi录像:" + poiEntity.getName() + " 保存成功";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
@@ -184,7 +183,7 @@ public class PreserveUtils {
|
|||||||
}).start();
|
}).start();
|
||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "Poi录像:" + poiEntity.getName() + " 保存失败";
|
obtain1.obj = "Poi录像:" + poiEntity.getName() + " 保存失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
@@ -192,7 +191,7 @@ public class PreserveUtils {
|
|||||||
FlushTokenUtil.flushToken(mContext);
|
FlushTokenUtil.flushToken(mContext);
|
||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "Poi录像:" + poiEntity.getName() + "保存失败";
|
obtain1.obj = "Poi录像:" + poiEntity.getName() + "保存失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
@@ -202,7 +201,7 @@ public class PreserveUtils {
|
|||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "Poi录像:" + poiEntity.getName() + " 保存失败";
|
obtain1.obj = "Poi录像:" + poiEntity.getName() + " 保存失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
@@ -231,7 +230,7 @@ public class PreserveUtils {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "其他:" + poiEntity.getName() + " 保存成功";
|
obtain1.obj = "其他:" + poiEntity.getName() + " 保存成功";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
@@ -240,7 +239,7 @@ public class PreserveUtils {
|
|||||||
}).start();
|
}).start();
|
||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "其他:" + poiEntity.getName() + " 保存失败";
|
obtain1.obj = "其他:" + poiEntity.getName() + " 保存失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
@@ -248,7 +247,7 @@ public class PreserveUtils {
|
|||||||
FlushTokenUtil.flushToken(mContext);
|
FlushTokenUtil.flushToken(mContext);
|
||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "其他:" + poiEntity.getName() + "保存失败";
|
obtain1.obj = "其他:" + poiEntity.getName() + "保存失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
@@ -258,7 +257,7 @@ public class PreserveUtils {
|
|||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "其他:" + poiEntity.getName() + " 保存失败";
|
obtain1.obj = "其他:" + poiEntity.getName() + " 保存失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
@@ -288,7 +287,7 @@ public class PreserveUtils {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "充电站:" + poiEntity.getName() + " 保存成功";
|
obtain1.obj = "充电站:" + poiEntity.getName() + " 保存成功";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
@@ -297,7 +296,7 @@ public class PreserveUtils {
|
|||||||
}).start();
|
}).start();
|
||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "充电站:" + poiEntity.getName() + " 保存失败";
|
obtain1.obj = "充电站:" + poiEntity.getName() + " 保存失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
@@ -305,7 +304,7 @@ public class PreserveUtils {
|
|||||||
FlushTokenUtil.flushToken(mContext);
|
FlushTokenUtil.flushToken(mContext);
|
||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "充电站:" + poiEntity.getName() + " 保存失败";
|
obtain1.obj = "充电站:" + poiEntity.getName() + " 保存失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
}
|
}
|
||||||
@@ -314,7 +313,7 @@ public class PreserveUtils {
|
|||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e, int id) {
|
public void onError(Throwable e, int id) {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
obtain1.what = Constant.NEST_WORD_SUBMIT;
|
obtain1.what = Constant.NEST_WORD_REGISTER;
|
||||||
obtain1.obj = "充电站:" + poiEntity.getName() + " 保存失败";
|
obtain1.obj = "充电站:" + poiEntity.getName() + " 保存失败";
|
||||||
EventBus.getDefault().post(obtain1);
|
EventBus.getDefault().post(obtain1);
|
||||||
Log.d("TAG", "onError: " + e.getMessage() + "");
|
Log.d("TAG", "onError: " + e.getMessage() + "");
|
||||||
|
|||||||
@@ -48,14 +48,14 @@ public class UploadUtils {
|
|||||||
public void run() {
|
public void run() {
|
||||||
showPoiEntity.setTaskStatus(100);
|
showPoiEntity.setTaskStatus(100);
|
||||||
poiDao.updatePoiEntity(showPoiEntity);
|
poiDao.updatePoiEntity(showPoiEntity);
|
||||||
if (showPoiEntity.getId()!=null){
|
/* if (showPoiEntity.getId()!=null){
|
||||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
||||||
for (int i = 0; i < fileListByUUID.size(); i++) {
|
for (int i = 0; i < fileListByUUID.size(); i++) {
|
||||||
fileListByUUID.get(i).delete();
|
fileListByUUID.get(i).delete();
|
||||||
}
|
}
|
||||||
File filePath = AWMp4ParserHelper.getInstance().getFilePath(showPoiEntity.getId());
|
File filePath = AWMp4ParserHelper.getInstance().getFilePath(showPoiEntity.getId());
|
||||||
filePath.delete();
|
filePath.delete();
|
||||||
}
|
}*/
|
||||||
fileZip.delete();
|
fileZip.delete();
|
||||||
Objects.requireNonNull(mContext).runOnUiThread(new Runnable() {
|
Objects.requireNonNull(mContext).runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@@ -68,7 +68,7 @@ public class UploadUtils {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
}else if (response.getCode()==230){
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(mContext);
|
FlushTokenUtil.flushToken(mContext);
|
||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
@@ -108,9 +108,9 @@ public class UploadUtils {
|
|||||||
public void run() {
|
public void run() {
|
||||||
showPoiEntity.setTaskStatus(100);
|
showPoiEntity.setTaskStatus(100);
|
||||||
poiDao.updatePoiEntity(showPoiEntity);
|
poiDao.updatePoiEntity(showPoiEntity);
|
||||||
for (int i = 0; i < poiPicList.size(); i++) {
|
/*for (int i = 0; i < poiPicList.size(); i++) {
|
||||||
poiPicList.get(i).delete();
|
poiPicList.get(i).delete();
|
||||||
}
|
}*/
|
||||||
Objects.requireNonNull(mContext).runOnUiThread(new Runnable() {
|
Objects.requireNonNull(mContext).runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@@ -122,7 +122,7 @@ public class UploadUtils {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
}else if (response.getCode()==230){
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(mContext);
|
FlushTokenUtil.flushToken(mContext);
|
||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
@@ -162,14 +162,14 @@ public class UploadUtils {
|
|||||||
public void run() {
|
public void run() {
|
||||||
showPoiEntity.setTaskStatus(100);
|
showPoiEntity.setTaskStatus(100);
|
||||||
poiDao.updatePoiEntity(showPoiEntity);
|
poiDao.updatePoiEntity(showPoiEntity);
|
||||||
if (showPoiEntity.getId() != null) {
|
/*if (showPoiEntity.getId() != null) {
|
||||||
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
|
||||||
for (int i = 0; i < fileListByUUID.size(); i++) {
|
for (int i = 0; i < fileListByUUID.size(); i++) {
|
||||||
fileListByUUID.get(i).delete();
|
fileListByUUID.get(i).delete();
|
||||||
}
|
}
|
||||||
File filePath = AWMp4ParserHelper.getInstance().getFilePath(showPoiEntity.getId());
|
File filePath = AWMp4ParserHelper.getInstance().getFilePath(showPoiEntity.getId());
|
||||||
filePath.delete();
|
filePath.delete();
|
||||||
}
|
}*/
|
||||||
fileZip.delete();
|
fileZip.delete();
|
||||||
Objects.requireNonNull(mContext).runOnUiThread(new Runnable() {
|
Objects.requireNonNull(mContext).runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@@ -182,7 +182,7 @@ public class UploadUtils {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
}else if (response.getCode()==230){
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(mContext);
|
FlushTokenUtil.flushToken(mContext);
|
||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
@@ -222,9 +222,9 @@ public class UploadUtils {
|
|||||||
public void run() {
|
public void run() {
|
||||||
showPoiEntity.setTaskStatus(100);
|
showPoiEntity.setTaskStatus(100);
|
||||||
poiDao.updatePoiEntity(showPoiEntity);
|
poiDao.updatePoiEntity(showPoiEntity);
|
||||||
for (int i = 0; i < otherUploadList.size(); i++) {
|
/* for (int i = 0; i < otherUploadList.size(); i++) {
|
||||||
otherUploadList.get(i).delete();
|
otherUploadList.get(i).delete();
|
||||||
}
|
}*/
|
||||||
Objects.requireNonNull(mContext).runOnUiThread(new Runnable() {
|
Objects.requireNonNull(mContext).runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@@ -236,7 +236,7 @@ public class UploadUtils {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
}else if (response.getCode()==230){
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(mContext);
|
FlushTokenUtil.flushToken(mContext);
|
||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
@@ -277,9 +277,9 @@ public class UploadUtils {
|
|||||||
public void run() {
|
public void run() {
|
||||||
showPoiEntity.setTaskStatus(100);
|
showPoiEntity.setTaskStatus(100);
|
||||||
poiDao.updatePoiEntity(showPoiEntity);
|
poiDao.updatePoiEntity(showPoiEntity);
|
||||||
for (int i = 0; i < chargingStationList.size(); i++) {
|
/* for (int i = 0; i < chargingStationList.size(); i++) {
|
||||||
chargingStationList.get(i).delete();
|
chargingStationList.get(i).delete();
|
||||||
}
|
}*/
|
||||||
mContext.runOnUiThread(new Runnable() {
|
mContext.runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@@ -291,7 +291,7 @@ public class UploadUtils {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
}else if (response.getCode()==230){
|
} else if (response.getCode() == 230) {
|
||||||
FlushTokenUtil.flushToken(mContext);
|
FlushTokenUtil.flushToken(mContext);
|
||||||
} else {
|
} else {
|
||||||
Message obtain1 = Message.obtain();
|
Message obtain1 = Message.obtain();
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -11,39 +11,53 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="wrap_content"
|
<LinearLayout
|
||||||
android:layout_height="wrap_content"
|
android:id="@+id/linearLayout3"
|
||||||
android:orientation="vertical"
|
android:layout_width="wrap_content"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
android:layout_height="wrap_content"
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
android:orientation="vertical"
|
||||||
app:layout_constraintBottom_toBottomOf="parent">
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
<TextView
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
android:id="@+id/tv_road_name"
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
<TextView
|
||||||
android:layout_margin="10dp"
|
android:id="@+id/tv_road_name"
|
||||||
android:singleLine="true"
|
android:layout_width="wrap_content"
|
||||||
android:ellipsize="end"
|
android:layout_height="wrap_content"
|
||||||
android:text="测试1"
|
android:layout_margin="10dp"
|
||||||
android:textSize="15sp" />
|
android:ellipsize="end"
|
||||||
<TextView
|
android:singleLine="true"
|
||||||
android:id="@+id/tv_road_day"
|
android:text="测试1"
|
||||||
android:layout_width="wrap_content"
|
android:textSize="15sp" />
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="2021-05-08 13:24:36"
|
<TextView
|
||||||
android:layout_margin="10dp"
|
android:id="@+id/tv_road_day"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_road_name"/>
|
android:layout_width="wrap_content"
|
||||||
</LinearLayout>
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
android:text="2021-05-08 13:24:36"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_road_name" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="20dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/cb_unSubmit"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/cb_unSubmit"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/cb_unSubmit" />
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:id="@+id/cb_unSubmit"
|
android:id="@+id/cb_unSubmit"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:scaleX="1.1"
|
android:scaleX="1.1"
|
||||||
android:scaleY="1.1"
|
android:scaleY="1.1"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintRight_toRightOf="parent"/>
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
Reference in New Issue
Block a user