mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-22 04:29:22 +01:00
Create a custom scanbarcode contract form xxing scanContract. Unsuccesfful.
This commit is contained in:
parent
4d365c5092
commit
94e625db26
1 changed files with 9 additions and 4 deletions
|
@ -7,15 +7,20 @@ import androidx.activity.result.contract.ActivityResultContract;
|
|||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public class CustomScanContract extends ActivityResultContract<ScanOptions, ScanIntentResult> {
|
||||
import com.journeyapps.barcodescanner.ScanIntentResult;
|
||||
import com.journeyapps.barcodescanner.ScanOptions;
|
||||
|
||||
|
||||
public class PilldroidScanContract extends ActivityResultContract<ScanOptions, ScanIntentResult>{
|
||||
private static final String TAG = PilldroidScanContract.class.getName();
|
||||
@NonNull
|
||||
@Override
|
||||
public Intent createIntent(@NonNull Context context, ScanOptions input {
|
||||
return input createScanIntent(context);
|
||||
public Intent createIntent(@NonNull Context context, ScanOptions input) {
|
||||
return input.createScanIntent(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScanIntentResult parseResult(int resultCode, @Nullable Intent intent) {
|
||||
return ScanIntentResult.parseActivityResult(resultCode, intent)
|
||||
return ScanIntentResult.parseActivityResult(resultCode, intent);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue