Xiao Lin Li
Xiao Lin Li

Reputation: 147

Will APIs in hiddenapi-greylist-max-o work in Android Pie?

I am upgrading my app to target Android SDK 28. To check for compatibility issues, I ran the veridex tool against the APK, and it says I am using 2 APIs in greylist-max-o.

Will these APIs work on a device running Android Pie? From the "o" in the name (greylist-max-o), it seems to imply that the APIs will only work up to Android Oreo.

./appcompat.sh --dex-file=./test.apk

78 hidden API(s) used: 52 linked against, 26 through reflection
       76 in greylist
       0 in blacklist
       2 in greylist-max-o
       0 in greylist-max-p

Upvotes: 3

Views: 1904

Answers (1)

Bandreid
Bandreid

Reputation: 2733

You are correct in your assumption. Those APIs will only work if you target api level 27 (Android O and lower).

From the official documentation:

If a non-SDK interface was part of the darkgrey list for Android 9 (API level 28), that interface is now part of the greylist-max-o list, where “o” stands for Oreo or Android 8.1 (API level 27). In this case, you would only be able to use an interface that belongs to the greylist-max-o list if your app targets Android 8.1 (API level 27) or lower.

See more here: https://developer.android.com/preview/non-sdk-q#list-name-changes

Upvotes: 1

Related Questions