Frage

Say I have an APK and several addon APKs that provides resources from the res folder for use in the main app.

How would my main app find the addon packages?

I understand that i can use PackageManager to get resources from a known package, but can i query ressources from all packages that starts with com.example.myapp.addons.* or is there some better way to query for supported packages?

War es hilfreich?

Lösung

can i query ressources from all packages that starts with com.example.myapp.addons.*

No, but you can find out all installed packages via getInstalledPackages() on PackageManager. Iterate over the results and find those whose package names match your regular expression.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top