Disable download / install of App for a specific Android Version or Device

好久不见. 提交于 2021-02-11 06:40:40

问题


I just found out that the android version of my cordova/phonegap based app shows a bug on new android 5 devices (tested on Nexus 4 and Nexus 7).

Not sure if the devices or the os version causes this (my guess: android 5)

The problem is, that a relatively simple page cannot be scrolled - while buttons still responding to touch events.

I'm working on a fix, but until this will be available I'd like to disable the app for all android 5 devices.

So, basically I want to make the app manually incompatible with Android 5.x, until I fixed the problem.

Does anyone know if and how this is possible in Googles PlayStore - preferably without uploading a intermediate version of the app?


回答1:


There are two ways to do this. One in the Play Developer console and one by uploading a new APK. Unfortunately, uploading a new APK is your best solution.

Through the Play Developer console

https://support.google.com/googleplay/android-developer/answer/1286017

  1. login to Developer console https://play.google.com/apps/publish
  2. select your application
  3. click on APK
  4. click on Manage excluded devices
  5. type in the name of the device you want to exclude
  6. toggle the switch so the red sign shows.
  7. click save at the bottom

You will need to do this for every device you want to exlcude

Through the AndroidManifest.xml

http://developer.android.com/guide/topics/manifest/uses-sdk-element.html

You need to update the AndroidManifest.xml file's uses-sdk elem with the android:maxSdkVersion="integer" attribute. In your case:

android:maxSdkVersion="19"

to exclude lollipop, see https://source.android.com/source/build-numbers.html . This will exclude all current & future 5.0 devices so you don't have to keep updating your list.



来源:https://stackoverflow.com/questions/27510316/disable-download-install-of-app-for-a-specific-android-version-or-device

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