解决拍摄模式

This commit is contained in:
wangdongsheng 2021-11-16 15:24:04 +08:00
commit 9b3ec4439c
8 changed files with 15 additions and 33 deletions

View File

@ -295,7 +295,7 @@ public class GuidanceActivity extends BaseActivity {
dismissLoadingDialog(); dismissLoadingDialog();
String message = e.getMessage(); String message = e.getMessage();
assert message != null; assert message != null;
if (message.equals("timeout")){ if (message.equals("timeout")||message.equals("Read time out")){
Toast.makeText(GuidanceActivity.this, "请求超时", Toast.LENGTH_SHORT).show(); Toast.makeText(GuidanceActivity.this, "请求超时", Toast.LENGTH_SHORT).show();
}else { }else {
Toast.makeText(GuidanceActivity.this, message, Toast.LENGTH_SHORT).show(); Toast.makeText(GuidanceActivity.this, message, Toast.LENGTH_SHORT).show();

View File

@ -157,6 +157,7 @@ public class HomeActivity extends BaseActivity {
Constant.isPresent = true; Constant.isPresent = true;
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS; DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
MessageDialog.show(this, "提示", dataString, "确定"); MessageDialog.show(this, "提示", dataString, "确定");
} }
} else if (data.what == Constant.NEST_WORD_REGISTER) { } else if (data.what == Constant.NEST_WORD_REGISTER) {
String dataString = (String) data.obj; String dataString = (String) data.obj;
@ -164,14 +165,16 @@ public class HomeActivity extends BaseActivity {
DialogSettings.style = DialogSettings.STYLE.STYLE_IOS; DialogSettings.style = DialogSettings.STYLE.STYLE_IOS;
MessageDialog.show(this, "提示", dataString, "确定"); MessageDialog.show(this, "提示", dataString, "确定");
} }
} else if (data.what == Constant.EVENT_MESSAGE) {
}else if (data.what==Constant.EVENT_MESSAGE){
String dataString = (String) data.obj; String dataString = (String) data.obj;
if (!dataString.equals("")) { if (!dataString.equals("")){
Toast.makeText(this, dataString, Toast.LENGTH_SHORT).show(); Toast.makeText(this, dataString, Toast.LENGTH_SHORT).show();
} }
} }
} }
@Override @Override
public void onBackPressed() { public void onBackPressed() {
if (!BackHandlerHelper.handleBackPress(this)) { if (!BackHandlerHelper.handleBackPress(this)) {

View File

@ -320,7 +320,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
dismissLoadingDialog(); 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") || message.equals("read time out")||message.equals("TimeOut")) {
Toast.makeText(LoginActivity.this, "请求超时", Toast.LENGTH_SHORT).show(); Toast.makeText(LoginActivity.this, "请求超时", Toast.LENGTH_SHORT).show();
} else { } else {
Toast.makeText(LoginActivity.this, message, Toast.LENGTH_SHORT).show(); Toast.makeText(LoginActivity.this, message, Toast.LENGTH_SHORT).show();

View File

@ -64,28 +64,6 @@ public class StaySubmitAdapter extends RecyclerView.Adapter<StaySubmitAdapter.Vi
if (poiEntity.isChecked()) { if (poiEntity.isChecked()) {
PoiEntityDeleteUtil.getInstance().deleteUtil(context,poiEntity); PoiEntityDeleteUtil.getInstance().deleteUtil(context,poiEntity);
PoiDatabase.getInstance(context).getPoiDao().deletePoiEntity(poiEntity); PoiDatabase.getInstance(context).getPoiDao().deletePoiEntity(poiEntity);
new Thread(new Runnable() {
@Override
public void run() {
List<ChargingPileEntity> chargingPileEntityList = PoiDatabase.getInstance(context).getChargingPileDao().getChargingPileByStationId(poiEntity.getId());
if (chargingPileEntityList != null && !chargingPileEntityList.isEmpty()) {
for (ChargingPileEntity chargingPileEntity : chargingPileEntityList) {
List<File> chargingPileFileList = new ArrayList<>();
if (chargingPileEntity.getPhotos() != null && !chargingPileEntity.getPhotos().isEmpty()) {
for (String photoPath : chargingPileEntity.getPhotos()) {
chargingPileFileList.add(new File(photoPath));
}
}
PoiDatabase.getInstance(context).getChargingPileDao().deleteChargingPileEntity(chargingPileEntity);
for (int i = 0; i < chargingPileFileList.size(); i++) {
chargingPileFileList.get(i).delete();
}
}
}
PoiDatabase.getInstance(context).getChargingPileDao().deleteChargingFidPileEntity(poiEntity.getId());
}
}).start();
iterator.remove(); iterator.remove();
} }
} }

View File

@ -904,7 +904,6 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
@Override @Override
public void run() { public void run() {
etRoadName.setText(sb); etRoadName.setText(sb);
// etRoadName.setEnabled(false);
} }
}); });
} }

