This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ➜ Infrastructure git:(master) ✗ terraform plan | |
| Backend reinitialization required. Please run "terraform init". | |
| Reason: Initial configuration of the requested backend "s3" | |
| The "backend" is the interface that Terraform uses to store state, | |
| perform operations, etc. If this message is showing up, it means that the | |
| Terraform configuration you're using is using a custom configuration for | |
| the Terraform backend. | |
| Changes to backend configurations require reinitialization. This allows |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| I/ExoPlayerImpl: Init d4f7070 [ExoPlayerLib/2.15.0] [gtowifi, SM-T290, samsung, 30] | |
| W/AudioCapabilities: Unsupported mime audio/x-ima | |
| W/VideoCapabilities: Unsupported mime video/mp43 | |
| W/VideoCapabilities: Unsupported mime video/wvc1 | |
| W/VideoCapabilities: Unsupported mime video/x-ms-wmv | |
| W/AudioCapabilities: Unsupported mime audio/x-ms-wma | |
| W/VideoCapabilities: Unsupported mime video/x-ms-wmv7 | |
| W/VideoCapabilities: Unsupported mime video/x-ms-wmv8 | |
| W/AudioCapabilities: Unsupported mime audio/x-ima | |
| W/AudioCapabilities: Unsupported mime audio/mpeg-L1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dependencies { | |
| implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs') | |
| // ... | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MainActivity : ComponentActivity() { | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| val sdkHandler = SDKHandler(this, true) | |
| setContent { | |
| ScannerComposeTheme { | |
| ScannerContent(sdkHandler) | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| LaunchedEffect(Unit) { | |
| // Set scanner/barcode listener | |
| sdkHandler.dcssdkSetDelegate(object : IDcsSdkApiDelegate { | |
| override fun dcssdkEventBarcode( | |
| barcodeData: ByteArray?, | |
| barcodeType: Int, | |
| scannerId: Int | |
| ) { | |
| // handle the barcode | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Allow our scanner to be discovered (when scanning the pairing barcode) | |
| sdkHandler.dcssdkSetOperationalMode(DCSSDKDefs.DCSSDK_MODE.DCSSDK_OPMODE_BT_LE) | |
| sdkHandler.dcssdkSetOperationalMode(DCSSDKDefs.DCSSDK_MODE.DCSSDK_OPMODE_USB_CDC) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Composable | |
| fun PairDialog(sdkHandler: SDKHandler, hideDialog: () -> Unit) { | |
| AlertDialog( | |
| onDismissRequest = hideDialog, | |
| confirmButton = { | |
| Button(onClick = hideDialog) { | |
| Text("CANCEL") | |
| } | |
| }, | |
| text = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val permissionState = | |
| rememberPermissionState(permission = Manifest.permission.ACCESS_FINE_LOCATION) | |
| PermissionRequired( | |
| permissionState = permissionState, | |
| permissionNotGrantedContent = { | |
| LaunchedEffect(Unit) { | |
| permissionState.launchPermissionRequest() | |
| } | |
| }, | |
| permissionNotAvailableContent = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fun parseAAMVA(barcodeData: String): DriverLicense? { | |
| // first character must be @ | |
| if (barcodeData[0] != '@') return null | |
| var familyName: String? = null | |
| var firstName: String? = null | |
| var middleNames: String? = null | |
| var issueDate: String? = null | |
| var expirationDate: String? = null | |
| var birthDate: String? = null | |
| var gender: String? = null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Composable | |
| fun TimeDisplay(viewModel: TimeDisplayViewModel) { | |
| val properties: Map<String, Long> by viewModel.properties.collectAsState() | |
| var timeRemaining by rememeber { mutableStateOf(0) } | |
| Text(timeRemaining.toString) | |
| val timeProperty = properties["time"] | |
| LaunchedEffect(timeProperty) { | |
| val currentTime = System.currentTimeMillis() |