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