Dis-allow installation on specific API Level

别来无恙 提交于 2020-01-25 18:54:06

问题


How to dis-allow my app to run on a specific API level? i know about the 3 specifiers in uses-sdk tag in the manifest. But that can't produce a logic i want to implement.

For eg: i want to allow my application to be installed on Level 4 to Level 10, dis-allow for Level 11 to Level 13 and again allow for Level 14 and Level 15.

Is that possible?


回答1:


You can do that when you publish it to the Google Play. In Android Developer Console while uploading application come to APK files tab and check advanced mode. It lets you to upload 2 apk files with different sdk levels ranges. But don't forget to set different version codes for them.

All statistics in the console will be aggregated for both apk files as it is one.




回答2:


You can create two apks (Not advisable). One that support for api level 4 to 10 & another one for api level 14 & 15 and you need to activate both the apks in your developer console. The Play store decide which apk to install based on android manifest xml.



来源:https://stackoverflow.com/questions/11498591/dis-allow-installation-on-specific-api-level

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!