Created
October 5, 2013 13:14
-
-
Save sunwicked/6840823 to your computer and use it in GitHub Desktop.
Mixing intents from manning android 50 hacks https://github.com/Macarse/50AH-code
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
| public void onPickBoth(View v) { | |
| Intent pickIntent = new Intent(Intent.ACTION_GET_CONTENT); | |
| pickIntent.setType("image/*"); | |
| Intent takePhotoIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); | |
| Intent chooserIntent = Intent.createChooser(pickIntent, | |
| getString(R.string.activity_main_pick_both)); | |
| chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, | |
| new Intent[] { takePhotoIntent }); | |
| startActivityForResult(chooserIntent, PICK_OR_TAKE_PICTURE); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment