fix: 修改zip包中ocr文件后缀,修改竖向拍摄检查,修改速度检查原则(卫星)
This commit is contained in:
parent
82605b895e
commit
5853e3f940
@ -345,6 +345,21 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
return;
|
||||
}
|
||||
if (isChecked) {
|
||||
// 如果当前手机是竖向,则不允许拍照
|
||||
if (Objects.requireNonNull(camera.getPictureSize()).getWidth() < camera.getPictureSize().getHeight()) {
|
||||
isOration = true;
|
||||
ToastUtils.Message(PicturesActivity.this, "不允许竖向拍摄...");
|
||||
picturesBuilder.append("camera 用户竖屏拍照 ,");
|
||||
stopTakePhoto();
|
||||
capturePicture.setChecked(false);
|
||||
if (radioPicture != 1) {
|
||||
capturePicture.setText("开始采集");
|
||||
capturePicture.setChecked(false);
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
isOration = false;
|
||||
}
|
||||
if (radioPicture != 1) {
|
||||
capturePicture.setText("暂停采集");
|
||||
picturesBuilder.append(TimestampUtil.time()).append(",").append("capturePicture 点击了开始采集 ,");
|
||||
@ -513,25 +528,10 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
super.onPictureTaken(result);
|
||||
System.out.println("收到拍照按钮jieguo:"+result.getSize().toString());
|
||||
isBack = true;
|
||||
// 如果当前手机是竖向,则不允许拍照
|
||||
if (Objects.requireNonNull(camera.getPictureSize()).getWidth() < camera.getPictureSize().getHeight()) {
|
||||
isOration = true;
|
||||
ToastUtils.Message(PicturesActivity.this, "不允许竖向拍摄...");
|
||||
picturesBuilder.append("camera 用户竖屏拍照 ,");
|
||||
stopTakePhoto();
|
||||
capturePicture.setChecked(false);
|
||||
if (radioPicture != 1) {
|
||||
capturePicture.setText("开始采集");
|
||||
capturePicture.setChecked(false);
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
isOration = false;
|
||||
}
|
||||
// 道路任务增加检查
|
||||
if (type == 4) {
|
||||
// 检测到当前车辆未移动,则无需进行拍摄
|
||||
if (!speedCheck.checkIsMove(LocationLifeCycle.getInstance().getMainLocation(), GPSUtils.getInstance(PicturesActivity.this).getSateliteCount())) {
|
||||
if (!speedCheck.checkIsMove(LocationLifeCycle.getInstance().getMainLocation(), LocationLifeCycle.getInstance().getTencentLocation().getGPSRssi())) {
|
||||
com.github.lazylibrary.util.ToastUtils.showToast(PicturesActivity.this, "车辆静止中,暂停拍摄!");
|
||||
return;
|
||||
}
|
||||
@ -544,9 +544,9 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
}
|
||||
} else {
|
||||
isBack = false;
|
||||
if (isOration) {
|
||||
stopTakePhoto();
|
||||
}
|
||||
// if (isOration) {
|
||||
// }
|
||||
if (radioPicture != 1) {
|
||||
capturePicture.setText("开始采集");
|
||||
}
|
||||
@ -623,56 +623,56 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
}
|
||||
}
|
||||
|
||||
class Jpg2WebpRunnable implements Runnable {
|
||||
//private PictureResult pictureResult;
|
||||
private File file;
|
||||
private int count;/*线程重复执行的次数*/
|
||||
private boolean isBoolean;
|
||||
private int index;
|
||||
// 该转换执行次数,如果连续3次执行失败,则不再转换
|
||||
|
||||
public Jpg2WebpRunnable(/*PictureResult pictureResult,*/ File file, int count, boolean isBoolean, int index/*照片的索引*/) {
|
||||
//this.pictureResult = pictureResult;
|
||||
this.file = file;
|
||||
this.count = count;
|
||||
this.isBoolean = isBoolean;
|
||||
this.index = index;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (file.exists() && file != null) {
|
||||
initMarkerPaper(index);
|
||||
if (PicturesActivity.this != null&&handler != null) {
|
||||
if (radioPicture == 1) {
|
||||
Message message = new Message();
|
||||
message.what = 0x103;
|
||||
handler.sendMessage(message);
|
||||
} else {
|
||||
Message message = new Message();
|
||||
message.what = 0x104;
|
||||
message.arg1 = index;
|
||||
handler.sendMessage(message);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
isBack = false;
|
||||
if (isOration) {
|
||||
stopTakePhoto();
|
||||
}
|
||||
if (radioPicture != 1) {
|
||||
capturePicture.setText("开始采集");
|
||||
}
|
||||
capturePicture.setChecked(false);
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
ToastUtils.Message(PicturesActivity.this, "源文件不存在");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
// class Jpg2WebpRunnable implements Runnable {
|
||||
// //private PictureResult pictureResult;
|
||||
// private File file;
|
||||
// private int count;/*线程重复执行的次数*/
|
||||
// private boolean isBoolean;
|
||||
// private int index;
|
||||
// // 该转换执行次数,如果连续3次执行失败,则不再转换
|
||||
//
|
||||
// public Jpg2WebpRunnable(/*PictureResult pictureResult,*/ File file, int count, boolean isBoolean, int index/*照片的索引*/) {
|
||||
// //this.pictureResult = pictureResult;
|
||||
// this.file = file;
|
||||
// this.count = count;
|
||||
// this.isBoolean = isBoolean;
|
||||
// this.index = index;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void run() {
|
||||
// if (file.exists() && file != null) {
|
||||
// initMarkerPaper(index);
|
||||
// if (PicturesActivity.this != null&&handler != null) {
|
||||
// if (radioPicture == 1) {
|
||||
// Message message = new Message();
|
||||
// message.what = 0x103;
|
||||
// handler.sendMessage(message);
|
||||
// } else {
|
||||
// Message message = new Message();
|
||||
// message.what = 0x104;
|
||||
// message.arg1 = index;
|
||||
// handler.sendMessage(message);
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// isBack = false;
|
||||
// if (isOration) {
|
||||
// stopTakePhoto();
|
||||
// }
|
||||
// if (radioPicture != 1) {
|
||||
// capturePicture.setText("开始采集");
|
||||
// }
|
||||
// capturePicture.setChecked(false);
|
||||
// runOnUiThread(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// ToastUtils.Message(PicturesActivity.this, "源文件不存在");
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
private void initLine() {
|
||||
if (geoWkt != null) {
|
||||
|
||||
@ -3,8 +3,8 @@ package com.navinfo.outdoor.http;
|
||||
public class HttpInterface {
|
||||
// public static final String IP = "http://172.23.138.133:9999/m4";//测试接口-IP
|
||||
public static final String IP0 = "http://dtxbmaps.navinfo.com/dtxb/dev/m4";//开发接口-外网
|
||||
public static final String IP1 = "http://dtxbmaps.navinfo.com/dtxb/test/m4";//测试接口-外网
|
||||
public static final String IP = "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口
|
||||
public static final String IP = "http://dtxbmaps.navinfo.com/dtxb/test/m4";//测试接口-外网
|
||||
public static final String IP2 = "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口
|
||||
public static final String USER_PATH = "/user/";//我的
|
||||
public static final String MSG_LIST_PATH = "/msgList/";//发现
|
||||
public static final String USER_LOGIN_PATH = "/userlogin/";//登录
|
||||
|
||||
@ -10,7 +10,7 @@ class PicturesSpeedCheck {
|
||||
/**
|
||||
* 与前面的4个点做检查,如果当前点位距离前面4个点的距离超过阈值,且当前卫星信号强度为中以上(8颗),则返回false
|
||||
* */
|
||||
fun checkIsMove(myLocation: MyLocation, sateliteCount: Int/*卫星颗数*/): Boolean {
|
||||
fun checkIsMove(myLocation: MyLocation, gpsRssi: Int/*定位信号强度*/): Boolean {
|
||||
pointList.add(myLocation)
|
||||
if (pointList.size<5) { // 点位小于4个,不做判断,默认为运动中
|
||||
return true
|
||||
@ -19,7 +19,7 @@ class PicturesSpeedCheck {
|
||||
pointList.removeAt(0)
|
||||
}
|
||||
|
||||
if (sateliteCount<3) { // 腾讯定位信号强度不是“强”,则忽略速度判定
|
||||
if (gpsRssi<3) { // 腾讯定位信号强度不是“强”,则忽略速度判定
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user