Merge remote-tracking branch 'OutDoor/master'
This commit is contained in:
commit
ede133f6d6
@ -3,7 +3,7 @@ apply plugin: 'com.android.application'
|
|||||||
android {
|
android {
|
||||||
compileSdkVersion 29
|
compileSdkVersion 29
|
||||||
buildToolsVersion '29.0.2'
|
buildToolsVersion '29.0.2'
|
||||||
// ndkVersion '23.0.7123448'
|
ndkVersion '23.0.7123448'
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.navinfo.outdoor"
|
applicationId "com.navinfo.outdoor"
|
||||||
|
@ -397,21 +397,26 @@ public class PictureActivity extends BaseActivity implements View.OnClickListene
|
|||||||
// String formatVideoName = formatter.format(calendar.getTime());
|
// String formatVideoName = formatter.format(calendar.getTime());
|
||||||
//文件
|
//文件
|
||||||
// String path = finalVideoPath.substring(finalVideoPath.length()-20);
|
// String path = finalVideoPath.substring(finalVideoPath.length()-20);
|
||||||
File file = new File(finalVideoPath);
|
if (finalVideoPath!=null){
|
||||||
if (file.exists()) {
|
File file = new File(finalVideoPath);
|
||||||
try {
|
if (file.exists()) {
|
||||||
FileOutputStream fo = new FileOutputStream(file);
|
try {
|
||||||
FileDescriptor fileDescriptor = fo.getFD();
|
FileOutputStream fo = new FileOutputStream(file);
|
||||||
camera.takeVideo(fileDescriptor);
|
FileDescriptor fileDescriptor = fo.getFD();
|
||||||
} catch (FileNotFoundException e) {
|
camera.takeVideo(fileDescriptor);
|
||||||
e.printStackTrace();
|
} catch (FileNotFoundException e) {
|
||||||
} catch (IOException e) {
|
e.printStackTrace();
|
||||||
e.printStackTrace();
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
camera.takeVideo(file);
|
||||||
}
|
}
|
||||||
} else {
|
}else {
|
||||||
camera.takeVideo(file);
|
Toast.makeText(this, "请录像", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void stopTakenVideo() {
|
private void stopTakenVideo() {
|
||||||
|
@ -79,11 +79,11 @@ public class UserApplication extends Application {
|
|||||||
//builder.cookieJar(new CookieJarImpl(new MemoryCookieStore()));
|
//builder.cookieJar(new CookieJarImpl(new MemoryCookieStore()));
|
||||||
//超时时间设置,默认60秒
|
//超时时间设置,默认60秒
|
||||||
//全局的读取超时时间
|
//全局的读取超时时间
|
||||||
builder.readTimeout(OkGo.DEFAULT_MILLISECONDS, TimeUnit.MILLISECONDS);
|
builder.readTimeout(5000, TimeUnit.MILLISECONDS);
|
||||||
//全局的写入超时时间
|
//全局的写入超时时间
|
||||||
builder.writeTimeout(OkGo.DEFAULT_MILLISECONDS, TimeUnit.MILLISECONDS);
|
builder.writeTimeout(5000, TimeUnit.MILLISECONDS);
|
||||||
//全局的连接超时时间
|
//全局的连接超时时间
|
||||||
builder.connectTimeout(OkGo.DEFAULT_MILLISECONDS, TimeUnit.MILLISECONDS);
|
builder.connectTimeout(5000, TimeUnit.MILLISECONDS);
|
||||||
OkGo.getInstance().init(this)
|
OkGo.getInstance().init(this)
|
||||||
.setOkHttpClient(builder.build())
|
.setOkHttpClient(builder.build())
|
||||||
//全局统一缓存模式,默认不使用缓存,可以不传
|
//全局统一缓存模式,默认不使用缓存,可以不传
|
||||||
|
@ -181,15 +181,26 @@ public class PoiVideoFragment extends BaseDrawerFragment implements View.OnClick
|
|||||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "对否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) getContext(), "提示", "对否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
File videoFile = (File) fmPoiVideoPic.getTag();
|
List<File> videoFiles = (List<File>) fmPoiVideoPic.getTag();
|
||||||
if (videoFile != null) {
|
if (videoFiles!=null){
|
||||||
videoFile.delete();
|
for (int i = 0; i < videoFiles.size(); i++) {
|
||||||
//获取文件名
|
//获取文件名
|
||||||
String csvFileName = videoFile.getName() + ".txt";
|
String csvFileName = videoFiles.get(i).getName() + ".txt";
|
||||||
File cavFile = new File(videoFile.getParent(), csvFileName);
|
File cavFile = new File(videoFiles.get(i).getParent(), csvFileName);
|
||||||
cavFile.delete();
|
videoFiles.clear();
|
||||||
ivPoiVideoPicture.setImageDrawable(null);
|
cavFile.delete();
|
||||||
|
ivPoiVideoPicture.setImageDrawable(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
// File videoFile = (File) fmPoiVideoPic.getTag();
|
||||||
|
// if (videoFile != null) {
|
||||||
|
// videoFile.delete();
|
||||||
|
// //获取文件名
|
||||||
|
// String csvFileName = videoFile.getName() + ".txt";
|
||||||
|
// File cavFile = new File(videoFile.getParent(), csvFileName);
|
||||||
|
// cavFile.delete();
|
||||||
|
// ivPoiVideoPicture.setImageDrawable(null);
|
||||||
|
// }
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -181,15 +181,25 @@ public class RoadFragment extends BaseDrawerFragment implements View.OnClickList
|
|||||||
MessageDialog.show((AppCompatActivity) getContext(), "提示", "对否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
MessageDialog.show((AppCompatActivity) getContext(), "提示", "对否删除", "确定", "取消").setOkButton(new OnDialogButtonClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClick(BaseDialog baseDialog, View v) {
|
public boolean onClick(BaseDialog baseDialog, View v) {
|
||||||
File videoFile = (File) fmRoadPic.getTag();
|
List<File> videoFiles = (List<File>) fmRoadPic.getTag();
|
||||||
if (videoFile != null) {
|
if (videoFiles!=null){
|
||||||
videoFile.delete();
|
for (int i = 0; i < videoFiles.size(); i++) {
|
||||||
//获取文件名
|
String csvFileName = videoFiles.get(i).getName() + ".txt";
|
||||||
String csvFileName = videoFile.getName() + ".txt";
|
File cavFile = new File(videoFiles.get(i).getParent(), csvFileName);
|
||||||
File cavFile = new File(videoFile.getParent(), csvFileName);
|
videoFiles.clear();
|
||||||
cavFile.delete();
|
cavFile.delete();
|
||||||
ivRoadPicture.setImageDrawable(null);
|
ivRoadPicture.setImageDrawable(null);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
// File videoFile = (File) fmRoadPic.getTag();
|
||||||
|
// if (videoFile != null) {
|
||||||
|
// videoFile.delete();
|
||||||
|
// //获取文件名
|
||||||
|
// String csvFileName = videoFile.getName() + ".txt";
|
||||||
|
// File cavFile = new File(videoFile.getParent(), csvFileName);
|
||||||
|
// cavFile.delete();
|
||||||
|
// ivRoadPicture.setImageDrawable(null);
|
||||||
|
// }
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user