Permissions changes in Android 13 and how to adapt your app to Android 13?
Android has recently released Android 13 version. As an app developer, you need to support newer versions because your audience will gradually migrate to this new version. Yes, adaption of new versions is not as fast as IOS, but still you need to do that.

Changes with the new version comes in 3 categories:
- New Features and APIs. You could find the overview of the new feature and APIs here. These changes are the new features and APIs that does not exist in previous versions. The new feature that I liked most is the Per-app language preferences. With this feature, users can now select a different language for an app other than the system language. Thats great!
- Behaviour changes: all apps. You could find the information about those changes here. These changes are the changes that affects all apps no matter whether you target API level 33 or not. You need to test your app for Android 13, and make required changes to be compatible with Android 13.
- Behavior changes: Apps targeting Android 13 or higher. You could find these changes in here. These changes are the changes that affect only apps that target API level 33 or higher. You need to make required changes in order to be compatible with Android 13.
In Android 13, there are some changes that worth checking which could affect your app. These are mostly change in permission behaviours.
NEARBY_DEVICES Permission
Starting with Android 13, you will need to use NEARBY_DEVICES permission for some Wi-Fi related use cases. Previously, ACCESS_FINE_LOCATION permission was used.
New Permissions for Media
Three new permission is introduced with Android 13: READ_MEDIA_IMAGES, READ_MEDIA_IMAGES, READ_MEDIA_VIDEO and READ_MEDIA_AUDIO. If you were using READ_EXTERNAL_STORAGE for accessing files, then you need to use one of these new permissions. If a user with Android 13 has previously granted this permission, then all is good. If not, then the permission request for READ_EXTERNAL_STORAGE will be ignored. This means you need to modify your app for this part.
We were using READ_EXTERNAL_STORAGE for image selection in our app. We needed to support READ_MEDIA_IMAGES for image selection. Now I will explain how you can do this.
Firstly, you need to update compile and target api level to 33. Now you could access the new APIs :)
compile: 33,
target : 33Secondly, you need to put READ_MEDIA_IMAGES permission to AndroidManifest file.
<uses-permission android:name=”android.permission.READ_MEDIA_IMAGES” />Lastly, you need to programatically ask for READ_EXTERNAL_STORAGE permission for API level lower than 33 and ask for READ_MEDIA_IMAGES permission for API level equal or higher than 33.
private val readImagePermission = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) Manifest.permission.READ_MEDIA_IMAGES else Manifest.permission.READ_EXTERNAL_STORAGEif(ContextCompat.checkSelfPermission(this, readImagePermission) == PackageManager.PERMISSION_GRANTED){
//permission granted
} else {
//permission not granted
}Thats it, now your app is supporting this new permission! Hope this tutorial helped you in migrating to the new permissions. Please provide a clap if you liked this post.
Here are some posts you might be interested in:






