Skip to content

Instantly share code, notes, and snippets.

@jaxbot
Last active August 29, 2015 14:02
Show Gist options
  • Save jaxbot/57ac67db9e75a77f637f to your computer and use it in GitHub Desktop.
Save jaxbot/57ac67db9e75a77f637f to your computer and use it in GitHub Desktop.
final int SCAN_QR = 4;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = new Intent(this, CaptureActivity.class);
startActivityForResult(intent, SCAN_QR);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// Check which request we're responding to
Log.w("app", "hello 1");
if (requestCode == SCAN_QR) {
// Make sure the request was successful
if (resultCode == RESULT_OK) {
Log.w("app", "hello");
}
}
}
Intent intent = new Intent();
intent.putExtra("result", "hello");
this.setResult(RESULT_OK, intent);
finish();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment