Page Menu
Home
GitPull.it
Search
Configure Global Search
Log In
Files
F8525260
BarcodeScanContract.java
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
926 B
Referenced Files
None
Subscribers
None
BarcodeScanContract.java
View Options
/*
* Based on ZXing Android Embedded, Copyright 2021 ZXing Android Embedded authors.
*/
package
it.reyboz.bustorino.middleware
;
import
android.content.Context
;
import
android.content.Intent
;
import
androidx.activity.result.contract.ActivityResultContract
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.Nullable
;
import
com.google.zxing.integration.android.IntentIntegrator
;
import
com.google.zxing.integration.android.IntentResult
;
public
class
BarcodeScanContract
extends
ActivityResultContract
<
BarcodeScanOptions
,
IntentResult
>
{
@NonNull
@Override
public
Intent
createIntent
(
@NonNull
Context
context
,
BarcodeScanOptions
input
)
{
return
input
.
createScanIntent
();
}
@Override
public
IntentResult
parseResult
(
int
resultCode
,
@Nullable
Intent
intent
)
{
return
IntentIntegrator
.
parseActivityResult
(
IntentIntegrator
.
REQUEST_CODE
,
resultCode
,
intent
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Sun, Feb 15, 02:11 (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1542810
Default Alt Text
BarcodeScanContract.java (926 B)
Attached To
Mode
R4 Libre BusTO
Attached
Detach File
Event Timeline
Log In to Comment