fix: 修改bug

This commit is contained in:
xiaoyan 2023-07-28 17:34:00 +08:00
parent d6b917fb72
commit dc41a9bba8
8 changed files with 79 additions and 69 deletions

View File

@ -37,8 +37,8 @@ android {
applicationId "com.navinfo.outdoor" applicationId "com.navinfo.outdoor"
minSdkVersion 24 minSdkVersion 24
targetSdkVersion 30 targetSdkVersion 30
versionCode 111 versionCode 112
versionName "8.230721-正式版-OCR-BUGFIX" versionName "8.230728-正式版-OCR"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk { ndk {

View File

@ -750,14 +750,14 @@ public class AutoTakePicture4PoiActivity extends BaseActivity implements View.On
@Override @Override
public void onNext(PoiEntity poiEntity) { public void onNext(PoiEntity poiEntity) {
logger.d("领取任务成功:", poiEntity.getId()); logger.d(null, "领取任务成功:", poiEntity.getId());
} }
@Override @Override
public void onError(Throwable e) { public void onError(Throwable e) {
systemTTS.playText("注意,领取任务失败!"); systemTTS.playText("注意,领取任务失败!");
if (AutoTakePicture4PoiActivity.this!=null) { if (AutoTakePicture4PoiActivity.this!=null) {
logger.d("领取任务失败:", e.getMessage()+",网络状态-:"+ NetWorkUtils.getNetworkTypeName(AutoTakePicture4PoiActivity.this)); logger.d(null, "领取任务失败:", e.getMessage()+",网络状态-:"+ NetWorkUtils.getNetworkTypeName(AutoTakePicture4PoiActivity.this));
} }
} }
@ -773,7 +773,7 @@ public class AutoTakePicture4PoiActivity extends BaseActivity implements View.On
private double minDistance = MATCH_START_BUFFER_DISTANCE; // 最小距离需要在匹配过程点时判断哪个任务是距离最小的 private double minDistance = MATCH_START_BUFFER_DISTANCE; // 最小距离需要在匹配过程点时判断哪个任务是距离最小的
private void startMatchRoadLink(Point currentPoint) { private void startMatchRoadLink(Point currentPoint) {
if (roadLinkEntityList == null/*没有需要匹配的道路数据*/ || currentPoint == null/*没有位置信息*/) { if (roadLinkEntityList == null/*没有需要匹配的道路数据*/ || currentPoint == null/*没有位置信息*/) {
logger.d("开始匹配:", "roadLinkEntityList == null:"+(roadLinkEntityList == null)+",currentPoint == null"+(currentPoint == null)); logger.d(null, "开始匹配:", "roadLinkEntityList == null:"+(roadLinkEntityList == null)+",currentPoint == null"+(currentPoint == null));
return; return;
} }
double[] speedAndBearing = getSpeedAndBearing(currentPoint); double[] speedAndBearing = getSpeedAndBearing(currentPoint);
@ -785,7 +785,7 @@ public class AutoTakePicture4PoiActivity extends BaseActivity implements View.On
matchMiddleDistance = MATCH_BUFFER_DISTANCE*1.5; matchMiddleDistance = MATCH_BUFFER_DISTANCE*1.5;
} }
// 此处开始匹配起点 // 此处开始匹配起点
logger.d("开始匹配起点位置:", "currentLocation:"+currentPoint.toString()+",可匹配数据个数:"+roadLinkEntityList.size()); logger.d(null, "开始匹配起点位置:", "currentLocation:"+currentPoint.toString()+",可匹配数据个数:"+roadLinkEntityList.size());
List<RoadMatchEntity> matchStartList = roadLinkEntityList.stream() List<RoadMatchEntity> matchStartList = roadLinkEntityList.stream()
// 筛选当前任务与起点距离 // 筛选当前任务与起点距离
.filter(it-> { .filter(it-> {
@ -803,7 +803,7 @@ public class AutoTakePicture4PoiActivity extends BaseActivity implements View.On
return true; return true;
} else { } else {
// 根据方向判定无法匹配 // 根据方向判定无法匹配
logger.d("方向不匹配:", "currentBearing:"+currentBearing+",数据角度:"+dataBearing+",数据id:"+it.getDataDetail().getId()); logger.d(null, "方向不匹配:", "currentBearing:"+currentBearing+",数据角度:"+dataBearing+",数据id:"+it.getDataDetail().getId());
return false; return false;
} }
} else { } else {
@ -844,7 +844,7 @@ public class AutoTakePicture4PoiActivity extends BaseActivity implements View.On
// 将匹配到的数据加入到已匹配列表中 // 将匹配到的数据加入到已匹配列表中
roadMatchEntityList.addAll(matchStartList); roadMatchEntityList.addAll(matchStartList);
} else { } else {
logger.d("匹配起点数据为空:", "当前位置为:"+currentPoint.toString()+"当前角度:"+currentBearing); logger.d(null, "匹配起点数据为空:", "当前位置为:"+currentPoint.toString()+"当前角度:"+currentBearing);
} }
// 尝试用当前位置点匹配已经匹配到的roadLink如果能匹配到需要将该点记录如果无法匹配则需要评估已匹配的link是否需要被剔除 // 尝试用当前位置点匹配已经匹配到的roadLink如果能匹配到需要将该点记录如果无法匹配则需要评估已匹配的link是否需要被剔除
@ -1200,7 +1200,7 @@ public class AutoTakePicture4PoiActivity extends BaseActivity implements View.On
* 初始化领取任务的管理栈 * 初始化领取任务的管理栈
* */ * */
private Observable<PoiEntity> receiverRoadTask(RoadMatchEntity entity) { private Observable<PoiEntity> receiverRoadTask(RoadMatchEntity entity) {
logger.d("开始领取任务:", entity.getId()+""); logger.d(null, "开始领取任务:", entity.getId()+"");
return Observable.just(entity).subscribeOn(Schedulers.io()).observeOn(Schedulers.computation()) return Observable.just(entity).subscribeOn(Schedulers.io()).observeOn(Schedulers.computation())
.filter(roadMatchEntity -> roadMatchEntity!=null) .filter(roadMatchEntity -> roadMatchEntity!=null)
.map(new Function<RoadMatchEntity, PoiEntity>() { .map(new Function<RoadMatchEntity, PoiEntity>() {
@ -1249,7 +1249,7 @@ public class AutoTakePicture4PoiActivity extends BaseActivity implements View.On
} }
} else if (taskByNetBean.getCode() == 230) { // Token过期 } else if (taskByNetBean.getCode() == 230) { // Token过期
systemTTS.playText("注意Token过期请重新登陆"); systemTTS.playText("注意Token过期请重新登陆");
logger.d("领取任务失败:", "Token过期"+taskByNetBean.getMessage()); logger.d(null, "领取任务失败:", "Token过期"+taskByNetBean.getMessage());
FlushTokenUtil.flushToken(AutoTakePicture4PoiActivity.this); FlushTokenUtil.flushToken(AutoTakePicture4PoiActivity.this);
Message msg = handler.obtainMessage(0x103); Message msg = handler.obtainMessage(0x103);
msg.obj = entity; msg.obj = entity;
@ -1257,7 +1257,7 @@ public class AutoTakePicture4PoiActivity extends BaseActivity implements View.On
} else { } else {
systemTTS.playText("注意,领取任务失败!"); systemTTS.playText("注意,领取任务失败!");
ToastUtils.Message(AutoTakePicture4PoiActivity.this,taskByNetBean.getMessage()); ToastUtils.Message(AutoTakePicture4PoiActivity.this,taskByNetBean.getMessage());
logger.d("领取任务失败:", "领取失败:"+taskByNetBean.getMessage()); logger.d(null, "领取任务失败:", "领取失败:"+taskByNetBean.getMessage());
Message msg = handler.obtainMessage(0x103); Message msg = handler.obtainMessage(0x103);
msg.obj = entity; msg.obj = entity;
handler.sendMessageDelayed(msg, 10*1000); // 10秒后重试 handler.sendMessageDelayed(msg, 10*1000); // 10秒后重试
@ -1955,7 +1955,7 @@ public class AutoTakePicture4PoiActivity extends BaseActivity implements View.On
public void onEventMessageMainThread(Message msg) { public void onEventMessageMainThread(Message msg) {
if (msg.what == Constant.EVENT_WHAT_LOCATION_CHANGE) { // 用户位置更新 if (msg.what == Constant.EVENT_WHAT_LOCATION_CHANGE) { // 用户位置更新
if (!locationEnable) { if (!locationEnable) {
logger.d("onEventMessageMainThread", "关闭了获取GPS定位开关"); logger.d(null, "onEventMessageMainThread", "关闭了获取GPS定位开关");
return; return;
} }
TencentLocation tencentLocation = (TencentLocation) msg.obj; TencentLocation tencentLocation = (TencentLocation) msg.obj;
@ -1970,7 +1970,7 @@ public class AutoTakePicture4PoiActivity extends BaseActivity implements View.On
// 判断当前点位和上一个点位的距离如果距离过近忽略该点 // 判断当前点位和上一个点位的距离如果距离过近忽略该点
Point currentPoint = (Point) GeometryTools.createGeometry(new LatLng(tencentLocation.getLatitude(), tencentLocation.getLongitude())); Point currentPoint = (Point) GeometryTools.createGeometry(new LatLng(tencentLocation.getLatitude(), tencentLocation.getLongitude()));
if (lastPositionPoint!=null&&lastPositionPoint.distance(currentPoint)<5e-7) { // 如果当前点小于最小距离阈值过滤该数据 if (lastPositionPoint!=null&&lastPositionPoint.distance(currentPoint)<5e-7) { // 如果当前点小于最小距离阈值过滤该数据
logger.d("onEventMessageMainThread", "距离上一点位距离过近currentPoint-"+currentPoint.toString()+"lastPositionPoint:"+lastPositionPoint.toString()); logger.d(null, "onEventMessageMainThread", "距离上一点位距离过近currentPoint-"+currentPoint.toString()+"lastPositionPoint:"+lastPositionPoint.toString());
return; return;
} }
lastPositionPoint = currentPoint; lastPositionPoint = currentPoint;

View File

@ -802,14 +802,14 @@ public class AutoTakePictureActivity extends BaseActivity implements View.OnClic
@Override @Override
public void onNext(PoiEntity poiEntity) { public void onNext(PoiEntity poiEntity) {
logger.d("领取任务成功:", poiEntity.getId()); logger.d(null, "领取任务成功:", poiEntity.getId());
} }
@Override @Override
public void onError(Throwable e) { public void onError(Throwable e) {
systemTTS.playText("注意,领取任务失败!"); systemTTS.playText("注意,领取任务失败!");
if (AutoTakePictureActivity.this!=null) { if (AutoTakePictureActivity.this!=null) {
logger.d("领取任务失败:", e.getMessage()+",网络状态-:"+ NetWorkUtils.getNetworkTypeName(AutoTakePictureActivity.this)); logger.d(null, "领取任务失败:", e.getMessage()+",网络状态-:"+ NetWorkUtils.getNetworkTypeName(AutoTakePictureActivity.this));
} }
} }
@ -825,7 +825,7 @@ public class AutoTakePictureActivity extends BaseActivity implements View.OnClic
private double minDistance = MATCH_START_BUFFER_DISTANCE; // 最小距离需要在匹配过程点时判断哪个任务是距离最小的 private double minDistance = MATCH_START_BUFFER_DISTANCE; // 最小距离需要在匹配过程点时判断哪个任务是距离最小的
private void startMatchRoadLink(Point currentPoint) { private void startMatchRoadLink(Point currentPoint) {
if (roadLinkEntityList == null/*没有需要匹配的道路数据*/ || currentPoint == null/*没有位置信息*/) { if (roadLinkEntityList == null/*没有需要匹配的道路数据*/ || currentPoint == null/*没有位置信息*/) {
logger.d("开始匹配:", "roadLinkEntityList == null:"+(roadLinkEntityList == null)+",currentPoint == null"+(currentPoint == null)); logger.d(null, "开始匹配:", "roadLinkEntityList == null:"+(roadLinkEntityList == null)+",currentPoint == null"+(currentPoint == null));
return; return;
} }
double[] speedAndBearing = getSpeedAndBearing(currentPoint); double[] speedAndBearing = getSpeedAndBearing(currentPoint);
@ -837,7 +837,7 @@ public class AutoTakePictureActivity extends BaseActivity implements View.OnClic
matchMiddleDistance = MATCH_BUFFER_DISTANCE*1.5; matchMiddleDistance = MATCH_BUFFER_DISTANCE*1.5;
} }
// 此处开始匹配起点 // 此处开始匹配起点
logger.d("开始匹配起点位置:", "currentLocation:"+currentPoint.toString()+",可匹配数据个数:"+roadLinkEntityList.size()); logger.d(null, "开始匹配起点位置:", "currentLocation:"+currentPoint.toString()+",可匹配数据个数:"+roadLinkEntityList.size());
List<RoadMatchEntity> matchStartList = roadLinkEntityList.stream() List<RoadMatchEntity> matchStartList = roadLinkEntityList.stream()
// 筛选当前任务与起点距离 // 筛选当前任务与起点距离
.filter(it-> { .filter(it-> {
@ -855,7 +855,7 @@ public class AutoTakePictureActivity extends BaseActivity implements View.OnClic
return true; return true;
} else { } else {
// 根据方向判定无法匹配 // 根据方向判定无法匹配
logger.d("方向不匹配:", "currentBearing:"+currentBearing+",数据角度:"+dataBearing+",数据id:"+it.getDataDetail().getId()); logger.d(null, "方向不匹配:", "currentBearing:"+currentBearing+",数据角度:"+dataBearing+",数据id:"+it.getDataDetail().getId());
return false; return false;
} }
} else { } else {
@ -896,7 +896,7 @@ public class AutoTakePictureActivity extends BaseActivity implements View.OnClic
// 将匹配到的数据加入到已匹配列表中 // 将匹配到的数据加入到已匹配列表中
roadMatchEntityList.addAll(matchStartList); roadMatchEntityList.addAll(matchStartList);
} else { } else {
logger.d("匹配起点数据为空:", "当前位置为:"+currentPoint.toString()+"当前角度:"+currentBearing); logger.d(null, "匹配起点数据为空:", "当前位置为:"+currentPoint.toString()+"当前角度:"+currentBearing);
} }
// 尝试用当前位置点匹配已经匹配到的roadLink如果能匹配到需要将该点记录如果无法匹配则需要评估已匹配的link是否需要被剔除 // 尝试用当前位置点匹配已经匹配到的roadLink如果能匹配到需要将该点记录如果无法匹配则需要评估已匹配的link是否需要被剔除
@ -1252,7 +1252,7 @@ public class AutoTakePictureActivity extends BaseActivity implements View.OnClic
* 初始化领取任务的管理栈 * 初始化领取任务的管理栈
* */ * */
private Observable<PoiEntity> receiverRoadTask(RoadMatchEntity entity) { private Observable<PoiEntity> receiverRoadTask(RoadMatchEntity entity) {
logger.d("开始领取任务:", entity.getId()+""); logger.d(null, "开始领取任务:", entity.getId()+"");
return Observable.just(entity).subscribeOn(Schedulers.io()).observeOn(Schedulers.computation()) return Observable.just(entity).subscribeOn(Schedulers.io()).observeOn(Schedulers.computation())
.filter(roadMatchEntity -> roadMatchEntity!=null) .filter(roadMatchEntity -> roadMatchEntity!=null)
.map(new Function<RoadMatchEntity, PoiEntity>() { .map(new Function<RoadMatchEntity, PoiEntity>() {
@ -1301,7 +1301,7 @@ public class AutoTakePictureActivity extends BaseActivity implements View.OnClic
} }
} else if (taskByNetBean.getCode() == 230) { // Token过期 } else if (taskByNetBean.getCode() == 230) { // Token过期
systemTTS.playText("注意Token过期请重新登陆"); systemTTS.playText("注意Token过期请重新登陆");
logger.d("领取任务失败:", "Token过期"+taskByNetBean.getMessage()); logger.d(null, "领取任务失败:", "Token过期"+taskByNetBean.getMessage());
FlushTokenUtil.flushToken(AutoTakePictureActivity.this); FlushTokenUtil.flushToken(AutoTakePictureActivity.this);
Message msg = handler.obtainMessage(0x103); Message msg = handler.obtainMessage(0x103);
msg.obj = entity; msg.obj = entity;
@ -1309,7 +1309,7 @@ public class AutoTakePictureActivity extends BaseActivity implements View.OnClic
} else { } else {
systemTTS.playText("注意,领取任务失败!"); systemTTS.playText("注意,领取任务失败!");
ToastUtils.Message(AutoTakePictureActivity.this,taskByNetBean.getMessage()); ToastUtils.Message(AutoTakePictureActivity.this,taskByNetBean.getMessage());
logger.d("领取任务失败:", "领取失败:"+taskByNetBean.getMessage()); logger.d(null, "领取任务失败:", "领取失败:"+taskByNetBean.getMessage());
Message msg = handler.obtainMessage(0x103); Message msg = handler.obtainMessage(0x103);
msg.obj = entity; msg.obj = entity;
handler.sendMessageDelayed(msg, 10*1000); // 10秒后重试 handler.sendMessageDelayed(msg, 10*1000); // 10秒后重试
@ -2006,7 +2006,7 @@ public class AutoTakePictureActivity extends BaseActivity implements View.OnClic
public void onEventMessageMainThread(Message msg) { public void onEventMessageMainThread(Message msg) {
if (msg.what == Constant.EVENT_WHAT_LOCATION_CHANGE) { // 用户位置更新 if (msg.what == Constant.EVENT_WHAT_LOCATION_CHANGE) { // 用户位置更新
if (!locationEnable) { if (!locationEnable) {
logger.d("onEventMessageMainThread", "关闭了获取GPS定位开关"); logger.d(null, "onEventMessageMainThread", "关闭了获取GPS定位开关");
return; return;
} }
TencentLocation tencentLocation = (TencentLocation) msg.obj; TencentLocation tencentLocation = (TencentLocation) msg.obj;
@ -2021,7 +2021,7 @@ public class AutoTakePictureActivity extends BaseActivity implements View.OnClic
// 判断当前点位和上一个点位的距离如果距离过近忽略该点 // 判断当前点位和上一个点位的距离如果距离过近忽略该点
Point currentPoint = (Point) GeometryTools.createGeometry(new LatLng(tencentLocation.getLatitude(), tencentLocation.getLongitude())); Point currentPoint = (Point) GeometryTools.createGeometry(new LatLng(tencentLocation.getLatitude(), tencentLocation.getLongitude()));
if (lastPositionPoint!=null&&lastPositionPoint.distance(currentPoint)<5e-7) { // 如果当前点小于最小距离阈值过滤该数据 if (lastPositionPoint!=null&&lastPositionPoint.distance(currentPoint)<5e-7) { // 如果当前点小于最小距离阈值过滤该数据
logger.d("onEventMessageMainThread", "距离上一点位距离过近currentPoint-"+currentPoint.toString()+"lastPositionPoint:"+lastPositionPoint.toString()); logger.d(null, "onEventMessageMainThread", "距离上一点位距离过近currentPoint-"+currentPoint.toString()+"lastPositionPoint:"+lastPositionPoint.toString());
return; return;
} }
lastPositionPoint = currentPoint; lastPositionPoint = currentPoint;

View File

@ -457,6 +457,7 @@ public class AreaHubFragment extends BaseDrawerFragment implements View.OnClickL
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 (matchTrack == 0) {
if (geometry > rearGeometry) {//用戶在终点开始作业 if (geometry > rearGeometry) {//用戶在终点开始作业
if (rearGeometry > 5000) { if (rearGeometry > 5000) {
ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄"); ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄");
@ -468,6 +469,7 @@ public class AreaHubFragment extends BaseDrawerFragment implements View.OnClickL
return; return;
} }
} }
}
Intent intents = new Intent(getActivity(), PicturesActivity.class); Intent intents = new Intent(getActivity(), PicturesActivity.class);
File filePath = AWMp4ParserHelper.getInstance().obtainWebpFilePath(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());

View File

@ -523,6 +523,7 @@ public class BuildingInFragment extends BaseDrawerFragment implements View.OnCli
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 (matchTrack == 0) {
if (geometry > rearGeometry) {//用戶在终点开始作业 if (geometry > rearGeometry) {//用戶在终点开始作业
if (rearGeometry > 5000) { if (rearGeometry > 5000) {
ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄"); ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄");
@ -534,6 +535,7 @@ public class BuildingInFragment extends BaseDrawerFragment implements View.OnCli
return; return;
} }
} }
}
Intent intents = new Intent(getActivity(), PicturesActivity.class); Intent intents = new Intent(getActivity(), PicturesActivity.class);
File filePath = AWMp4ParserHelper.getInstance().obtainWebpFilePath(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());

View File

@ -450,6 +450,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
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 (matchTrack == 0) {
if (geometry > rearGeometry) {//用戶在终点开始作业 if (geometry > rearGeometry) {//用戶在终点开始作业
if (rearGeometry > 5000) { if (rearGeometry > 5000) {
ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄"); ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄");
@ -461,6 +462,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
return; return;
} }
} }
}
Intent intents = new Intent(getActivity(), PicturesActivity.class); Intent intents = new Intent(getActivity(), PicturesActivity.class);
File filePath = AWMp4ParserHelper.getInstance().obtainWebpFilePath(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());

View File

@ -521,6 +521,7 @@ 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 (matchTrack == 0) { // 普通拍照模式
if (geometry > rearGeometry) {//用戶在终点开始作业 if (geometry > rearGeometry) {//用戶在终点开始作业
if (rearGeometry > 5000) { if (rearGeometry > 5000) {
ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄"); ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄");
@ -532,6 +533,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
return; return;
} }
} }
}
// 设置亮度和摄像机刷新率 // 设置亮度和摄像机刷新率
// CustomDialog.show((AppCompatActivity) getActivity(), R.layout.camera_setting_pre, new CustomDialog.OnBindView() { // CustomDialog.show((AppCompatActivity) getActivity(), R.layout.camera_setting_pre, new CustomDialog.OnBindView() {

View File

@ -457,6 +457,7 @@ public class TrafficHubFragment extends BaseDrawerFragment implements View.OnCli
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 (matchTrack == 0) {
if (geometry > rearGeometry) {//用戶在终点开始作业 if (geometry > rearGeometry) {//用戶在终点开始作业
if (rearGeometry > 5000) { if (rearGeometry > 5000) {
ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄"); ToastUtils.Message(getActivity(), "用户距离作业终点五公里以内才能拍摄");
@ -468,6 +469,7 @@ public class TrafficHubFragment extends BaseDrawerFragment implements View.OnCli
return; return;
} }
} }
}
Intent intents = new Intent(getActivity(), PicturesActivity.class); Intent intents = new Intent(getActivity(), PicturesActivity.class);
File filePath = AWMp4ParserHelper.getInstance().obtainWebpFilePath(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());