1.修改查看图片的顺序

2.修改保存本地后台逻辑
3.端点间的距离判断
This commit is contained in:
wangdongsheng 2021-11-13 16:31:40 +08:00
parent 647a24085d
commit 2aef098319
22 changed files with 348 additions and 251 deletions

View File

@ -9,8 +9,8 @@ android {
applicationId "com.navinfo.outdoor" applicationId "com.navinfo.outdoor"
minSdkVersion 22 minSdkVersion 22
targetSdkVersion 30 targetSdkVersion 30
versionCode 5 versionCode 6
versionName "5.1" versionName "6.1112"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }
lintOptions { lintOptions {

View File

@ -149,7 +149,12 @@ public class HomeActivity extends BaseActivity{
String dataString = (String) data.obj; String dataString = (String) data.obj;
if (!dataString.equals("")) { if (!dataString.equals("")) {
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS; DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
Constant.isPresent=true; MessageDialog.show(this, "提示", dataString, "确定");
}
}else if (data.what==Constant.NEST_WORD_REGISTER){
String dataString = (String) data.obj;
if (!dataString.equals("")) {
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
MessageDialog.show(this, "提示", dataString, "确定"); MessageDialog.show(this, "提示", dataString, "确定");
} }
} }

View File

@ -49,7 +49,6 @@ import java.util.Date;
import java.util.Objects; import java.util.Objects;
/** /**
* 照片对应 * 照片对应
*/ */
@ -57,7 +56,6 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
private static final CameraLogger LOG = CameraLogger.create("Picture"); private static final CameraLogger LOG = CameraLogger.create("Picture");
private CameraView cameraView; private CameraView cameraView;
private String photo_path; private String photo_path;
private int oration;
private File logFile; private File logFile;
private StringBuilder photographBuilder; private StringBuilder photographBuilder;
@ -108,7 +106,6 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
super.initView(); super.initView();
if (getIntent() != null) { if (getIntent() != null) {
photo_path = getIntent().getStringExtra(Constant.INTENT_PHOTO_PATH); photo_path = getIntent().getStringExtra(Constant.INTENT_PHOTO_PATH);
oration = getIntent().getIntExtra(Constant.INTENT_VIDEO_OBLATION, -1);
} }
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
CameraLogger.setLogLevel(CameraLogger.LEVEL_VERBOSE); CameraLogger.setLogLevel(CameraLogger.LEVEL_VERBOSE);
@ -120,13 +117,11 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
@Override @Override
public void onPictureTaken(@NonNull PictureResult result) { public void onPictureTaken(@NonNull PictureResult result) {
super.onPictureTaken(result); super.onPictureTaken(result);
if (oration == 1) {
if (Objects.requireNonNull(cameraView.getPictureSize()).getWidth() < cameraView.getPictureSize().getHeight()) { if (Objects.requireNonNull(cameraView.getPictureSize()).getWidth() < cameraView.getPictureSize().getHeight()) {
photographBuilder.append("cameraView 用户竖向拍摄 ,"); photographBuilder.append("cameraView 用户竖向拍摄 ,");
} else { } else {
photographBuilder.append("cameraView 用户横屏拍摄 ,"); photographBuilder.append("cameraView 用户横屏拍摄 ,");
} }
}
File file = new File(photo_path); File file = new File(photo_path);
/*File destFolder = new File(file.getParentFile().getAbsolutePath()+"aaa"); /*File destFolder = new File(file.getParentFile().getAbsolutePath()+"aaa");
if (!destFolder.exists()) { if (!destFolder.exists()) {
@ -135,12 +130,11 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
result.toFile(file, new FileCallback() { result.toFile(file, new FileCallback() {
@Override @Override
public void onFileReady(@Nullable File file) { public void onFileReady(@Nullable File file) {
Intent intent = new Intent(); /* Intent intent = new Intent();
intent.putExtra("file", file.getAbsolutePath()); intent.putExtra("file", file.getAbsolutePath());
setResult(0x104, intent); setResult(0x104, intent);
SystemTTS.getInstance(PhotographActivity.this).stopSpeak(); SystemTTS.getInstance(PhotographActivity.this).stopSpeak();
PhotographActivity.this.finish(); PhotographActivity.this.finish();*/
/*
if (file.exists()) { if (file.exists()) {
WebPNative webPNative = new WebPNative(); WebPNative webPNative = new WebPNative();
new Thread(new Runnable() { new Thread(new Runnable() {
@ -165,14 +159,17 @@ public class PhotographActivity extends BaseActivity implements View.OnClickList
} }
} catch (Exception e) { } catch (Exception e) {
Log.d("output:", e.toString()); Log.d("output:", e.toString());
Toast.makeText(PhotographActivity.this, "文件转换失败", Toast.LENGTH_SHORT).show();
} }
} }
}).start(); }).start();
} else { } else {
runOnUiThread(new Runnable() {
@Override
public void run() {
Toast.makeText(PhotographActivity.this, "源文件不存在", Toast.LENGTH_SHORT).show(); Toast.makeText(PhotographActivity.this, "源文件不存在", Toast.LENGTH_SHORT).show();
} }
*/ });
}
/* CompressImageTask.get().compressImage(ImageConfig.getDefaultConfig(file.getAbsolutePath(), file.getAbsolutePath()), new AsyncImageTask.OnImageResult(){ /* CompressImageTask.get().compressImage(ImageConfig.getDefaultConfig(file.getAbsolutePath(), file.getAbsolutePath()), new AsyncImageTask.OnImageResult(){
@Override @Override
public void startCompress() { public void startCompress() {

View File

@ -94,22 +94,23 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
private TextureMapView ivMap; private TextureMapView ivMap;
private List<Removable> removables; private List<Removable> removables;
private Polyline polyline; private Polyline polyline;
private String finalVideoPath; // 摄像后最终保存的文件名 private String finalVideoPath,geoWkt, detail, type; // 摄像后最终保存的文件名
private ViewGroup layerChange; // 切换地图和相机的父控件 private ViewGroup layerChange; // 切换地图和相机的父控件
private CheckBox capturePicture, cbMapType; //拍照 private CheckBox capturePicture, cbMapType; //拍照
private boolean isMapSlide = false; private boolean isMapSlide = false;
private boolean isOration = false; private boolean isOration = false;
private boolean isTerminus=false;
private boolean isBack = true;
private SimpleDateFormat formatter; private SimpleDateFormat formatter;
private File paperFile, logFile; private File paperFile, logFile;
private int poi_video_type;
private ImageView ivZoomAdd, ivZoomDel, ivLocation, ivPicImage, ivPicVideoImage, imageView; private ImageView ivZoomAdd, ivZoomDel, ivLocation, ivPicImage, ivPicVideoImage, imageView;
private TencentLocation oldCurrentLocation = null; private TencentLocation oldCurrentLocation = null;
private Timer timer; private Timer timer;
private TimerTask timerTask; private TimerTask timerTask;
private int videoIndex = -1; private int videoIndex = -1;
private int poi_video_type=0;
private int oration = 0; private int oration = 0;
private SystemTTS systemTTS; private SystemTTS systemTTS;
private boolean isBack = true;
private StringBuilder picturesBuilder; private StringBuilder picturesBuilder;
private Handler handler = new Handler(new Handler.Callback() { private Handler handler = new Handler(new Handler.Callback() {
@Override @Override
@ -130,13 +131,8 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
return false; return false;
} }
}); });
private LatLng startLatLine; private LatLng startLatLine, endLatLine;
private LatLng endLatLine;
private TextView tvTitle; private TextView tvTitle;
private String geoWkt;
private String detail;
private String type;
@Override @Override
protected int getLayout() { protected int getLayout() {
@ -152,7 +148,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
layerChange = findViewById(R.id.layer_change); layerChange = findViewById(R.id.layer_change);
if (getIntent() != null) { if (getIntent() != null) {
poi_video_type = getIntent().getIntExtra(Constant.INTENT_POI_VIDEO_TYPE, -1); poi_video_type = getIntent().getIntExtra(Constant.INTENT_POI_VIDEO_TYPE, -1);
oration = getIntent().getIntExtra(Constant.INTENT_VIDEO_OBLATION, -1); oration = getIntent().getIntExtra(Constant.INTENT_VIDEO_OBLATION, 0);
finalVideoPath = getIntent().getStringExtra(Constant.INTENT_JPG_PATH); finalVideoPath = getIntent().getStringExtra(Constant.INTENT_JPG_PATH);
type = getIntent().getStringExtra(Constant.INTENT_TYPE); type = getIntent().getStringExtra(Constant.INTENT_TYPE);
geoWkt = getIntent().getStringExtra(Constant.INTENT_GEO_WKT); geoWkt = getIntent().getStringExtra(Constant.INTENT_GEO_WKT);
@ -261,7 +257,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
result.toFile(file, new FileCallback() { result.toFile(file, new FileCallback() {
@Override @Override
public void onFileReady(@Nullable File file) { public void onFileReady(@Nullable File file) {
if (file.exists()) { /* if (file.exists()) {
initMarker(); initMarker();
videoIndex = Integer.parseInt(file.getName().replace(".jpg", "")); videoIndex = Integer.parseInt(file.getName().replace(".jpg", ""));
finalVideoPath = Objects.requireNonNull(file.getParentFile()).getAbsolutePath() + "/" + (videoIndex + 1) + ".jpg"; finalVideoPath = Objects.requireNonNull(file.getParentFile()).getAbsolutePath() + "/" + (videoIndex + 1) + ".jpg";
@ -277,8 +273,8 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
Message message = new Message(); Message message = new Message();
message.what = 0x103; message.what = 0x103;
handler.sendMessage(message); handler.sendMessage(message);
} }*/
/* if (file.exists()) { if (file.exists()) {
WebPNative webPNative = new WebPNative(); WebPNative webPNative = new WebPNative();
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
@ -287,13 +283,14 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
Bitmap bitmap = BitmapFactory.decodeFile(file.getAbsolutePath()); Bitmap bitmap = BitmapFactory.decodeFile(file.getAbsolutePath());
webPNative.encodeRGBA(bitmap, file.getPath(), 90); webPNative.encodeRGBA(bitmap, file.getPath(), 90);
runOnUiThread(new Runnable() { runOnUiThread(new Runnable() {
@SuppressLint("SetTextI18n")
@Override @Override
public void run() { public void run() {
if (file.exists()) { if (file.exists()) {
initMarker(); initMarker();
videoIndex = Integer.parseInt(file.getName().replace(".webp", "")); videoIndex = Integer.parseInt(file.getName().replace(".webp", ""));
finalVideoPath = Objects.requireNonNull(file.getParentFile()).getAbsolutePath() + "/" + (videoIndex + 1) + ".webp"; finalVideoPath = Objects.requireNonNull(file.getParentFile()).getAbsolutePath() + "/" + (videoIndex + 1) + ".webp";
Toast.makeText(PicturesActivity.this, "保存成功:" + (videoIndex + 1), Toast.LENGTH_SHORT).show(); tvTitle.setText("保存成功:" + (videoIndex + 1));
} }
if (poi_video_type == 2) { if (poi_video_type == 2) {
Message message = new Message(); Message message = new Message();
@ -302,7 +299,6 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
} }
} }
}); });
if (!bitmap.isRecycled()) { if (!bitmap.isRecycled()) {
bitmap.recycle(); bitmap.recycle();
} }
@ -312,17 +308,20 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
} }
}).start(); }).start();
} else { } else {
runOnUiThread(new Runnable() {
@Override
public void run() {
Toast.makeText(PicturesActivity.this, "源文件不存在", Toast.LENGTH_SHORT).show(); Toast.makeText(PicturesActivity.this, "源文件不存在", Toast.LENGTH_SHORT).show();
}*/ }
});
}
} }
}); });
} else { } else {
isBack = false; isBack = false;
if (poi_video_type != 2) { Message message = new Message();
capturePicture.setText("开始采集"); message.what = 0x103;
} handler.sendMessage(message);
capturePicture.setChecked(false);
stopTimer();
} }
} }
}); });
@ -334,11 +333,6 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
ivMap.setLayoutParams(layoutParamsMap); ivMap.setLayoutParams(layoutParamsMap);
} }
private void message(String content) {
LOG.i(content);
Toast.makeText(this, content, Toast.LENGTH_SHORT).show();
}
private void initLine() { private void initLine() {
if (geoWkt != null) { if (geoWkt != null) {
String geo = Geohash.getInstance().decode(geoWkt); String geo = Geohash.getInstance().decode(geoWkt);
@ -386,8 +380,6 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
} }
List<LatLng> latLineString = GeometryTools.getLatLags(geo); List<LatLng> latLineString = GeometryTools.getLatLags(geo);
assert latLineString != null; assert latLineString != null;
startLatLine = latLineString.get(0);
endLatLine = latLineString.get(latLineString.size() - 1);
// 构造 PolylineOnions // 构造 PolylineOnions
PolylineOptions polylineOptions = new PolylineOptions().addAll(latLineString) PolylineOptions polylineOptions = new PolylineOptions().addAll(latLineString)
// 折线设置圆形线头 // 折线设置圆形线头
@ -443,9 +435,8 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
} }
picturesBuilder.append("onClick 点击了结束采集 ,"); picturesBuilder.append("onClick 点击了结束采集 ,");
Intent intent = new Intent(); Intent intent = new Intent();
finalVideoPath = Objects.requireNonNull(paperFile.getParentFile()).getAbsolutePath() + "/" + videoIndex + ".jpg"; finalVideoPath = Objects.requireNonNull(paperFile.getParentFile()).getAbsolutePath() + "/" + videoIndex + ".webp";
intent.putExtra(Constant.INTENT_PICTURES_PATH, finalVideoPath); intent.putExtra(Constant.INTENT_PICTURES_PATH, finalVideoPath);
intent.putExtra("type", poi_video_type);
setResult(0x111, intent); setResult(0x111, intent);
this.finish(); this.finish();
break; break;
@ -500,9 +491,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
return bitmap; return bitmap;
} }
/* /*设置定位图标样式*/
设置定位图标样式
*/
private void setLocMarkerStyle(int type) { private void setLocMarkerStyle(int type) {
tencentMap.setLocationSource(new MyTecentLocationSource(this)); tencentMap.setLocationSource(new MyTecentLocationSource(this));
tencentMap.setMyLocationEnabled(true); tencentMap.setMyLocationEnabled(true);
@ -684,22 +673,28 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
}, 100); }, 100);
} }
//快到终点的语音播报 //快到终点的语音播报
/*if (Constant.currentLocation != null) { // initTerminus();
}
private void initTerminus() {
if (Constant.currentLocation != null) {
LatLng newLatLine = new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()); LatLng newLatLine = new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude());
if (endLatLine != null && startLatLine != null) { if (endLatLine != null && startLatLine != null) {
double startDistance = GeometryTools.distanceToDouble(newLatLine, startLatLine); double startDistance = GeometryTools.distanceToDouble(newLatLine, startLatLine);
double endDistance = GeometryTools.distanceToDouble(newLatLine, endLatLine); double endDistance = GeometryTools.distanceToDouble(newLatLine, endLatLine);
if (startDistance > endDistance) {//endDistance: 起点 startDistance:终点 if (startDistance > endDistance) {//endDistance: 起点 startDistance:终点
if (startDistance == 50) { if (startDistance <50&&!isTerminus) {
systemTTS.playText("即将到达任务终点"); systemTTS.playText("即将到达任务终点");
isTerminus=true;
} }
} else { } else {
if (endDistance == 50) { if (endDistance <50&&!isTerminus) {
systemTTS.playText("即将到达任务终点"); systemTTS.playText("即将到达任务终点");
isTerminus=true;
}
} }
} }
} }
}*/
} }
private void initSpeed() { private void initSpeed() {
@ -754,7 +749,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
picturesBuilder.append("onClick 点击了结束采集 ,"); picturesBuilder.append("onClick 点击了结束采集 ,");
Intent intent = new Intent(); Intent intent = new Intent();
finalVideoPath = Objects.requireNonNull(paperFile.getParentFile()).getAbsolutePath() + "/" + videoIndex + ".jpg"; finalVideoPath = Objects.requireNonNull(paperFile.getParentFile()).getAbsolutePath() + "/" + videoIndex + ".webp";
intent.putExtra(Constant.INTENT_PICTURES_PATH, finalVideoPath); intent.putExtra(Constant.INTENT_PICTURES_PATH, finalVideoPath);
setResult(0x111, intent); setResult(0x111, intent);
finish(); finish();

View File

@ -108,7 +108,7 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
btnAttestation.setOnClickListener(this); btnAttestation.setOnClickListener(this);
Button btnGathering = findViewById(R.id.btn_gathering); Button btnGathering = findViewById(R.id.btn_gathering);
btnGathering.setOnClickListener(this); btnGathering.setOnClickListener(this);
if (Constant.ID_NUMBER != null) { if (Constant.BACKGROUND != null) {
btnGathering.setText("已绑定"); btnGathering.setText("已绑定");
} }
region = findViewById(R.id.region); region = findViewById(R.id.region);
@ -116,6 +116,7 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
LinearLayout llRegion = findViewById(R.id.ll_region); LinearLayout llRegion = findViewById(R.id.ll_region);
llRegion.setOnClickListener(this); llRegion.setOnClickListener(this);
etPhone = findViewById(R.id.et_phone); etPhone = findViewById(R.id.et_phone);
etPhone.setEnabled(false);
etPhone.setOnClickListener(this); etPhone.setOnClickListener(this);
etQq = findViewById(R.id.edit_qq); etQq = findViewById(R.id.edit_qq);
etQq.setOnClickListener(this); etQq.setOnClickListener(this);
@ -138,7 +139,7 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
if (Constant.AUDIOTAPES == 1) { if (Constant.AUDIOTAPES == 1) {
btnAttestation.setText("已认证"); btnAttestation.setText("已认证");
} }
if (Constant.ID_NUMBER != null) { if (Constant.BACKGROUND != null) {
btnGathering.setText("已绑定"); btnGathering.setText("已绑定");
} }
} }
@ -191,13 +192,6 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
private void netWork() { private void netWork() {
userBuilder.append("点击了保存的按钮 ,"); userBuilder.append("点击了保存的按钮 ,");
if (Constant.ID_NUM == null) {
Toast.makeText(this, "请先实名认证", Toast.LENGTH_SHORT).show();
return;
}
if (Constant.ID_NUMBER == null) {
Toast.makeText(this, "请先绑定银行卡", Toast.LENGTH_SHORT).show();
}
String userphone = etPhone.getText().toString().trim(); String userphone = etPhone.getText().toString().trim();
String userqq = etQq.getText().toString().trim(); String userqq = etQq.getText().toString().trim();
String usermailbox = etMailbox.getText().toString().trim(); String usermailbox = etMailbox.getText().toString().trim();
@ -211,18 +205,17 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
//user.length() < 11 && user.length() > 5 //user.length() < 11 && user.length() > 5
if (TextUtils.isEmpty(userphone) || TextUtils.isEmpty(userqq) || TextUtils.isEmpty(usermailbox) || TextUtils.isEmpty(region_id)) { if (TextUtils.isEmpty(userphone) || TextUtils.isEmpty(userqq) || TextUtils.isEmpty(usermailbox) || TextUtils.isEmpty(region_id)) {
if (region_id == null || region_id.equals("")) { if (region_id == null || region_id.equals("")) {
Toast.makeText(this, "所在地区为空,请重新输入", Toast.LENGTH_SHORT).show(); Toast.makeText(this, "所在地区,请重新选择", Toast.LENGTH_SHORT).show();
return; return;
} else { } else {
httpParams.put("regionId", region_id); httpParams.put("regionId", region_id);
} }
/* if (!RegexUtil.isPhone(userphone)) {
if (!RegexUtil.isPhone(userphone)) {
Toast.makeText(this, "手机号输入错误", Toast.LENGTH_SHORT).show(); Toast.makeText(this, "手机号输入错误", Toast.LENGTH_SHORT).show();
return; return;
} else { } else {
httpParams.put("mobile", userphone); httpParams.put("mobile", userphone);
} }*/
if (!userqq.equals("")) { if (!userqq.equals("")) {
if (!isQQNum_matcher) { if (!isQQNum_matcher) {
Toast.makeText(this, "QQ号输入错误", Toast.LENGTH_SHORT).show(); Toast.makeText(this, "QQ号输入错误", Toast.LENGTH_SHORT).show();
@ -234,10 +227,10 @@ public class UserActivity extends BaseActivity implements View.OnClickListener {
if (!usermailbox.equals("")) { if (!usermailbox.equals("")) {
if (!isEmail_matcher) { if (!isEmail_matcher) {
Toast.makeText(this, "邮箱格式错误", Toast.LENGTH_SHORT).show(); Toast.makeText(this, "邮箱格式错误", Toast.LENGTH_SHORT).show();
return;
} else { } else {
httpParams.put("mailbox", usermailbox); //邮箱 httpParams.put("mailbox", usermailbox); //邮箱
} }
return;
} }
} }
showLoadingDialog(); showLoadingDialog();

View File

@ -135,6 +135,7 @@ public class Constant {
public static final int PICTURE_VIDEO_WORD = 48; //视频页面崩溃后发给poi录像和道路 public static final int PICTURE_VIDEO_WORD = 48; //视频页面崩溃后发给poi录像和道路
public static final int PHOTO_FINISH_VIDEO = 49;//拍照列表的返回 public static final int PHOTO_FINISH_VIDEO = 49;//拍照列表的返回
public static final int NEST_WORD_SUBMIT = 50;//所有的提交/上传 public static final int NEST_WORD_SUBMIT = 50;//所有的提交/上传
public static final int NEST_WORD_REGISTER=51;//所有的保存
public static final int STAY_SUBMIT_ITEM = 52;//待提交 public static final int STAY_SUBMIT_ITEM = 52;//待提交
public static final int HAS_SUBMIT_ITEM = 53;//已提交 public static final int HAS_SUBMIT_ITEM = 53;//已提交
public static final String INTENT_POI_VIDEO_TYPE = "poi_video_type"; public static final String INTENT_POI_VIDEO_TYPE = "poi_video_type";
@ -155,17 +156,14 @@ public class Constant {
public static final String INTENT_PHOTO_PATH = "INTENT_PHOTO_PATH"; // 拍照界面指定的图片保存位置 public static final String INTENT_PHOTO_PATH = "INTENT_PHOTO_PATH"; // 拍照界面指定的图片保存位置
public static final String INTENT_PICTURES_PATH = "INTENT_VIDEO_PATH"; // 拍照界面指定的视频文件保存位置 public static final String INTENT_PICTURES_PATH = "INTENT_VIDEO_PATH"; // 拍照界面指定的视频文件保存位置
public static final String INTENT_VIDEO_OBLATION = "INTENT_VIDEO_OBLATION"; // 视频拍摄时屏幕方向 0-强制横屏 其他-任意 public static final String INTENT_VIDEO_OBLATION = "INTENT_VIDEO_OBLATION"; // 视频拍摄时屏幕方向 0-强制横屏 其他-任意
public static final String INTENT_ID = "id";//poiEntity 的id public static final String INTENT_ID = "id";//poiEntity 的id
public static final String INTENT_TYPE = "type";//poiEntity 的type public static final String INTENT_TYPE = "type";//poiEntity 的type
public static final String INTENT_GEO_WKT = "geowkt";//poiEntity 的geowkt public static final String INTENT_GEO_WKT = "geowkt";//poiEntity 的geowkt
public static final String INTENT_DETAIL = "Detail";//poiEntity 的detail public static final String INTENT_DETAIL = "Detail";//poiEntity 的detail
public static SlidingUpPanelLayout SLIDING_LAYOUT = null;//設置 public static SlidingUpPanelLayout SLIDING_LAYOUT = null;//設置
public static boolean IS_FILTER_LIST_ITEM = true;//poi页面的查重 public static boolean IS_FILTER_LIST_ITEM = true;//poi页面的查重
public static TencentMap.OnMarkerClickListener markerClickListener = null; public static TencentMap.OnMarkerClickListener markerClickListener = null;
public static final String NAVIN_FO = "11.11";//版本日期 public static final String NAVIN_FO = "11.12";//版本日期
//marker //marker
public static final BitmapDescriptor MARKER_POI_SHOW = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_show); public static final BitmapDescriptor MARKER_POI_SHOW = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_show);
public static final BitmapDescriptor MARKER_CHARGE_SHOW = BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_show); public static final BitmapDescriptor MARKER_CHARGE_SHOW = BitmapDescriptorFactory.fromResource(R.drawable.marker_charge_show);

View File

@ -38,7 +38,6 @@ public class UserApplication extends Application {
UMConfigure.setLogEnabled(true); UMConfigure.setLogEnabled(true);
// String e ="测试自定义异常代码是否运行!!!!!!"; // String e ="测试自定义异常代码是否运行!!!!!!";
// UMCrash.generateCustomLog(e,"UmengException"); // UMCrash.generateCustomLog(e,"UmengException");
UMCrash.registerUMCrashCallback(new UMCrashCallback() { UMCrash.registerUMCrashCallback(new UMCrashCallback() {
@Override @Override
public String onCallback() { public String onCallback() {
@ -79,10 +78,13 @@ public class UserApplication extends Application {
//全局的读取超时时间 //全局的读取超时时间
builder.readTimeout(0, TimeUnit.MILLISECONDS); builder.readTimeout(0, TimeUnit.MILLISECONDS);
//全局的写入超时时间 //全局的写入超时时间
builder.writeTimeout(0, TimeUnit.MILLISECONDS); builder.writeTimeout(0, TimeUnit.MILLISECONDS);
//全局的连接超时时间 //全局的连接超时时间
builder.connectTimeout(0, TimeUnit.MILLISECONDS); builder.connectTimeout(0, TimeUnit.MILLISECONDS);
OkGo.getInstance().init(this) OkGo.getInstance().init(this)
.setOkHttpClient(builder.build()) .setOkHttpClient(builder.build())
//全局统一缓存模式默认不使用缓存可以不传 //全局统一缓存模式默认不使用缓存可以不传

View File

@ -1082,7 +1082,6 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
chargingPileBuilder.append("点击了全景照片进行拍照,"); chargingPileBuilder.append("点击了全景照片进行拍照,");
Intent intentPanorama = new Intent(getActivity(), PhotographActivity.class); Intent intentPanorama = new Intent(getActivity(), PhotographActivity.class);
File panoramaFile = PhotoUtils.showPhotoFile("a", latLng); File panoramaFile = PhotoUtils.showPhotoFile("a", latLng);
intentPanorama.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
intentPanorama.putExtra(Constant.INTENT_PHOTO_PATH, panoramaFile.getPath()); intentPanorama.putExtra(Constant.INTENT_PHOTO_PATH, panoramaFile.getPath());
startActivityForResult(intentPanorama, 101); startActivityForResult(intentPanorama, 101);
break; break;
@ -1090,7 +1089,6 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
chargingPileBuilder.append("点击了充电桩编码进行拍照,"); chargingPileBuilder.append("点击了充电桩编码进行拍照,");
Intent intentCoding = new Intent(getActivity(), PhotographActivity.class); Intent intentCoding = new Intent(getActivity(), PhotographActivity.class);
File codingFile = PhotoUtils.showPhotoFile("b", latLng); File codingFile = PhotoUtils.showPhotoFile("b", latLng);
intentCoding.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
intentCoding.putExtra(Constant.INTENT_PHOTO_PATH, codingFile.getPath()); intentCoding.putExtra(Constant.INTENT_PHOTO_PATH, codingFile.getPath());
startActivityForResult(intentCoding, 102); startActivityForResult(intentCoding, 102);
break; break;
@ -1098,7 +1096,6 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
chargingPileBuilder.append("点击了设备标牌进行拍照,"); chargingPileBuilder.append("点击了设备标牌进行拍照,");
Intent intentEquipment = new Intent(getActivity(), PhotographActivity.class); Intent intentEquipment = new Intent(getActivity(), PhotographActivity.class);
File equipmentFile = PhotoUtils.showPhotoFile("c", latLng); File equipmentFile = PhotoUtils.showPhotoFile("c", latLng);
intentEquipment.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
intentEquipment.putExtra(Constant.INTENT_PHOTO_PATH, equipmentFile.getPath()); intentEquipment.putExtra(Constant.INTENT_PHOTO_PATH, equipmentFile.getPath());
startActivityForResult(intentEquipment, 103); startActivityForResult(intentEquipment, 103);
@ -1107,7 +1104,6 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
chargingPileBuilder.append("点击了设备标牌进行拍照,"); chargingPileBuilder.append("点击了设备标牌进行拍照,");
Intent intentFacility = new Intent(getActivity(), PhotographActivity.class); Intent intentFacility = new Intent(getActivity(), PhotographActivity.class);
File facilityFile = PhotoUtils.showPhotoFile("c", latLng); File facilityFile = PhotoUtils.showPhotoFile("c", latLng);
intentFacility.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
intentFacility.putExtra(Constant.INTENT_PHOTO_PATH, facilityFile.getPath()); intentFacility.putExtra(Constant.INTENT_PHOTO_PATH, facilityFile.getPath());
startActivityForResult(intentFacility, 104); startActivityForResult(intentFacility, 104);
break; break;
@ -1115,7 +1111,6 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
chargingPileBuilder.append("点击了设备标牌进行拍照,"); chargingPileBuilder.append("点击了设备标牌进行拍照,");
Intent intentScutcheon = new Intent(getActivity(), PhotographActivity.class); Intent intentScutcheon = new Intent(getActivity(), PhotographActivity.class);
File scutcheonFile = PhotoUtils.showPhotoFile("c", latLng); File scutcheonFile = PhotoUtils.showPhotoFile("c", latLng);
intentScutcheon.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
intentScutcheon.putExtra(Constant.INTENT_PHOTO_PATH, scutcheonFile.getPath()); intentScutcheon.putExtra(Constant.INTENT_PHOTO_PATH, scutcheonFile.getPath());
startActivityForResult(intentScutcheon, 105); startActivityForResult(intentScutcheon, 105);
break; break;
@ -1123,7 +1118,6 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
chargingPileBuilder.append("点击了设备标牌进行拍照,"); chargingPileBuilder.append("点击了设备标牌进行拍照,");
Intent intentDevice = new Intent(getActivity(), PhotographActivity.class); Intent intentDevice = new Intent(getActivity(), PhotographActivity.class);
File deviceFile = PhotoUtils.showPhotoFile("c", latLng); File deviceFile = PhotoUtils.showPhotoFile("c", latLng);
intentDevice.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
intentDevice.putExtra(Constant.INTENT_PHOTO_PATH, deviceFile.getPath()); intentDevice.putExtra(Constant.INTENT_PHOTO_PATH, deviceFile.getPath());
startActivityForResult(intentDevice, 106); startActivityForResult(intentDevice, 106);
break; break;
@ -1131,7 +1125,6 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
chargingPileBuilder.append("点击了可用状态进行拍照,"); chargingPileBuilder.append("点击了可用状态进行拍照,");
Intent intentUsable = new Intent(getActivity(), PhotographActivity.class); Intent intentUsable = new Intent(getActivity(), PhotographActivity.class);
File usableFile = PhotoUtils.showPhotoFile("d", latLng); File usableFile = PhotoUtils.showPhotoFile("d", latLng);
intentUsable.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
intentUsable.putExtra(Constant.INTENT_PHOTO_PATH, usableFile.getPath()); intentUsable.putExtra(Constant.INTENT_PHOTO_PATH, usableFile.getPath());
startActivityForResult(intentUsable, 107); startActivityForResult(intentUsable, 107);
break; break;
@ -1139,7 +1132,6 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
chargingPileBuilder.append("点击了可用专题进行拍照,"); chargingPileBuilder.append("点击了可用专题进行拍照,");
Intent intentAvailable = new Intent(getActivity(), PhotographActivity.class); Intent intentAvailable = new Intent(getActivity(), PhotographActivity.class);
File availableFile = PhotoUtils.showPhotoFile("d", latLng); File availableFile = PhotoUtils.showPhotoFile("d", latLng);
intentAvailable.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
intentAvailable.putExtra(Constant.INTENT_PHOTO_PATH, availableFile.getPath()); intentAvailable.putExtra(Constant.INTENT_PHOTO_PATH, availableFile.getPath());
startActivityForResult(intentAvailable, 108); startActivityForResult(intentAvailable, 108);
break; break;
@ -1147,7 +1139,6 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
chargingPileBuilder.append("点击了停车位编号进行拍照,"); chargingPileBuilder.append("点击了停车位编号进行拍照,");
Intent intentParking = new Intent(getActivity(), PhotographActivity.class); Intent intentParking = new Intent(getActivity(), PhotographActivity.class);
File parkingFile = PhotoUtils.showPhotoFile("e", latLng); File parkingFile = PhotoUtils.showPhotoFile("e", latLng);
intentParking.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
intentParking.putExtra(Constant.INTENT_PHOTO_PATH, parkingFile.getPath()); intentParking.putExtra(Constant.INTENT_PHOTO_PATH, parkingFile.getPath());
startActivityForResult(intentParking, 109); startActivityForResult(intentParking, 109);
break; break;
@ -1155,7 +1146,6 @@ public class ChargingPileFragment extends BaseDrawerFragment implements View.OnC
chargingPileBuilder.append("点击了停车位编号进行拍照,"); chargingPileBuilder.append("点击了停车位编号进行拍照,");
Intent intentNumber = new Intent(getActivity(), PhotographActivity.class); Intent intentNumber = new Intent(getActivity(), PhotographActivity.class);
File numberFile = PhotoUtils.showPhotoFile("e", latLng); File numberFile = PhotoUtils.showPhotoFile("e", latLng);
intentNumber.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
intentNumber.putExtra(Constant.INTENT_PHOTO_PATH, numberFile.getPath()); intentNumber.putExtra(Constant.INTENT_PHOTO_PATH, numberFile.getPath());
startActivityForResult(intentNumber, 110); startActivityForResult(intentNumber, 110);
break; break;

View File

@ -915,9 +915,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
switch (v.getId()) { switch (v.getId()) {
case R.id.btn_save_local: case R.id.btn_save_local:
chargingStationBuilder.append("点击了保存本地的按钮 ,"); chargingStationBuilder.append("点击了保存本地的按钮 ,");
if (Constant.isPresent) {
initRoadSaveLocal(false); initRoadSaveLocal(false);
}
break; break;
case R.id.btn_uploading: case R.id.btn_uploading:
chargingStationBuilder.append("点击了上传的按钮 ,"); chargingStationBuilder.append("点击了上传的按钮 ,");
@ -998,7 +996,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
}).start(); }).start();
} }
} else { } else {
Toast.makeText(getContext(), "有正在提交的数据,等提交成功后,方可操作", Toast.LENGTH_SHORT).show(); Toast.makeText(getContext(), "该任务正在提交中", Toast.LENGTH_SHORT).show();
} }
break; break;
case R.id.tv_station_examine: case R.id.tv_station_examine:
@ -1007,9 +1005,9 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
break; break;
case R.id.rl_panorama: case R.id.rl_panorama:
chargingStationBuilder.append("点击了全景照片进行拍照 ,"); chargingStationBuilder.append("点击了全景照片进行拍照 ,");
findingDuplicateByWork();
Intent intentPanorama = new Intent(getActivity(), PhotographActivity.class); Intent intentPanorama = new Intent(getActivity(), PhotographActivity.class);
File PanoramaFile = PhotoUtils.showPhotoFile("a", latLng); File PanoramaFile = PhotoUtils.showPhotoFile("a", latLng);
intentPanorama.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
intentPanorama.putExtra(Constant.INTENT_PHOTO_PATH, PanoramaFile.getPath()); intentPanorama.putExtra(Constant.INTENT_PHOTO_PATH, PanoramaFile.getPath());
startActivityForResult(intentPanorama, 101); startActivityForResult(intentPanorama, 101);
break; break;
@ -1017,7 +1015,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
chargingStationBuilder.append("点击了名称照片进行拍照 ,"); chargingStationBuilder.append("点击了名称照片进行拍照 ,");
Intent intentName = new Intent(getActivity(), PhotographActivity.class); Intent intentName = new Intent(getActivity(), PhotographActivity.class);
File nameFile = PhotoUtils.showPhotoFile("b", latLng); File nameFile = PhotoUtils.showPhotoFile("b", latLng);
intentName.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
intentName.putExtra(Constant.INTENT_PHOTO_PATH, nameFile.getPath()); intentName.putExtra(Constant.INTENT_PHOTO_PATH, nameFile.getPath());
startActivityForResult(intentName, 102); startActivityForResult(intentName, 102);
break; break;
@ -1025,7 +1022,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
chargingStationBuilder.append("点击了服务说明进行拍照 ,"); chargingStationBuilder.append("点击了服务说明进行拍照 ,");
Intent intentInternal = new Intent(getActivity(), PhotographActivity.class); Intent intentInternal = new Intent(getActivity(), PhotographActivity.class);
File internalFile = PhotoUtils.showPhotoFile("c", latLng); File internalFile = PhotoUtils.showPhotoFile("c", latLng);
intentInternal.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
intentInternal.putExtra(Constant.INTENT_PHOTO_PATH, internalFile.getPath()); intentInternal.putExtra(Constant.INTENT_PHOTO_PATH, internalFile.getPath());
startActivityForResult(intentInternal, 103); startActivityForResult(intentInternal, 103);
break; break;
@ -1033,7 +1029,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
chargingStationBuilder.append("点击了充电站指引牌进行拍照 ,"); chargingStationBuilder.append("点击了充电站指引牌进行拍照 ,");
Intent intentElse = new Intent(getActivity(), PhotographActivity.class); Intent intentElse = new Intent(getActivity(), PhotographActivity.class);
File elseFile = PhotoUtils.showPhotoFile("d", latLng); File elseFile = PhotoUtils.showPhotoFile("d", latLng);
intentElse.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
intentElse.putExtra(Constant.INTENT_PHOTO_PATH, elseFile.getPath()); intentElse.putExtra(Constant.INTENT_PHOTO_PATH, elseFile.getPath());
startActivityForResult(intentElse, 104); startActivityForResult(intentElse, 104);
break; break;
@ -1041,7 +1036,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
chargingStationBuilder.append("点击了停车收费标牌进行拍照 ,"); chargingStationBuilder.append("点击了停车收费标牌进行拍照 ,");
Intent intentScutcheon = new Intent(getActivity(), PhotographActivity.class); Intent intentScutcheon = new Intent(getActivity(), PhotographActivity.class);
File scutcheonFile = PhotoUtils.showPhotoFile("e", latLng); File scutcheonFile = PhotoUtils.showPhotoFile("e", latLng);
intentScutcheon.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
intentScutcheon.putExtra(Constant.INTENT_PHOTO_PATH, scutcheonFile.getPath()); intentScutcheon.putExtra(Constant.INTENT_PHOTO_PATH, scutcheonFile.getPath());
startActivityForResult(intentScutcheon, 105); startActivityForResult(intentScutcheon, 105);
break; break;
@ -1156,7 +1150,6 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
chargingStationSaveByWork(poiEntity); chargingStationSaveByWork(poiEntity);
} else { } else {
chargingStationSaveWork(poiEntity); chargingStationSaveWork(poiEntity);
Constant.isPresent = false;
} }
} }
}); });
@ -1184,6 +1177,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
HttpParams httpParams = new HttpParams(); HttpParams httpParams = new HttpParams();
httpParams.put("taskId", poiEntity.getTaskId()); httpParams.put("taskId", poiEntity.getTaskId());
httpParams.put("sptype", poiEntity.getStation_type()); httpParams.put("sptype", poiEntity.getStation_type());
httpParams.put("existence", poiEntity.getExistence());
httpParams.put("name", poiEntity.getName()); httpParams.put("name", poiEntity.getName());
httpParams.put("address", poiEntity.getAddress()); httpParams.put("address", poiEntity.getAddress());
httpParams.put("telephone", poiEntity.getTelPhone()); httpParams.put("telephone", poiEntity.getTelPhone());
@ -1200,6 +1194,10 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退 Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台保存中,请稍候..."); WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台保存中,请稍候...");
WaitDialog.dismiss(1000); WaitDialog.dismiss(1000);
Message obtain = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR;
obtain.obj = true;
EventBus.getDefault().post(obtain);
} }
private void stationUploadByNetWork(PoiEntity poiEntity, ArrayList<File> chargingStationList) { private void stationUploadByNetWork(PoiEntity poiEntity, ArrayList<File> chargingStationList) {
@ -1249,6 +1247,7 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
HttpParams httpParams = new HttpParams(); HttpParams httpParams = new HttpParams();
httpParams.put("taskId", poiEntity.getTaskId()); httpParams.put("taskId", poiEntity.getTaskId());
httpParams.put("sptype", poiEntity.getStation_type()); httpParams.put("sptype", poiEntity.getStation_type());
httpParams.put("existence", poiEntity.getExistence());
httpParams.put("name", poiEntity.getName()); httpParams.put("name", poiEntity.getName());
httpParams.put("address", poiEntity.getAddress()); httpParams.put("address", poiEntity.getAddress());
httpParams.put("telephone", poiEntity.getTelPhone()); httpParams.put("telephone", poiEntity.getTelPhone());
@ -1329,6 +1328,10 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
public void onSuccess(TaskNameBean taskNameBean, int id) { public void onSuccess(TaskNameBean taskNameBean, int id) {
dismissLoadingDialog(); dismissLoadingDialog();
if (taskNameBean.getCode() == 200) { if (taskNameBean.getCode() == 200) {
if (getActivity() != null) {
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
editNameContent.setTextColor(Color.BLACK); editNameContent.setTextColor(Color.BLACK);
btnSaveLocal.setEnabled(true); btnSaveLocal.setEnabled(true);
btnUploading.setEnabled(true); btnUploading.setEnabled(true);
@ -1338,27 +1341,45 @@ public class ChargingStationFragment extends BaseDrawerFragment implements View.
for (int i = 0; i < body.size(); i++) { for (int i = 0; i < body.size(); i++) {
stringBuilder.append(body.get(i)).append(""); stringBuilder.append(body.get(i)).append("");
} }
Toast.makeText(getActivity(), "不允许新增上报. 存在类似名称--" + stringBuilder.toString(), Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), " 存在类似名称--" + stringBuilder.toString(), Toast.LENGTH_SHORT).show();
editNameContent.setText(null);
} else { } else {
Toast.makeText(getActivity(), "没有类似名称可以作业", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), "没有类似名称,可以作业", Toast.LENGTH_SHORT).show();
} }
}
});
}
} else if (taskNameBean.getCode() == 203) { } else if (taskNameBean.getCode() == 203) {
if (getActivity() != null) {
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
FlushTokenUtil.flushToken(getActivity()); FlushTokenUtil.flushToken(getActivity());
}
});
}
} else { } else {
if (getActivity() != null) {
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
editNameContent.setTextColor(Color.RED); editNameContent.setTextColor(Color.RED);
btnSaveLocal.setEnabled(false); btnSaveLocal.setEnabled(false);
btnUploading.setEnabled(false); btnUploading.setEnabled(false);
Toast.makeText(getActivity(), taskNameBean.getMessage() + "", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), taskNameBean.getMessage(), Toast.LENGTH_SHORT).show();
}
});
}
} }
} }
@Override @Override
public void onError(Throwable e, int id) { public void onError(Throwable e, int id) {
dismissLoadingDialog();
if (getActivity() == null) { if (getActivity() == null) {
return; return;
} }
dismissLoadingDialog();
String message = e.getMessage(); String message = e.getMessage();
assert message != null; assert message != null;
if (message.equals("timeout") || message.equals("Read time out")) { if (message.equals("timeout") || message.equals("Read time out")) {

View File

@ -234,7 +234,6 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
Intent gatheringNumberIntent = new Intent(getActivity(), PhotographActivity.class); Intent gatheringNumberIntent = new Intent(getActivity(), PhotographActivity.class);
File file = PhotoUtils.showPhotoFile("a", null); File file = PhotoUtils.showPhotoFile("a", null);
gatheringNumberIntent.putExtra(Constant.INTENT_PHOTO_PATH, file.getPath()); gatheringNumberIntent.putExtra(Constant.INTENT_PHOTO_PATH, file.getPath());
gatheringNumberIntent.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
startActivityForResult(gatheringNumberIntent, 131); startActivityForResult(gatheringNumberIntent, 131);
break; break;
} }
@ -246,7 +245,7 @@ public class GatheringFragment extends BaseFragment implements View.OnClickListe
} }
ArrayList<File> gatheringList = new ArrayList<>(); ArrayList<File> gatheringList = new ArrayList<>();
if (gatheringCamera.getTag() == null) { if (gatheringCamera.getTag() == null) {
if (Constant.ID_NUMBER == null) { if (Constant.BACKGROUND == null) {
Toast.makeText(getActivity(), "请先拍银行卡", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), "请先拍银行卡", Toast.LENGTH_SHORT).show();
} else { } else {
Toast.makeText(getActivity(), "如果需要重新绑定请先拍照银行卡", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), "如果需要重新绑定请先拍照银行卡", Toast.LENGTH_SHORT).show();

View File

@ -505,7 +505,6 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
Intent intentPicture = new Intent(getActivity(), PhotographActivity.class); Intent intentPicture = new Intent(getActivity(), PhotographActivity.class);
File file = PhotoUtils.showPhotoFile("a", latLng); File file = PhotoUtils.showPhotoFile("a", latLng);
intentPicture.putExtra(Constant.INTENT_PHOTO_PATH, file.getPath()); intentPicture.putExtra(Constant.INTENT_PHOTO_PATH, file.getPath());
intentPicture.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
startActivityForResult(intentPicture, 101); startActivityForResult(intentPicture, 101);
break; break;
case R.id.rl_pictures: case R.id.rl_pictures:
@ -513,14 +512,11 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
Intent intentPictures = new Intent(getActivity(), PhotographActivity.class); Intent intentPictures = new Intent(getActivity(), PhotographActivity.class);
File files = PhotoUtils.showPhotoFile("b", latLng); File files = PhotoUtils.showPhotoFile("b", latLng);
intentPictures.putExtra(Constant.INTENT_PHOTO_PATH, files.getPath()); intentPictures.putExtra(Constant.INTENT_PHOTO_PATH, files.getPath());
intentPictures.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
startActivityForResult(intentPictures, 102); startActivityForResult(intentPictures, 102);
break; break;
case R.id.btn_other_local: case R.id.btn_other_local:
otherBuilder.append("点击了保存本地的按钮,"); otherBuilder.append("点击了保存本地的按钮,");
if (Constant.isPresent) {
initPoiSaveLocal(false); initPoiSaveLocal(false);
}
break; break;
case R.id.btn_other_uploading: case R.id.btn_other_uploading:
otherBuilder.append("点击了上传的按钮,"); otherBuilder.append("点击了上传的按钮,");
@ -561,7 +557,7 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
Constant.isPresent = false; Constant.isPresent = false;
} }
} else { } else {
Toast.makeText(getContext(), "有正在提交的数据,等提交成功后,方可操作", Toast.LENGTH_SHORT).show(); Toast.makeText(getContext(), "该任务正在提交中", Toast.LENGTH_SHORT).show();
} }
break; break;
} }
@ -594,7 +590,6 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
otherSaveByNetWork(poiEntity); otherSaveByNetWork(poiEntity);
} else { } else {
otherSaveNetWork(poiEntity); otherSaveNetWork(poiEntity);
Constant.isPresent = false;
} }
} }
@ -636,6 +631,10 @@ public class OtherFragment extends BaseDrawerFragment implements View.OnClickLis
Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退 Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台保存中,请稍候..."); WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台保存中,请稍候...");
WaitDialog.dismiss(1000); WaitDialog.dismiss(1000);
Message obtain = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR;
obtain.obj = true;
EventBus.getDefault().post(obtain);
} }
private void otherUploadByNet(int body, List<File> otherUploadList) { private void otherUploadByNet(int body, List<File> otherUploadList) {

View File

@ -1,5 +1,6 @@
package com.navinfo.outdoor.fragment; package com.navinfo.outdoor.fragment;
import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.os.Message; import android.os.Message;
import android.util.Log; import android.util.Log;
@ -9,6 +10,7 @@ import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import androidx.annotation.RequiresApi;
import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
@ -85,6 +87,7 @@ public class PhotoFragment extends BaseFragment implements View.OnClickListener
}); });
} }
@RequiresApi(api = Build.VERSION_CODES.N)
@Override @Override
protected void initView() { protected void initView() {
super.initView(); super.initView();
@ -99,12 +102,33 @@ public class PhotoFragment extends BaseFragment implements View.OnClickListener
String id = showPoiEntity.getId(); String id = showPoiEntity.getId();
fileBeans = new ArrayList<>(); fileBeans = new ArrayList<>();
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(id); List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(id);
Collections.sort(fileListByUUID); List<File> fileArrayList = new ArrayList<>();
if (fileListByUUID.size()>=2){ if (fileListByUUID.size()>2){
for (int i = 0; i < fileListByUUID.size(); i++) { for (int i = 0; i < fileListByUUID.size(); i++) {
if (fileListByUUID.get(i).getPath().contains(".jpg") && !fileListByUUID.get(i).getPath().contains("paper.txt")) { if (!fileListByUUID.get(i).getPath().contains("paper.txt")){
if (fileListByUUID.get(i).exists()) { fileArrayList.add(fileListByUUID.get(i));
fileBeans.add(new FileBean(fileListByUUID.get(i), false)); }
}
}
Collections.sort(fileArrayList, new Comparator<File>() {
@Override
public int compare(File o1, File o2) {
String[] split = o1.getName().split(".webp");
String[] split2 = o2.getName().split(".webp");
int i = Integer.parseInt(split[0]);
int i2 = Integer.parseInt(split2[0]);
if (i>i2){
return 1;
}else {
return -1;
}
}
});
if (fileArrayList.size()>0){
for (int i = 0; i < fileArrayList.size(); i++) {
if (fileArrayList.get(i).getPath().contains(".webp") && !fileArrayList.get(i).getPath().contains("paper.txt")) {
if (fileArrayList.get(i).exists()) {
fileBeans.add(new FileBean(fileArrayList.get(i), false));
} }
} }
} }

View File

@ -110,7 +110,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
private int existence = 0; private int existence = 0;
private RelativeLayout linearExist; private RelativeLayout linearExist;
private Spinner spinnerExist; private Spinner spinnerExist;
String poiAddressName = "";
//获取的拍照图片 //获取的拍照图片
private LinearLayout linearContact; private LinearLayout linearContact;
private ContactView contactView; private ContactView contactView;
@ -703,9 +702,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
switch (v.getId()) { switch (v.getId()) {
case R.id.btn_save_local: case R.id.btn_save_local:
poiBuilder.append("点击了保存本地的按钮,"); poiBuilder.append("点击了保存本地的按钮,");
if (Constant.isPresent) {
initPoiSaveLocal(false); initPoiSaveLocal(false);
}
break; break;
case R.id.btn_uploading: case R.id.btn_uploading:
poiBuilder.append("点击了上传的按钮,"); poiBuilder.append("点击了上传的按钮,");
@ -758,7 +755,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
Constant.isPresent = false; Constant.isPresent = false;
} }
} else { } else {
Toast.makeText(getContext(), "有正在提交的数据,等提交成功后,方可操作", Toast.LENGTH_SHORT).show(); Toast.makeText(getContext(), "该任务正在提交中", Toast.LENGTH_SHORT).show();
} }
break; break;
case R.id.tv_poi_examine: case R.id.tv_poi_examine:
@ -766,10 +763,10 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
findingDuplicateByWork(); findingDuplicateByWork();
break; break;
case R.id.rl_panorama: case R.id.rl_panorama:
findingDuplicateByWork();
poiBuilder.append("点击了全景图的进行拍照,"); poiBuilder.append("点击了全景图的进行拍照,");
Intent intentPanorama = new Intent(getActivity(), PhotographActivity.class); Intent intentPanorama = new Intent(getActivity(), PhotographActivity.class);
File filePanorama = PhotoUtils.showPhotoFile("a", latLng); File filePanorama = PhotoUtils.showPhotoFile("a", latLng);
intentPanorama.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
intentPanorama.putExtra(Constant.INTENT_PHOTO_PATH, filePanorama.getPath()); intentPanorama.putExtra(Constant.INTENT_PHOTO_PATH, filePanorama.getPath());
startActivityForResult(intentPanorama, 101); startActivityForResult(intentPanorama, 101);
break; break;
@ -777,7 +774,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
poiBuilder.append("点击了名称的进行拍照,"); poiBuilder.append("点击了名称的进行拍照,");
Intent intentName = new Intent(getActivity(), PhotographActivity.class); Intent intentName = new Intent(getActivity(), PhotographActivity.class);
File fileName = PhotoUtils.showPhotoFile("b", latLng); File fileName = PhotoUtils.showPhotoFile("b", latLng);
intentName.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
intentName.putExtra(Constant.INTENT_PHOTO_PATH, fileName.getPath()); intentName.putExtra(Constant.INTENT_PHOTO_PATH, fileName.getPath());
startActivityForResult(intentName, 102); startActivityForResult(intentName, 102);
break; break;
@ -785,7 +781,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
poiBuilder.append("点击了内部照片的进行拍照,"); poiBuilder.append("点击了内部照片的进行拍照,");
Intent intentInternal = new Intent(getActivity(), PhotographActivity.class); Intent intentInternal = new Intent(getActivity(), PhotographActivity.class);
File fileInternal = PhotoUtils.showPhotoFile("c", latLng); File fileInternal = PhotoUtils.showPhotoFile("c", latLng);
intentInternal.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
intentInternal.putExtra(Constant.INTENT_PHOTO_PATH, fileInternal.getPath()); intentInternal.putExtra(Constant.INTENT_PHOTO_PATH, fileInternal.getPath());
startActivityForResult(intentInternal, 103); startActivityForResult(intentInternal, 103);
break; break;
@ -793,7 +788,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
poiBuilder.append("点击了名片的进行拍照,"); poiBuilder.append("点击了名片的进行拍照,");
Intent intentCard = new Intent(getActivity(), PhotographActivity.class); Intent intentCard = new Intent(getActivity(), PhotographActivity.class);
File fileCard = PhotoUtils.showPhotoFile("d", latLng); File fileCard = PhotoUtils.showPhotoFile("d", latLng);
intentCard.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
intentCard.putExtra(Constant.INTENT_PHOTO_PATH, fileCard.getPath()); intentCard.putExtra(Constant.INTENT_PHOTO_PATH, fileCard.getPath());
startActivityForResult(intentCard, 104); startActivityForResult(intentCard, 104);
break; break;
@ -801,7 +795,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
poiBuilder.append("点击了其他的进行拍照,"); poiBuilder.append("点击了其他的进行拍照,");
Intent intentElse = new Intent(getActivity(), PhotographActivity.class); Intent intentElse = new Intent(getActivity(), PhotographActivity.class);
File fileElse = PhotoUtils.showPhotoFile("e", latLng); File fileElse = PhotoUtils.showPhotoFile("e", latLng);
intentElse.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
intentElse.putExtra(Constant.INTENT_PHOTO_PATH, fileElse.getPath()); intentElse.putExtra(Constant.INTENT_PHOTO_PATH, fileElse.getPath());
startActivityForResult(intentElse, 105); startActivityForResult(intentElse, 105);
break; break;
@ -825,33 +818,56 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
public void onSuccess(TaskNameBean taskNameBean, int id) { public void onSuccess(TaskNameBean taskNameBean, int id) {
dismissLoadingDialog(); dismissLoadingDialog();
if (taskNameBean.getCode() == 200) { if (taskNameBean.getCode() == 200) {
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
btnUploading.setEnabled(true); btnUploading.setEnabled(true);
btnSaveLocal.setEnabled(true); btnSaveLocal.setEnabled(true);
editNameContent.setTextColor(Color.BLACK); editNameContent.setTextColor(Color.BLACK);
StringBuilder stringBuilder = new StringBuilder();
List<String> body = taskNameBean.getBody(); List<String> body = taskNameBean.getBody();
if (body != null) { if (body != null) {
for (int i = 0; i < body.size(); i++) { for (int i = 0; i < body.size(); i++) {
poiAddressName += body.get(i) + ","; stringBuilder.append(body.get(i)).append("");
} }
if (poiAddressName != null) { Toast.makeText(getActivity(), "存在类似名称---" + stringBuilder.toString(), Toast.LENGTH_SHORT).show();
Toast.makeText(getActivity(), "存在类似名称---" + poiAddressName, Toast.LENGTH_SHORT).show();
poiAddressName = "";
} else { } else {
Toast.makeText(getActivity(), "没有类似名称,可以作业", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), "没有类似名称,可以作业", Toast.LENGTH_SHORT).show();
} }
} else {
Toast.makeText(getActivity(), "没有类似名称,可以作业", Toast.LENGTH_SHORT).show();
} }
});
} else if (taskNameBean.getCode() == 203) { } else if (taskNameBean.getCode() == 203) {
if (getActivity() != null) {
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
FlushTokenUtil.flushToken(getActivity()); FlushTokenUtil.flushToken(getActivity());
}
});
}
} else { } else {
Toast.makeText(getActivity(), taskNameBean.getMessage() + "", Toast.LENGTH_SHORT).show(); if (getActivity() != null) {
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
btnUploading.setEnabled(false);
btnSaveLocal.setEnabled(false);
editNameContent.setTextColor(Color.RED);
Toast.makeText(getActivity(), taskNameBean.getMessage(), Toast.LENGTH_SHORT).show();
}
});
}
} }
} }
@Override @Override
public void onError(Throwable e, int id) { public void onError(Throwable e, int id) {
dismissLoadingDialog(); dismissLoadingDialog();
if (getActivity() == null) {
return;
}
String message = e.getMessage(); String message = e.getMessage();
assert message != null; assert message != null;
if (message.equals("timeout") || message.equals("Read time out")) { if (message.equals("timeout") || message.equals("Read time out")) {
@ -890,7 +906,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
poiSaveByNet(poiEntity); poiSaveByNet(poiEntity);
} else { } else {
poiSaveNet(poiEntity); poiSaveNet(poiEntity);
Constant.isPresent = false;
} }
} }
@ -934,6 +949,10 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退 Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台保存中,请稍候..."); WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台保存中,请稍候...");
WaitDialog.dismiss(1000); WaitDialog.dismiss(1000);
Message obtain = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR;
obtain.obj = true;
EventBus.getDefault().post(obtain);
} }
private void poiUploadByNetWork(int body, ArrayList<File> poiPicList) { private void poiUploadByNetWork(int body, ArrayList<File> poiPicList) {

View File

@ -297,8 +297,8 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
case "Polygon": // case "Polygon": //
List<LatLng> latLineString = GeometryTools.getLatLags(geo); List<LatLng> latLineString = GeometryTools.getLatLags(geo);
assert latLineString != null; assert latLineString != null;
latLng = latLineString.get(0); latLng = latLineString.get(0);//起點
rearLatLng = latLineString.get(latLineString.size() - 1); rearLatLng = latLineString.get(latLineString.size() - 1);//終點
break; break;
} }
BitmapDescriptor poiVideoDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_video_show); BitmapDescriptor poiVideoDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_video_show);
@ -319,7 +319,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
List<LatLng> latLineString = GeometryTools.getLatLags(geo); List<LatLng> latLineString = GeometryTools.getLatLags(geo);
assert latLineString != null; assert latLineString != null;
latLng = latLineString.get(0); latLng = latLineString.get(0);
rearLatLng = latLineString.get(latLineString.size() - 1);
break; break;
} }
BitmapDescriptor poiVideoDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_video_show); BitmapDescriptor poiVideoDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_video_show);
@ -341,16 +340,16 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
} }
} }
String describe = showPoiEntity.getMemo();//任务描述 String memo = showPoiEntity.getMemo();//任务描述
if (describe != null && !describe.equals("")) { if (memo != null && !memo.equals("")) {
etDesc.setText(describe); etDesc.setText(memo);
} }
String photoList = showPoiEntity.getPhoto(); String photoList = showPoiEntity.getPhoto();
if (!StringUtils.isEmpty(photoList)) { if (!StringUtils.isEmpty(photoList)) {
boolean isImageLoad = false; boolean isImageLoad = false;
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId()); List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
for (int i = 0; i < fileListByUUID.size(); i++) { for (int i = 0; i < fileListByUUID.size(); i++) {
if (fileListByUUID.get(i).getPath().contains(".jpg") && !fileListByUUID.get(i).getPath().contains("paper.txt")) { if (fileListByUUID.get(i).getPath().contains(".webp") && !fileListByUUID.get(i).getPath().contains("paper.txt")) {
if (fileListByUUID.get(i).exists() && !isImageLoad) { if (fileListByUUID.get(i).exists() && !isImageLoad) {
// 使用glide加载视频的第一帧 // 使用glide加载视频的第一帧
Glide.with(Objects.requireNonNull(getActivity())).load(fileListByUUID.get(i)).into(ivPoiVideoPicture); Glide.with(Objects.requireNonNull(getActivity())).load(fileListByUUID.get(i)).into(ivPoiVideoPicture);
@ -396,7 +395,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
boolean isImageLoad = false; boolean isImageLoad = false;
for (int i = 0; i < fileListByUUID.size(); i++) { for (int i = 0; i < fileListByUUID.size(); i++) {
File videoFile = fileListByUUID.get(i); File videoFile = fileListByUUID.get(i);
if (videoFile.getPath().contains(".jpg") && !videoFile.getPath().contains("paper.txt")) { if (videoFile.getPath().contains(".webp") && !videoFile.getPath().contains("paper.txt")) {
if (videoFile.exists() && !isImageLoad) { if (videoFile.exists() && !isImageLoad) {
// 使用glide加载视频的第一帧 // 使用glide加载视频的第一帧
AWMp4ParserHelper.getInstance().loadFirstWithGlide(getActivity(), Uri.fromFile(videoFile).toString(), ivPoiVideoPicture, 500); AWMp4ParserHelper.getInstance().loadFirstWithGlide(getActivity(), Uri.fromFile(videoFile).toString(), ivPoiVideoPicture, 500);
@ -425,23 +424,28 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
break; break;
case R.id.btn_poi_video_save: case R.id.btn_poi_video_save:
poiVideoBuilder.append("点击了保存本地的按钮 ,"); poiVideoBuilder.append("点击了保存本地的按钮 ,");
if (Constant.isPresent) {
initPoiSaveLocal(false); initPoiSaveLocal(false);
}
break; break;
case R.id.tv_short://手动拍摄 case R.id.tv_short://手动拍摄
poiVideoBuilder.append("点击了手动拍摄的按钮 ,"); poiVideoBuilder.append("点击了手动拍摄的按钮 ,");
double latitude = Constant.currentLocation.getLatitude(); double latitude = Constant.currentLocation.getLatitude();
double longitude = Constant.currentLocation.getLongitude(); double longitude = Constant.currentLocation.getLongitude();
LatLng startLatLng = new LatLng(latitude, longitude); //用户当前位置 LatLng startLatLng = new LatLng(latitude, longitude); //用户当前位置
double geometry = GeometryTools.distanceToDouble(startLatLng, latLng); double geometry = GeometryTools.distanceToDouble(startLatLng, latLng);// 起點 于用戶的距離
double rearGeometry = GeometryTools.distanceToDouble(startLatLng, rearLatLng); double rearGeometry = GeometryTools.distanceToDouble(startLatLng, rearLatLng);//終點于用戶的距離
if (geometry > 5000 || rearGeometry > 5000) { if (geometry > rearGeometry) {//用戶在终点开始作业
Toast.makeText(getActivity(), "用户距离作业起点或者终点五公里以内才能拍摄", Toast.LENGTH_SHORT).show(); if (rearGeometry > 5000) {
Toast.makeText(getActivity(), "用户距离作业终点五公里以内才能拍摄", Toast.LENGTH_SHORT).show();
return; return;
} else { }
} else {//用户在起点开始作业
if (geometry > 5000) {
Toast.makeText(getActivity(), "用户距离作业起点五公里以内才能拍摄", Toast.LENGTH_SHORT).show();
return;
}
}
Intent intents = new Intent(getActivity(), PicturesActivity.class); Intent intents = new Intent(getActivity(), PicturesActivity.class);
File filePath = AWMp4ParserHelper.getInstance().obtainJpgFilePath(new File(Constant.PICTURE_FOLDER, showPoiEntity.getId()).getAbsolutePath()); File filePath = AWMp4ParserHelper.getInstance().obtainWebpFilePath(new File(Constant.PICTURE_FOLDER, showPoiEntity.getId()).getAbsolutePath());
intents.putExtra(Constant.INTENT_JPG_PATH, filePath.getAbsolutePath()); intents.putExtra(Constant.INTENT_JPG_PATH, filePath.getAbsolutePath());
intents.putExtra(Constant.INTENT_VIDEO_OBLATION, 0); intents.putExtra(Constant.INTENT_VIDEO_OBLATION, 0);
intents.putExtra(Constant.INTENT_POI_VIDEO_TYPE, 2); intents.putExtra(Constant.INTENT_POI_VIDEO_TYPE, 2);
@ -449,19 +453,25 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
intents.putExtra(Constant.INTENT_GEO_WKT, showPoiEntity.getGeoWkt()); intents.putExtra(Constant.INTENT_GEO_WKT, showPoiEntity.getGeoWkt());
intents.putExtra(Constant.INTENT_DETAIL, showPoiEntity.getDetail()); intents.putExtra(Constant.INTENT_DETAIL, showPoiEntity.getDetail());
startActivityForResult(intents, 0x102); startActivityForResult(intents, 0x102);
}
break; break;
case R.id.tv_combo://自动连拍: case R.id.tv_combo://自动连拍:
poiVideoBuilder.append("点击了自动连拍的按钮 ,"); poiVideoBuilder.append("点击了自动连拍的按钮 ,");
LatLng startLng = new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()); //用户当前位置 LatLng startLng = new LatLng(Constant.currentLocation.getLatitude(), Constant.currentLocation.getLongitude()); //用户当前位置
double geom = GeometryTools.distanceToDouble(startLng, latLng); double geom = GeometryTools.distanceToDouble(startLng, latLng);
double rearGeom = GeometryTools.distanceToDouble(startLng, rearLatLng); double rearGeom = GeometryTools.distanceToDouble(startLng, rearLatLng);
if (geom > 5000 || rearGeom > 5000) { if (geom > rearGeom) {//用戶在终点开始作业
Toast.makeText(getActivity(), "用户距离作业起点或者终点五公里以内才能拍摄", Toast.LENGTH_SHORT).show(); if (rearGeom > 5000) {
Toast.makeText(getActivity(), "用户距离作业终点五公里以内才能拍摄", Toast.LENGTH_SHORT).show();
return; return;
} else { }
} else {//用户在起点开始作业
if (geom > 5000) {
Toast.makeText(getActivity(), "用户距离作业起点五公里以内才能拍摄", Toast.LENGTH_SHORT).show();
return;
}
}
Intent intent = new Intent(getActivity(), PicturesActivity.class); Intent intent = new Intent(getActivity(), PicturesActivity.class);
File fileJpgPath = AWMp4ParserHelper.getInstance().obtainJpgFilePath(new File(Constant.PICTURE_FOLDER, showPoiEntity.getId()).getAbsolutePath()); File fileJpgPath = AWMp4ParserHelper.getInstance().obtainWebpFilePath(new File(Constant.PICTURE_FOLDER, showPoiEntity.getId()).getAbsolutePath());
intent.putExtra(Constant.INTENT_JPG_PATH, fileJpgPath.getAbsolutePath()); intent.putExtra(Constant.INTENT_JPG_PATH, fileJpgPath.getAbsolutePath());
intent.putExtra(Constant.INTENT_VIDEO_OBLATION, 0); intent.putExtra(Constant.INTENT_VIDEO_OBLATION, 0);
intent.putExtra(Constant.INTENT_POI_VIDEO_TYPE, 1); intent.putExtra(Constant.INTENT_POI_VIDEO_TYPE, 1);
@ -469,7 +479,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
intent.putExtra(Constant.INTENT_GEO_WKT, showPoiEntity.getGeoWkt()); intent.putExtra(Constant.INTENT_GEO_WKT, showPoiEntity.getGeoWkt());
intent.putExtra(Constant.INTENT_DETAIL, showPoiEntity.getDetail()); intent.putExtra(Constant.INTENT_DETAIL, showPoiEntity.getDetail());
startActivityForResult(intent, 0x101); startActivityForResult(intent, 0x101);
}
break; break;
case R.id.btn_poi_video_upload: case R.id.btn_poi_video_upload:
poiVideoBuilder.append("点击了上传的按钮 ,"); poiVideoBuilder.append("点击了上传的按钮 ,");
@ -518,7 +527,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
return; return;
} }
} else { } else {
Toast.makeText(getContext(), "有正在提交的数据,等提交成功后,方可操作", Toast.LENGTH_SHORT).show(); Toast.makeText(getContext(), "该任务正在提交中", Toast.LENGTH_SHORT).show();
} }
break; break;
} }
@ -550,7 +559,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
poiVideoSave(poiEntity); poiVideoSave(poiEntity);
} else { } else {
poiVideoSaveNet(poiEntity); poiVideoSaveNet(poiEntity);
Constant.isPresent = false;
} }
} }
@ -592,6 +600,10 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退 Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台保存中,请稍候..."); WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台保存中,请稍候...");
WaitDialog.dismiss(1000); WaitDialog.dismiss(1000);
Message obtain = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR;
obtain.obj = true;
EventBus.getDefault().post(obtain);
} }
private void poiVideoUpload(int poiVideoBody, File fileZip) { private void poiVideoUpload(int poiVideoBody, File fileZip) {
@ -680,6 +692,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
} else { } else {
Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
} }
Log.d("TAG", "onError: " + e.getMessage());
} }
}); });
} }
@ -798,7 +811,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
} else if (response.getCode() == 203) { } else if (response.getCode() == 203) {
FlushTokenUtil.flushToken(getActivity()); FlushTokenUtil.flushToken(getActivity());
} else { } else {
Toast.makeText(getActivity(), response.getMessage()+"", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
} }
} }
@ -869,6 +882,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
poiEntity.setDetail(lineString); poiEntity.setDetail(lineString);
} }
} }
return poiEntity; return poiEntity;
} }

