Skip to content

Commit

Permalink
修改说明
Browse files Browse the repository at this point in the history
  • Loading branch information
xuexiangjys committed Nov 15, 2018
1 parent 76ceafd commit 5cd3a94
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,20 @@ dependencies {
*/
@Permission(CAMERA)
@IOThread(ThreadType.Single)
private void startScan(boolean isCustom) {
if (isCustom) {
openPageForResult(CustomCaptureFragment.class, null, REQUEST_CUSTOM_SCAN);
} else {
Intent intent = new Intent(getActivity(), CaptureActivity.class);
startActivityForResult(intent, REQUEST_CODE);
private void startScan(ScanType scanType) {
switch(scanType) {
case CUSTOM:
openPageForResult(CustomCaptureFragment.class, null, REQUEST_CUSTOM_SCAN);
break;
case DEFAULT:
startActivityForResult(new Intent(getActivity(), CaptureActivity.class), REQUEST_CODE);
break;
case REMOTE:
Intent intent = new Intent(XQRCode.ACTION_DEFAULT_CAPTURE);
startActivityForResult(intent, REQUEST_CODE);
break;
default:
break;
}
}
Expand Down

0 comments on commit 5cd3a94

Please sign in to comment.