Skip to content

Instantly share code, notes, and snippets.

@Falci
Last active December 13, 2015 18:48
Show Gist options
  • Save Falci/4957447 to your computer and use it in GitHub Desktop.
Save Falci/4957447 to your computer and use it in GitHub Desktop.
/**
* Método que será chamado no clique do botão
* @param view
*/
public void lerQR(View view){
// Criamos um Intent com o caminho aplicativo que irá ler o QR code
Intent intent = new Intent("com.google.zxing.client.android.SCAN");
// Passamos o parametro "SCAN_MODE" para ler somente códigos no formato QR
intent.putExtra("SCAN_MODE", "QR_CODE_MODE");
startActivityForResult(intent, 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment