I would like to fetch activities info(Such as configchanges, resizemode, if Picture in Picture is supported) of all the packages present in the device.
I am able to fetch the activities info using PackageManager
with GET_ACTIVITIES
flag. With that I can get configChanges
value using ActivityInfo.configChanges
.
However the value returns a random int if there are multiple config values set in android:configChanges
.
For ex:
if below values are set
android:configChanges="uiMode|smallestScreenSize|locale|colorMode|density"
Getting configchanges value using below code
PackageInfo packageInfo = mPackageManager.getPackageInfo(packageName, PackageManager.GET_ACTIVITIES);
ActivityInfo activityInfo[] = packageInfo.activities;
if(activityInfo!=null) {
for(ActivityInfo activity : activityInfo) {
int configChange = activity.configChanges;
}
}
I get activity.configChanges
value as 23047
What does 23047 denotes, how do I decode it so that I can get the config values that are set in AndroidManifest.xml
In Addition to that is there any way we can get activity.resizeMode
. I understand that it is @hide
api. I can see the value in debugging mode though in Android Studio.
Any leads/help to above will be really useful.