Skip to content

Instantly share code, notes, and snippets.

@Younes-Charfaoui
Created July 4, 2020 00:33
Show Gist options
  • Save Younes-Charfaoui/5f80e0d210a83a32d86042cac247caad to your computer and use it in GitHub Desktop.
Save Younes-Charfaoui/5f80e0d210a83a32d86042cac247caad to your computer and use it in GitHub Desktop.
private lateinit var barcodeScanner: BarcodeScanner
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val options = BarcodeScannerOptions.Builder()
.setBarcodeFormats(
Barcode.FORMAT_EAN_13,
Barcode.FORMAT_QR_CODE
).build()
barcodeScanner = BarcodeScanning.getClient(options)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment