문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top