1

In our app, we are increasing targetversion from 32 to 33 in Android. I checked google documentation. I didn't get complete list of APIs.

for example: mBluetoothAdapter?.enable() is not working for Android 13 however it is working for tragetversion 32.

However, I didn't find anything about API changes in google documentation until I directly go to this API page and there I can see warning message for API deprecation.

Similar, I used lint through Android studio (code -> analyse code). The report I get also does not say anything about deprecated API for Android 13.

Please tell what are the way to find list of all deprecated APIs for Android 13 in my android project instead of general exhaustive list like this https://developer.android.com/sdk/api_diff/33/changes

Aman Srivastava
  • 1,007
  • 1
  • 13
  • 25

2 Answers2

2

You need to start with "Behavior changes: all apps":
https://developer.android.com/about/versions/13/behavior-changes-all

Then "Behavior changes: Apps targeting Android 13 or higher":
https://developer.android.com/about/versions/13/behavior-changes-13

And finally "Android API Differences Report":
https://developer.android.com/sdk/api_diff/33/changes

sdex
  • 3,169
  • 15
  • 28
  • I don't think it is helpful as method enable() from BlueAdapter is not mentioned anywhere that it is deprecated. However, when you go to API page https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#enable() here it is explicitly mentioned that API is deprecated for API 13. – Aman Srivastava Apr 13 '23 at 09:28
  • Please notice in this page https://developer.android.com/about/versions/13/behavior-changes-13. They mentioned about bluetooth behavior. However, it does not mention enable() API which is also deprecated. My fear here is I don't know which APIs is going to break code as I don't have exhaustive list. – Aman Srivastava Apr 13 '23 at 09:31
  • 1
    It is mentioned in the API diff report: https://developer.android.com/sdk/api_diff/33/changes/android.bluetooth.BluetoothAdapter#android.bluetooth.BluetoothAdapter.enable_changed() – sdex Apr 13 '23 at 09:33
  • 1
    this list is general list. Is there any way to find which APIs deprecated from 32 to 33 in my android project? – Aman Srivastava Apr 13 '23 at 09:40
0

When my team upgraded our targetSdkVersion from 31 to 33, we simply cleaned the build folder and ran a clean build (or you could just run the compileDebug Gradle task, and the output in the "Run" window in Android Studio will list out all the deprecated API usages that the compiler finds in your current app, as well as some other random warnings.

For more specific deprecated behaviors, you can run the lint task to identify those.

Chee-Yi
  • 880
  • 10
  • 17