Last active
August 29, 2015 14:02
-
-
Save jaxbot/57ac67db9e75a77f637f to your computer and use it in GitHub Desktop.
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
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"); | |
} | |
} | |
} |
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
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