Android Trick - Pick photo from Gallery and 3rd party app
In Android we can using Intent to share data between applications. Simple usage for this part is Picking images or photos from the other applications. Normally the codes is like the following: private void pickPhotoFromGallery() { Intent intent = new Intent(); intent.setType( "image/*" ); intent.setAction(Intent.ACTION_PICK); //following line code will specify the dialog title of choosing different content source app startActivityForResult(Intent.createChooser(intent, "Complete action using" ),SELECT_PHOTO ); } Noticed that if I set Intent Action as Intent.ACTION_PICK it will only select images from System Gallery App. if I called intent.setAction(Intent. ACTION_GET_CONTENT ); It will get from the other apps. And the result is not same. From Gallery app the uri format is like : content://xxx/xx/xx but the other app will return uri like : file:///xxx/xx/xx ...