View File

@ -77,7 +77,7 @@ import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
/** /*
* 寻宝-点击上传弹窗-道路 * 寻宝-点击上传弹窗-道路
*/ */
@ -316,7 +316,6 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
List<LatLng> latLineString = GeometryTools.getLatLags(geo); List<LatLng> latLineString = GeometryTools.getLatLags(geo);
assert latLineString != null; assert latLineString != null;
latLng = latLineString.get(0); latLng = latLineString.get(0);
rearLatLng = latLineString.get(latLineString.size() - 1);
break; break;
} }
BitmapDescriptor roadDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_road_show); BitmapDescriptor roadDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_road_show);
@ -347,7 +346,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
boolean isImageLoad = false; boolean isImageLoad = false;
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId()); List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(showPoiEntity.getId());
for (int i = 0; i < fileListByUUID.size(); i++) { for (int i = 0; i < fileListByUUID.size(); i++) {
if (fileListByUUID.get(i).getPath().contains(".jpg") && !fileListByUUID.get(i).getPath().contains("paper.txt")) { if (fileListByUUID.get(i).getPath().contains(".webp") && !fileListByUUID.get(i).getPath().contains("paper.txt")) {
if (fileListByUUID.get(i).exists() && !isImageLoad) { if (fileListByUUID.get(i).exists() && !isImageLoad) {
// 使用glide加载视频的第一帧 // 使用glide加载视频的第一帧
Glide.with(Objects.requireNonNull(getActivity())).load(fileListByUUID.get(i)).into(ivRoadPicture); Glide.with(Objects.requireNonNull(getActivity())).load(fileListByUUID.get(i)).into(ivRoadPicture);
@ -373,7 +372,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
if (!StringUtils.isEmpty(photo)) { if (!StringUtils.isEmpty(photo)) {
File videoFile = new File(photo); File videoFile = new File(photo);
videoFileList.add(new File(photo)); videoFileList.add(new File(photo));
if (videoFile.getPath().contains(".jpg") && !videoFile.getPath().contains("paper.txt")) { if (videoFile.getPath().contains(".webp") && !videoFile.getPath().contains("paper.txt")) {
if (videoFile.exists() && !isImageLoad) { if (videoFile.exists() && !isImageLoad) {
// 使用glide加载视频的第一帧 // 使用glide加载视频的第一帧
AWMp4ParserHelper.getInstance().loadFirstWithGlide(getActivity(), Uri.fromFile(videoFile).toString(), ivRoadPicture, 500); AWMp4ParserHelper.getInstance().loadFirstWithGlide(getActivity(), Uri.fromFile(videoFile).toString(), ivRoadPicture, 500);
@ -410,7 +409,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
boolean isImageLoad = false; boolean isImageLoad = false;
for (int i = 0; i < fileListByUUID.size(); i++) { for (int i = 0; i < fileListByUUID.size(); i++) {
File videoFile = fileListByUUID.get(i); File videoFile = fileListByUUID.get(i);
if (videoFile.getPath().contains(".jpg") && !videoFile.getPath().contains("paper.txt")) { if (videoFile.getPath().contains(".webp") && !videoFile.getPath().contains("paper.txt")) {
if (videoFile.exists() && !isImageLoad) { if (videoFile.exists() && !isImageLoad) {
// 使用glide加载视频的第一帧 // 使用glide加载视频的第一帧
AWMp4ParserHelper.getInstance().loadFirstWithGlide(getActivity(), Uri.fromFile(videoFile).toString(), ivRoadPicture, 500); AWMp4ParserHelper.getInstance().loadFirstWithGlide(getActivity(), Uri.fromFile(videoFile).toString(), ivRoadPicture, 500);
@ -428,9 +427,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
switch (v.getId()) { switch (v.getId()) {
case R.id.btn_road_save: case R.id.btn_road_save:
roadBuilder.append("点击了保存本地的按钮 ,"); roadBuilder.append("点击了保存本地的按钮 ,");
if (Constant.isPresent) {
initPoiSaveLocal(false); initPoiSaveLocal(false);
}
break; break;
case R.id.fm_road_picture: case R.id.fm_road_picture:
roadBuilder.append("点击了图片查看列表 ,"); roadBuilder.append("点击了图片查看列表 ,");
@ -450,12 +447,19 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
LatLng startLatLng = new LatLng(latitude, longitude); //用户当前位置 LatLng startLatLng = new LatLng(latitude, longitude); //用户当前位置
double geometry = GeometryTools.distanceToDouble(startLatLng, latLng); double geometry = GeometryTools.distanceToDouble(startLatLng, latLng);
double rearGeometry = GeometryTools.distanceToDouble(startLatLng, rearLatLng); double rearGeometry = GeometryTools.distanceToDouble(startLatLng, rearLatLng);
if (geometry > 5000 || rearGeometry > 5000) { if (geometry > rearGeometry) {//用戶在终点开始作业
Toast.makeText(getActivity(), "用户距离作业起点或者终点五公里以内才能拍摄", Toast.LENGTH_SHORT).show(); if (rearGeometry > 5000) {
Toast.makeText(getActivity(), "用户距离作业终点五公里以内才能拍摄", Toast.LENGTH_SHORT).show();
return; return;
} else { }
} else {//用户在起点开始作业
if (geometry > 5000) {
Toast.makeText(getActivity(), "用户距离作业起点五公里以内才能拍摄", Toast.LENGTH_SHORT).show();
return;
}
}
Intent intent = new Intent(getContext(), PicturesActivity.class); Intent intent = new Intent(getContext(), PicturesActivity.class);
File finalFile = AWMp4ParserHelper.getInstance().obtainJpgFilePath(new File(Constant.PICTURE_FOLDER, showPoiEntity.getId()).getAbsolutePath()); File finalFile = AWMp4ParserHelper.getInstance().obtainWebpFilePath(new File(Constant.PICTURE_FOLDER, showPoiEntity.getId()).getAbsolutePath());
intent.putExtra(Constant.INTENT_JPG_PATH, finalFile.getAbsolutePath()); intent.putExtra(Constant.INTENT_JPG_PATH, finalFile.getAbsolutePath());
intent.putExtra(Constant.INTENT_VIDEO_OBLATION, 0); intent.putExtra(Constant.INTENT_VIDEO_OBLATION, 0);
intent.putExtra(Constant.INTENT_POI_VIDEO_TYPE, 3); intent.putExtra(Constant.INTENT_POI_VIDEO_TYPE, 3);
@ -463,7 +467,6 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
intent.putExtra(Constant.INTENT_GEO_WKT, showPoiEntity.getGeoWkt()); intent.putExtra(Constant.INTENT_GEO_WKT, showPoiEntity.getGeoWkt());
intent.putExtra(Constant.INTENT_DETAIL, showPoiEntity.getDetail()); intent.putExtra(Constant.INTENT_DETAIL, showPoiEntity.getDetail());
startActivityForResult(intent, 0x101); startActivityForResult(intent, 0x101);
}
break; break;
case R.id.road_upload: case R.id.road_upload:
roadBuilder.append("点击了上传的按钮 ,"); roadBuilder.append("点击了上传的按钮 ,");
@ -513,7 +516,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
return; return;
} }
} else { } else {
Toast.makeText(getContext(), "有正在提交的数据,等提交成功后,方可操作", Toast.LENGTH_SHORT).show(); Toast.makeText(getContext(), "该任务正在提交中", Toast.LENGTH_SHORT).show();
} }
break; break;
} }
@ -544,7 +547,6 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
roadSaveBetWork(poiEntity); roadSaveBetWork(poiEntity);
} else { } else {
roadSaveWork(poiEntity); roadSaveWork(poiEntity);
Constant.isPresent = false;
} }
} }
@ -585,6 +587,10 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退 Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack();//回退
WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台保存中,请稍候..."); WaitDialog.show((AppCompatActivity) getActivity(), "任务正在后台保存中,请稍候...");
WaitDialog.dismiss(1000); WaitDialog.dismiss(1000);
Message obtain = Message.obtain();
obtain.what = Constant.JOB_WORD_MONITOR;
obtain.obj = true;
EventBus.getDefault().post(obtain);
} }

View File

@ -556,7 +556,7 @@ public class TreasureFragment extends BaseFragment implements View.OnClickListen
public void onSuccess(UserBean response, int id) { public void onSuccess(UserBean response, int id) {
dismissLoadingDialog(); dismissLoadingDialog();
if (response.getCode() == 200) {//上传用户位置金纬度 寻宝删选接口请求成功 if (response.getCode() == 200) {//上传用户位置金纬度 寻宝删选接口请求成功
Toast.makeText(getActivity(), "上传用户位置成功", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), response.getMessage()+"", Toast.LENGTH_SHORT).show();
} else if (response.getCode() == 203) { } else if (response.getCode() == 203) {
FlushTokenUtil.flushToken(getActivity()); FlushTokenUtil.flushToken(getActivity());
} else { } else {

View File

@ -186,7 +186,6 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
userAttestationBuilder.append("点击身份证人像面 进行拍照 ,"); userAttestationBuilder.append("点击身份证人像面 进行拍照 ,");
Intent ivAttestationIntent1 = new Intent(getActivity(), PhotographActivity.class); Intent ivAttestationIntent1 = new Intent(getActivity(), PhotographActivity.class);
File attestationFile1 = PhotoUtils.showPhotoFile("a", null); File attestationFile1 = PhotoUtils.showPhotoFile("a", null);
ivAttestationIntent1.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
ivAttestationIntent1.putExtra(Constant.INTENT_PHOTO_PATH, attestationFile1.getPath()); ivAttestationIntent1.putExtra(Constant.INTENT_PHOTO_PATH, attestationFile1.getPath());
startActivityForResult(ivAttestationIntent1, 121); startActivityForResult(ivAttestationIntent1, 121);
break; break;
@ -194,7 +193,6 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
userAttestationBuilder.append("点击身份证国徽面 进行拍照 ,"); userAttestationBuilder.append("点击身份证国徽面 进行拍照 ,");
Intent ivAttestationIntent2 = new Intent(getActivity(), PhotographActivity.class); Intent ivAttestationIntent2 = new Intent(getActivity(), PhotographActivity.class);
File attestationFile2 = PhotoUtils.showPhotoFile("b", null); File attestationFile2 = PhotoUtils.showPhotoFile("b", null);
ivAttestationIntent2.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
ivAttestationIntent2.putExtra(Constant.INTENT_PHOTO_PATH, attestationFile2.getPath()); ivAttestationIntent2.putExtra(Constant.INTENT_PHOTO_PATH, attestationFile2.getPath());
startActivityForResult(ivAttestationIntent2, 122); startActivityForResult(ivAttestationIntent2, 122);
break; break;
@ -202,7 +200,6 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
userAttestationBuilder.append("点击手持身份证 进行拍照 ,"); userAttestationBuilder.append("点击手持身份证 进行拍照 ,");
Intent ivAttestationIntent3 = new Intent(getActivity(), PhotographActivity.class); Intent ivAttestationIntent3 = new Intent(getActivity(), PhotographActivity.class);
File attestationFile3 = PhotoUtils.showPhotoFile("c", null); File attestationFile3 = PhotoUtils.showPhotoFile("c", null);
ivAttestationIntent3.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
ivAttestationIntent3.putExtra(Constant.INTENT_PHOTO_PATH, attestationFile3.getPath()); ivAttestationIntent3.putExtra(Constant.INTENT_PHOTO_PATH, attestationFile3.getPath());
startActivityForResult(ivAttestationIntent3, 123); startActivityForResult(ivAttestationIntent3, 123);
break; break;
@ -225,7 +222,6 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
userAttestationBuilder.append("点击认证按钮 ,"); userAttestationBuilder.append("点击认证按钮 ,");
Intent userCameraIntent = new Intent(getActivity(), PhotographActivity.class); Intent userCameraIntent = new Intent(getActivity(), PhotographActivity.class);
File file = PhotoUtils.showPhotoFile("d", null); File file = PhotoUtils.showPhotoFile("d", null);
userCameraIntent.putExtra(Constant.INTENT_VIDEO_OBLATION, 1);
userCameraIntent.putExtra(Constant.INTENT_PHOTO_PATH, file.getPath()); userCameraIntent.putExtra(Constant.INTENT_PHOTO_PATH, file.getPath());
startActivityForResult(userCameraIntent, 124); startActivityForResult(userCameraIntent, 124);
break; break;

View File

@ -225,9 +225,9 @@ public class WithdrawFragment extends BaseFragment implements View.OnClickListen
Toast.makeText(getActivity(), "请勾选银行卡", Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), "请勾选银行卡", Toast.LENGTH_SHORT).show();
return; return;
} }
if (Constant.ID_NUMBER != null) { if (Constant.BACKGROUND != null) {
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS; DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否提取到" + Constant.ID_NUMBER.substring(Constant.ID_NUMBER.length() - 4) + "的银行卡", "确定", "取消").setOkButton(new OnDialogButtonClickListener() { MessageDialog.show((AppCompatActivity) Objects.requireNonNull(getContext()), "提示", "是否提取到" + Constant.BACKGROUND.substring(Constant.BACKGROUND.length() - 4) + "的银行卡", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
@Override @Override
public boolean onClick(BaseDialog baseDialog, View v) { public boolean onClick(BaseDialog baseDialog, View v) {
immediatelyPrice(); immediatelyPrice();

View File

@ -14,9 +14,7 @@ public class HttpInterface {
public static String IP1 = "http://dtxbmaps.navinfo.com/dtxb/msg/"; public static String IP1 = "http://dtxbmaps.navinfo.com/dtxb/msg/";
public static final String DATA_IP = "http://172.23.139.4:9999/m4";//接口 public static final String DATA_IP = "http://172.23.139.4:9999/m4";//接口
*/ */
/* /*用户版本升级*/
用户版本升级
*/
// dtxbmaps.navinfo.com/dtxb/m4/user/appVersion/checkVersion?version=155&operationType=android // dtxbmaps.navinfo.com/dtxb/m4/user/appVersion/checkVersion?version=155&operationType=android
// 172.23.139.4:8001/appVersion/checkVersion?version=155&operationType=android //version是版本 operationType固定值 安卓 get // 172.23.139.4:8001/appVersion/checkVersion?version=155&operationType=android //version是版本 operationType固定值 安卓 get
public static String APP_CHECK_VERSION; //版本升级 public static String APP_CHECK_VERSION; //版本升级

View File

@ -33,7 +33,7 @@ public class PhotoUtils {
lat= initEncode(latLng); lat= initEncode(latLng);
} }
long time = System.currentTimeMillis(); long time = System.currentTimeMillis();
return new File(Constant.PICTURE_FOLDER, d + time + "_p" + lat + "_a" + 0 + ".jpg"); return new File(Constant.PICTURE_FOLDER, d + time + "_p" + lat + "_a" + 0 + ".webp");
} }

View File

@ -47,6 +47,7 @@
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintWidth_default="percent" app:layout_constraintWidth_default="percent"
app:layout_constraintWidth_percent="0.4" /> app:layout_constraintWidth_percent="0.4" />
</FrameLayout> </FrameLayout>
<ImageView <ImageView
@ -91,17 +92,17 @@
app:layout_constraintLeft_toLeftOf="@id/iv_zoom_add" app:layout_constraintLeft_toLeftOf="@id/iv_zoom_add"
app:layout_constraintTop_toBottomOf="@id/iv_zoom_add" /> app:layout_constraintTop_toBottomOf="@id/iv_zoom_add" />
<!-- <CheckBox--> <!--<CheckBox
<!-- android:id="@+id/cb_map_type"--> android:id="@+id/cb_map_type"
<!-- android:layout_width="50dp"--> android:layout_width="50dp"
<!-- android:layout_height="50dp"--> android:layout_height="50dp"
<!-- android:layout_marginTop="15dp"--> android:layout_marginTop="15dp"
<!-- android:background="@drawable/atlas_selector"--> android:background="@drawable/atlas_selector"
<!-- android:button="@null"--> android:button="@null"
<!-- android:checked="false"--> android:checked="false"
<!-- android:visibility="gone"--> android:visibility="gone"
<!-- app:layout_constraintLeft_toLeftOf="@id/iv_zoom_del"--> app:layout_constraintLeft_toLeftOf="@id/iv_zoom_del"
<!-- app:layout_constraintTop_toBottomOf="@id/iv_zoom_del" />--> app:layout_constraintTop_toBottomOf="@id/iv_zoom_del" />-->
<ImageView <ImageView
android:id="@+id/iv_location" android:id="@+id/iv_location"
@ -124,6 +125,46 @@
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<RadioGroup
android:id="@+id/radio_group_picture"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:orientation="vertical"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@+id/capture_picture"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/image_view">
<RadioButton
android:id="@+id/radio_btn_hand"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginBottom="15dp"
android:text="手动"
android:textColor="@color/white" />
<RadioButton
android:id="@+id/radio_btn_auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginBottom="15dp"
android:text="自动1秒"
android:textColor="@color/white" />
<RadioButton
android:id="@+id/radio_btn_auto_sec"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_marginBottom="15dp"
android:text="自动2秒"
android:textColor="@color/white" />
</RadioGroup>
<ImageView <ImageView
android:id="@+id/iv_pic" android:id="@+id/iv_pic"
android:layout_width="wrap_content" android:layout_width="wrap_content"

View File

@ -546,7 +546,7 @@
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginStart="20dp" android:layout_marginStart="20dp"
android:layout_toEndOf="@id/image_charge_report" android:layout_toEndOf="@id/image_charge_report"
android:text="道路上报任务金额" android:text="充电站上报任务金额"
android:textColor="#333" android:textColor="#333"
android:textSize="18sp" /> android:textSize="18sp" />