View File

@ -1,8 +1,8 @@
package com.navinfo.outdoor.http; package com.navinfo.outdoor.http;
public class HttpInterface { public class HttpInterface {
public static final String IP_= "http://dtxbmaps.navinfo.com/dtxb/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 IP_= "http://dtxbmaps.navinfo.com/dtxb_test/m4";//测试接口
public static final String USER_PATH ="/user/";//我的 public static final String USER_PATH ="/user/";//我的
public static final String MSG_LIST_PATH ="/msgList/";//发现 public static final String MSG_LIST_PATH ="/msgList/";//发现
public static final String USER_LOGIN_PATH ="/userlogin/";//登录 public static final String USER_LOGIN_PATH ="/userlogin/";//登录

View File

@ -25,18 +25,19 @@ public class PoiEntityDeleteUtil {
switch (poiEntity.getType()) { switch (poiEntity.getType()) {
case 1: case 1:
case 5: case 5:
initDelete(poiEntity); initDelete( poiEntity);
break; break;
case 2: case 2:
initPileDelete(context,poiEntity); initPileDelete(context,poiEntity);
break; break;
case 3: case 3:
case 4: case 4:
initPicture(poiEntity); initPicture(context, poiEntity);
break; break;
} }
} }
private void initPileDelete(Context context, PoiEntity poiEntity) { private void initPileDelete(Context context, PoiEntity poiEntity) {
if (poiEntity != null) { if (poiEntity != null) {
if (poiEntity.getPhotoInfo() != null) { if (poiEntity.getPhotoInfo() != null) {
@ -65,13 +66,14 @@ public class PoiEntityDeleteUtil {
} }
} }
private void initPicture(PoiEntity poiEntity) { private void initPicture(Context context, PoiEntity poiEntity) {
List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(poiEntity.getId()); List<File> fileListByUUID = AWMp4ParserHelper.getInstance().getFileListByUUID(poiEntity.getId());
for (int i = 0; i < fileListByUUID.size(); i++) { for (int i = 0; i < fileListByUUID.size(); i++) {
fileListByUUID.get(i).delete(); fileListByUUID.get(i).delete();
} }
File filePath = AWMp4ParserHelper.getInstance().getFilePath(poiEntity.getId()); File filePath = AWMp4ParserHelper.getInstance().getFilePath(poiEntity.getId());
filePath.delete(); filePath.delete();
} }

View File

@ -91,7 +91,7 @@ public class TalentLocationUtils implements TencentLocationListener{
*/ */
@Override @Override
public void onLocationChanged(TencentLocation tencentLocation, int i, String s) { public void onLocationChanged(TencentLocation tencentLocation, int i, String s) {
if (i == TencentLocation.ERROR_OK) { if (i == TencentLocation.ERROR_OK) {//定位成功
Location location = new Location(tencentLocation.getProvider()); Location location = new Location(tencentLocation.getProvider());
// //设置经纬度以及精度 // //设置经纬度以及精度
location.setLatitude(tencentLocation.getLatitude()); location.setLatitude(tencentLocation.getLatitude());