Open AndroidDeveloperLB opened 4 years ago
Seems my algorithm doesn't always do it right.
There is "meta-data" of "com.android.vending.splits" (resource value) which might have a value yet not really mean it has split apks. There is also a "meta-data" of "com.android.vending.splits.required" (boolean value) which doesn't always exist. And, there is "meta-data" of "instantapps.clients.allowed" that is another type of split apks.
So, there should be another type:
And the algorithm should be as such:
apkFile.apkMeta.split
not null -> a split APK
apkMeta.isSplitRequired
(check here about an issue related to it) or "meta-data" with value of "com.android.vending.splits.required" set to true - > a base APK of split apks
"com.android.vending.splits.required" or "com.android.vending.splits" or "instantapps.clients.allowed" exist -> could be either a base apk or a standalone
Otherwise -> standalone APK.
Sample project:
I suggest to add a field that says which kind this APK file is :
apkFile.apkMeta.isSplitRequired
is true or in case it's not defined, if in "application" tag there is a "meta-data" with name that is com.android.vending.splits"apkFile.apkMeta.split
is not null