修改拍摄的方式
This commit is contained in:
parent
afb91152bc
commit
47a4d12a03
@ -148,6 +148,7 @@ public class HomeActivity extends BaseActivity{
|
||||
}else if (data.what==Constant.NEST_WORD_SUBMIT){
|
||||
String dataString = (String) data.obj;
|
||||
if (!dataString.equals("")) {
|
||||
Constant.isPresent=true;
|
||||
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
|
||||
MessageDialog.show(this, "提示", dataString, "确定");
|
||||
}
|
||||
|
@ -213,7 +213,13 @@ public class MainActivity extends BaseActivity {
|
||||
private void showUpdateDialog(ApkVersionBean.bodyBean bodyBean) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setIcon(android.R.drawable.ic_dialog_info);
|
||||
builder.setMessage("请升级APP版本至" + bodyBean.getVersion());
|
||||
builder.setTitle("请升级APP版本至" + bodyBean.getVersion());
|
||||
builder.setMessage("本次升级说明:\n" +
|
||||
"1.修复一些闪退、丢任务、丢数据、卡顿问题\n" +
|
||||
"2.修复点击保存,持续提示问题,上传任务中也可继续作业\n" +
|
||||
"3.修复连拍照片错乱问题\n" +
|
||||
"4.修复起终点判断问题\n" +
|
||||
"5.新增默认地图缩放比例、身份证姓名自动识别功能");
|
||||
builder.setCancelable(false);
|
||||
if (bodyBean.getUpdateState() == 0) {//非必须更新
|
||||
builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
|
||||
|
@ -92,7 +92,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
private static final CameraLogger LOG = CameraLogger.create("Picture");
|
||||
private CameraView camera;
|
||||
private TencentMap tencentMap;
|
||||
private TextureMapView ivMap;
|
||||
private TextureMapView tvMapView;
|
||||
private List<Removable> removables;
|
||||
private Polyline polyline;
|
||||
private String finalVideoPath, geoWkt, detail; // 摄像后最终保存的文件名
|
||||
@ -103,15 +103,18 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
private boolean isTerminus = false;
|
||||
private boolean isBack = true;
|
||||
private int type = 0;
|
||||
private int radioPicture = 0;
|
||||
private int videoIndex = -1;
|
||||
private SimpleDateFormat formatter;
|
||||
private File paperFile, logFile;
|
||||
private ImageView ivZoomAdd, ivZoomDel, ivLocation, ivPicImage, ivPicVideoImage, imageView;
|
||||
private ImageView ivZoomAdd, ivZoomDel, ivLocation, ivPicRoadImage, ivPicVideoImage, imageView;
|
||||
private TencentLocation oldCurrentLocation = null;
|
||||
private Timer timer;
|
||||
private TimerTask timerTask;
|
||||
private int videoIndex = -1;
|
||||
private SystemTTS systemTTS;
|
||||
private StringBuilder picturesBuilder;
|
||||
private LatLng startLatLine, endLatLine;
|
||||
private TextView tvTitle;
|
||||
private Handler handler = new Handler(new Handler.Callback() {
|
||||
@Override
|
||||
public boolean handleMessage(@NonNull Message msg) {
|
||||
@ -131,9 +134,6 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
return false;
|
||||
}
|
||||
});
|
||||
private LatLng startLatLine, endLatLine;
|
||||
private TextView tvTitle;
|
||||
private int radioPicture;
|
||||
|
||||
@Override
|
||||
protected int getLayout() {
|
||||
@ -160,15 +160,15 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
formatter = new SimpleDateFormat("yyyyMMdd HHmmss");
|
||||
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
||||
systemTTS = SystemTTS.getInstance(PicturesActivity.this);
|
||||
ivMap = findViewById(R.id.iv_map);
|
||||
ivMap.setOnClickListener(this);
|
||||
ivPicImage = findViewById(R.id.iv_pic);
|
||||
tvMapView = findViewById(R.id.iv_map);
|
||||
tvMapView.setOnClickListener(this);
|
||||
ivPicRoadImage = findViewById(R.id.iv_pic);
|
||||
ivPicVideoImage = findViewById(R.id.iv_pic_video);
|
||||
if (type == 3) {
|
||||
ivPicVideoImage.setVisibility(View.VISIBLE);
|
||||
ivPicImage.setVisibility(View.GONE);
|
||||
ivPicRoadImage.setVisibility(View.GONE);
|
||||
} else if (type == 4) {
|
||||
ivPicImage.setVisibility(View.VISIBLE);
|
||||
ivPicRoadImage.setVisibility(View.VISIBLE);
|
||||
ivPicVideoImage.setVisibility(View.GONE);
|
||||
}
|
||||
Button btnSwitch = findViewById(R.id.btn_switch);
|
||||
@ -194,7 +194,6 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//相机记录器
|
||||
CameraLogger.setLogLevel(CameraLogger.LEVEL_VERBOSE);
|
||||
ivZoomAdd = findViewById(R.id.iv_zoom_add);
|
||||
@ -212,6 +211,12 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
capturePicture.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
if (radioPicture==0){
|
||||
capturePicture.setChecked(false);
|
||||
capturePicture.setText("开始采集");
|
||||
Toast.makeText(PicturesActivity.this, "请选择模式", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
if (isChecked) {
|
||||
if (radioPicture != 1) {
|
||||
isOration = true;
|
||||
@ -234,7 +239,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
Button stopPicture = findViewById(R.id.btn_stop_picture);
|
||||
stopPicture.setOnClickListener(this);
|
||||
//获取地图
|
||||
tencentMap = ivMap.getMap();
|
||||
tencentMap = tvMapView.getMap();
|
||||
//获取地图UI 设置对象
|
||||
UiSettings uiSettings = tencentMap.getUiSettings();
|
||||
//设置logo的大小
|
||||
@ -271,7 +276,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
result.toFile(file, new FileCallback() {
|
||||
@Override
|
||||
public void onFileReady(@Nullable File file) {
|
||||
/* if (file.exists()) {
|
||||
/*if (file.exists()) {
|
||||
initMarker();
|
||||
videoIndex = Integer.parseInt(file.getName().replace(".jpg", ""));
|
||||
finalVideoPath = Objects.requireNonNull(file.getParentFile()).getAbsolutePath() + "/" + (videoIndex + 1) + ".jpg";
|
||||
@ -283,7 +288,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
}
|
||||
});
|
||||
}
|
||||
if (poi_video_type == 2) {
|
||||
if (radioPicture == 1) {
|
||||
Message message = new Message();
|
||||
message.what = 0x103;
|
||||
handler.sendMessage(message);
|
||||
@ -341,10 +346,10 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
});
|
||||
DisplayMetrics dm = new DisplayMetrics();
|
||||
getWindowManager().getDefaultDisplay().getMetrics(dm);
|
||||
FrameLayout.LayoutParams layoutParamsMap = (FrameLayout.LayoutParams) ivMap.getLayoutParams();//相机的宽高
|
||||
FrameLayout.LayoutParams layoutParamsMap = (FrameLayout.LayoutParams) tvMapView.getLayoutParams();//相机的宽高
|
||||
layoutParamsMap.height = dm.widthPixels / 3;
|
||||
layoutParamsMap.width = dm.heightPixels / 3;
|
||||
ivMap.setLayoutParams(layoutParamsMap);
|
||||
tvMapView.setLayoutParams(layoutParamsMap);
|
||||
}
|
||||
|
||||
private void initLine() {
|
||||
@ -522,9 +527,9 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
}
|
||||
|
||||
public void benSwitch() {
|
||||
FrameLayout.LayoutParams layoutParamsMap = (FrameLayout.LayoutParams) ivMap.getLayoutParams();//地图的宽高
|
||||
int heightMap = ivMap.getMeasuredHeight();
|
||||
int widthMap = ivMap.getMeasuredWidth();
|
||||
FrameLayout.LayoutParams layoutParamsMap = (FrameLayout.LayoutParams) tvMapView.getLayoutParams();//地图的宽高
|
||||
int heightMap = tvMapView.getMeasuredHeight();
|
||||
int widthMap = tvMapView.getMeasuredWidth();
|
||||
FrameLayout.LayoutParams layoutParamsCamera = (FrameLayout.LayoutParams) camera.getLayoutParams();//相机的宽高
|
||||
int heightCamera = camera.getMeasuredHeight();
|
||||
int widthCamera = camera.getMeasuredWidth();
|
||||
@ -535,15 +540,15 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
layoutParamsMap.height = heightCamera;
|
||||
layoutParamsMap.width = widthCamera;
|
||||
camera.setLayoutParams(layoutParamsCamera);
|
||||
ivMap.setLayoutParams(layoutParamsMap);
|
||||
tvMapView.setLayoutParams(layoutParamsMap);
|
||||
layerChange.addView(camera);
|
||||
layerChange.addView(ivMap);
|
||||
layerChange.addView(tvMapView);
|
||||
initMapBig();
|
||||
if (type==3) {
|
||||
if (type == 3) {
|
||||
ivPicVideoImage.setVisibility(View.VISIBLE);
|
||||
ivPicImage.setVisibility(View.GONE);
|
||||
} else if (type==4) {
|
||||
ivPicImage.setVisibility(View.VISIBLE);
|
||||
ivPicRoadImage.setVisibility(View.GONE);
|
||||
} else if (type == 4) {
|
||||
ivPicRoadImage.setVisibility(View.VISIBLE);
|
||||
ivPicVideoImage.setVisibility(View.GONE);
|
||||
}
|
||||
} else {
|
||||
@ -552,11 +557,11 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
layoutParamsCamera.height = heightMap;
|
||||
layoutParamsCamera.width = widthMap;
|
||||
camera.setLayoutParams(layoutParamsCamera);
|
||||
ivMap.setLayoutParams(layoutParamsMap);
|
||||
layerChange.addView(ivMap);
|
||||
tvMapView.setLayoutParams(layoutParamsMap);
|
||||
layerChange.addView(tvMapView);
|
||||
layerChange.addView(camera);
|
||||
initMapShort();
|
||||
ivPicImage.setVisibility(View.GONE);
|
||||
ivPicRoadImage.setVisibility(View.GONE);
|
||||
ivPicVideoImage.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
@ -676,6 +681,8 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
if (isBack) {
|
||||
FileUtils.writeFile(paperFile.getAbsolutePath(), sb.toString(), true);
|
||||
// initSpeed();
|
||||
//快到终点的语音播报
|
||||
//initTerminus();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
UMCrash.generateCustomLog(e, "自定义");
|
||||
@ -686,8 +693,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
//快到终点的语音播报
|
||||
// initTerminus();
|
||||
|
||||
}
|
||||
|
||||
private void initTerminus() {
|
||||
|
@ -1063,7 +1063,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
Log.d("TAG", "initPoiSharePre: " + newPoiEntity);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
@ -1148,7 +1147,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
initPoiSharePre();
|
||||
}
|
||||
|
||||
|
||||
private void initList() {
|
||||
if (poiPicList != null) {
|
||||
poiPicList.clear();
|
||||
@ -1240,7 +1238,6 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
} else {
|
||||
Toast.makeText(getActivity(), "" + response.getMessage(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1255,9 +1252,7 @@ public class PoiFragment extends BaseDrawerFragment implements View.OnClickListe
|
||||
}
|
||||
Log.d("TAG", "onError: " + e.getMessage());
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -214,7 +214,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
etRoadName = findViewById(R.id.et_poi_video_name);
|
||||
ivPoiVideoPicture = findViewById(R.id.iv_poi_video_picture);
|
||||
etDesc = findViewById(R.id.et_desc);
|
||||
//手动拍照
|
||||
//点击拍照
|
||||
tvShort = findViewById(R.id.tv_short);
|
||||
tvShort.setOnClickListener(this);
|
||||
//自动连拍
|
||||
@ -426,8 +426,8 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
poiVideoBuilder.append("点击了保存本地的按钮 ,");
|
||||
initPoiSaveLocal(false);
|
||||
break;
|
||||
case R.id.tv_short://手动拍摄
|
||||
poiVideoBuilder.append("点击了手动拍摄的按钮 ,");
|
||||
case R.id.tv_short://点击拍摄
|
||||
poiVideoBuilder.append("点击了拍摄的按钮 ,");
|
||||
double latitude = Constant.currentLocation.getLatitude();
|
||||
double longitude = Constant.currentLocation.getLongitude();
|
||||
LatLng startLatLng = new LatLng(latitude, longitude); //用户当前位置
|
||||
@ -696,11 +696,11 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (requestCode == 0x101 && resultCode == 0x111) {
|
||||
/* if (requestCode == 0x101 && resultCode == 0x111) {
|
||||
tvShort.setEnabled(false);
|
||||
} else if (requestCode == 0x102 && resultCode == 0x111) {
|
||||
tvCombo.setEnabled(false);
|
||||
}
|
||||
}*/
|
||||
if (data != null && data.hasExtra(Constant.INTENT_PICTURES_PATH)) {
|
||||
String videoPath = data.getStringExtra(Constant.INTENT_PICTURES_PATH);
|
||||
assert videoPath != null;
|
||||
@ -719,7 +719,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
initPoiVideoSharePre();
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* 防止程序崩溃后数据丢失
|
||||
*/
|
||||
public void initPoiVideoSharePre() {
|
||||
@ -740,7 +740,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
Log.d("TAG", "initRoadSharePre: " + newPoiEntity);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
@ -852,7 +851,7 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
@Override
|
||||
public void run() {
|
||||
etRoadName.setText(sb);
|
||||
etRoadName.setEnabled(false);
|
||||
// etRoadName.setEnabled(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -878,7 +877,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
||||
poiEntity.setDetail(lineString);
|
||||
}
|
||||
}
|
||||
|
||||
return poiEntity;
|
||||
}
|
||||
|
||||
|
@ -841,7 +841,7 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
||||
@Override
|
||||
public void run() {
|
||||
etRoadName.setText(sb);
|
||||
etRoadName.setEnabled(false);
|
||||
//etRoadName.setEnabled(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -396,7 +396,6 @@ public class StaySubmitFragment extends BaseFragment implements View.OnClickList
|
||||
public void run() {
|
||||
roadEntities.clear();
|
||||
roadEntities.addAll(roadAll);
|
||||
Log.d("TAG", "run: " + roadEntities.toString());
|
||||
staySubmitAdapter.setAllRoad(roadEntities);
|
||||
staySubmitAdapter.notifyDataSetChanged();
|
||||
/*for (int i = 0; i < roadAll.size(); i++) {
|
||||
|
@ -52,7 +52,6 @@ public class HttpInterface {
|
||||
/*登录
|
||||
* Path=/m4/userlogin/**
|
||||
*/
|
||||
|
||||
//172.23.139.4:9999/m4/userlogin/oauth/token
|
||||
public static String USER_LOGIN_OAUTH_TOKEN = IP + USER_LOGIN_PATH + "oauth/token"; //登录接口
|
||||
///m4/user/user/register
|
||||
@ -126,7 +125,6 @@ public class HttpInterface {
|
||||
public static String SUBMIT_POLYGON_TASK=null;//面状任务开始采集
|
||||
//dtxbmaps.navinfo.com/dtxb_test/m4/msgList/InfoPush/28/push?type=0
|
||||
public static String MESSAGE_INFO_PUSH=null;//消息通知
|
||||
|
||||
public static void initHttpInter(String USERID) {
|
||||
/* 我的
|
||||
* Path=/m4/user/*
|
||||
|
@ -327,7 +327,7 @@ public class AWMp4ParserHelper {
|
||||
|
||||
|
||||
/**
|
||||
* 根据提供的uuid,获取指定目录下所有的视频文件
|
||||
* 根据提供的uuid,获取指定目录下所有的文件
|
||||
* */
|
||||
public List<File> getFileListByUUID(String uuid) {
|
||||
List<File> fileList = new ArrayList<>();
|
||||
|
@ -99,7 +99,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:gravity="center"
|
||||
android:text="手动拍摄"
|
||||
android:text="点击拍摄"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
|
||||
@ -110,6 +110,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:text="自动连拍"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user