Behavior changes: Apps targeting Android 13 or higher

Like earlier releases, Android 13 includes behavior changes that may affect your app. The following behavior changes apply exclusively to apps that are targeting Android 13 or higher. If your app is targeting Android 13 or higher, you should modify your app to support these behaviors properly, where applicable.

Be sure to also review the list of behavior changes that affect all apps running on Android 13.

Privacy

Notification permission affects foreground service appearance

If the user denies the notification permission, they don't see notices related to foreground services in the notification drawer. However, users still see notices related to foreground services in the Task Manager, regardless of whether the notification permission is granted.

New runtime permission for nearby Wi-Fi devices

On previous versions of Android, the user needs to grant your app the ACCESS_FINE_LOCATION permission to complete several common Wi-Fi use cases.

Because it's difficult for users to associate location permissions with Wi-Fi functionality, Android 13 (API level 33) introduces a runtime permission in the NEARBY_DEVICES permission group for apps that manage a device's connections to nearby access points over Wi-Fi. This permission, NEARBY_WIFI_DEVICES, fulfills Wi-Fi use cases such as the following:

  • Find or connect to nearby devices, such as printers or media casting devices. This workflow allows your app to accomplish these sorts of tasks:
    • Receive AP information out of band, such as through BLE.
    • Discover and connect to devices over Wi-Fi Aware and connect using a local-only hotspot.
    • Discover and connect to devices over Wi-Fi Direct.
  • Initiate a connection to a known SSID, such as a car or smart home device.
  • Start a local-only hotspot.
  • Range to nearby Wi-Fi Aware devices.

As long as your app doesn't derive physical location information from the Wi-Fi APIs, request NEARBY_WIFI_DEVICES instead of ACCESS_FINE_LOCATION when you target Android 13 or higher and use Wi-Fi APIs. When you declare the NEARBY_WIFI_DEVICES permission, strongly assert that your app never derives physical location information from Wi-Fi APIs. To do so, set the android:usesPermissionFlags attribute to neverForLocation. This process is similar to the one you do in Android 12 (API level 31) and higher when you assert that Bluetooth device information is never used for location.

Learn more about how to request permission to access nearby Wi-Fi devices.

Granular media permissions

The 2 buttons for the dialog, from top to bottom, are Allow and Don't
  allow
Figure 1. System permissions dialog that the user sees when you request the READ_MEDIA_AUDIO permission.

If your app targets Android 13 or higher and needs to access media files that other apps have created, you must request one or more of the following granular media permissions instead of the READ_EXTERNAL_STORAGE permission:

Type of media Permission to request
Images and photos READ_MEDIA_IMAGES
Videos READ_MEDIA_VIDEO
Audio files READ_MEDIA_AUDIO