Read Exif tag of JPG using ExifInterface(String filename), with Requesting Permissions at Run Time for Android 6.0 (API level 23) or higher.
Last post show how to Read Exif tag of JPG using ExifInterface(String filename), with Target Sdk Version to API 22 . As mentioned, beginning in Android 6.0 (API level 23), users grant permissions to apps while the app is running, not when they install the app. It need extra handle of Requesting Permissions at Run Time . This example add handle Requesting Permissions at Run Time, to make it Target Sdk Version API 25. uses-permission of "android.permission.READ_EXTERNAL_STORAGE" is needed in AndroidManifest.xml, refer last post . For the layout, refer to the example in Read Exif tag of JPG using ExifInterface(FileDescriptor) . MainActivity.java package com.blogspot.android_er.androidexif; import android.Manifest; import android.app.Activity; import android.content.Intent; import android.content.pm.PackageManager; import android.database.Cursor; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.media.ExifInterface; import android.net.Uri; imp