Created
October 12, 2017 16:43
-
-
Save gordinmitya/dce4a9bd0f3e2f0c1fbd5220df81c004 to your computer and use it in GitHub Desktop.
This file contains 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 galleryIntent = new Intent(Intent.ACTION_GET_CONTENT,null); | |
galleryIntent.setType("image/*"); | |
galleryIntent.addCategory(Intent.CATEGORY_OPENABLE); | |
Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); | |
Intent chooser = new Intent(Intent.ACTION_CHOOSER); | |
chooser.putExtra(Intent.EXTRA_INTENT, galleryIntent); | |
chooser.putExtra(Intent.EXTRA_TITLE, "title"); | |
Intent[] intentArray = {cameraIntent}; | |
chooser.putExtra(Intent.EXTRA_INITIAL_INTENTS, intentArray); | |
startActivityForResult(chooser,REQUEST_CODE); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment