In my app, user can pick image from camera and Gallery to load into ImageView.
I am using following code to open relevant application to choose image:
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
Problem is with the Google drive. If user select an image from Google Drive, I am getting URI like this: content://com.google.android.apps.docs.storage.legacy/enc%3DHxtpLaMr66OMOzDOKTRZ-5ed7q7Szj7F7nC0IlxBnV8hx2P1%0A
I am able to generate Bitmap but unable to get file name.
InputStream input = context.getContentResolver().openInputStream(uri);
Bitmap bitmap = BitmapFactory
.decodeStream(input);
I need to show File name which user has selected.
Please, help me to extract image name from google drive URI.