fix: 修改了拍摄间隔选择失效的问题

This commit is contained in:
xiaoyan 2023-06-19 16:50:26 +08:00
parent b8719ccfaa
commit b329f9dc54
2 changed files with 9 additions and 3 deletions

View File

@ -37,7 +37,7 @@ android {
applicationId "com.navinfo.outdoor" applicationId "com.navinfo.outdoor"
minSdkVersion 24 minSdkVersion 24
targetSdkVersion 30 targetSdkVersion 30
versionCode 103 versionCode 104
versionName "8.230619-正式版-OCR" versionName "8.230619-正式版-OCR"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

View File

@ -1479,10 +1479,16 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
} }
private void startTakePhoto(int radioPicture) { private void startTakePhoto(int radioPicture) {
if (radioPicture == 1) { if (radioPicture == 1) { // 手动拍摄
camera.takePictureSnapshot(); camera.takePictureSnapshot();
} else { } else {
disposable = Observable.interval(1000L, TimeUnit.MILLISECONDS, Schedulers.io()) long period = 1000L;
if (radioPicture == 3) {
period = 2000L;
} else if (radioPicture == 4) {
period = 500L;
}
disposable = Observable.interval(period, TimeUnit.MILLISECONDS, Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(new io.reactivex.functions.Consumer<Long>() { .subscribe(new io.reactivex.functions.Consumer<Long>() {
@Override @Override