如何使一个应用程序不是由Android的奇巧的用户可以下载? [英] How to make an app not to be downloaded by Android KitKat users?

查看:214
本文介绍了如何使一个应用程序不是由Android的奇巧的用户可以下载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发了安卓的应用程序。它适用于除奇巧用户的所有用户。当我上传这个应用程序在Play商店,我想奇巧的用户不能够下载这个程序。甚至当我执行在我的系统上这个应用程序,它被检测奇巧手机。我一直使用 Android的尝试:maxSdkVersion =18在Android清单文件,但它是不可能的。

I have developed an application in Android. It works for all users except KitKat users. When I upload this app in Play Store, I want the KitKat users not to be able to download this app. Even when I was executing this app in my system, it was detecting KitKat mobiles. I have tried using android:maxSdkVersion="18" in Android manifest file, but it was not possible.

有没有办法做到这一点?

Is there any way to do it?

推荐答案

这取决于究竟你想要的。根据对德$ P的文档 $ pcated maxSdkVersion:

It depends on what exactly you want. According to the documentation for the deprecated maxSdkVersion:

的Andr​​oid未来的版本(超出的Andr​​oid 2.0.1)将不再检查或安装过程中执行maxSdkVersion属性或重新验证。谷歌播放将继续使用该属性作为过滤器,然而,当presenting用户提供可供下载的应用程序。

Future versions of Android (beyond Android 2.0.1) will no longer check or enforce the maxSdkVersion attribute during installation or re-validation. Google Play will continue to use the attribute as a filter, however, when presenting users with applications available for download.

因此​​,用户仍然可以侧向载荷应用程序,但它不会出现在谷歌播放,为用户在该水平之上。这听起来像是你想要的。有没有办法(自2.0.1)完全禁用侧向载荷。

So, users could still sideload the app, but it will not appear in Google Play for users above that level. That sounds like what you want. There is no way(since 2.0.1) to completely disable sideloads.

对此备注编译

...and the SDK will not compile if maxSdkVersion is set in an app's manifest.

我有我的疑虑。测试它刚才之后,我的Eclipse / ADT编译蛮好用maxSdkVersion = 15集。所以,我不担心。

I had my doubts. After testing it just now, my Eclipse/ADT compiles just fine with maxSdkVersion=15 set. So I wouldn't worry about that.

有关targetSdkVersion答案很适合一些事情,但如果你正在使用的东西,是故意打破/在一个新的API改变,他们不会在所有的工作。例如,再多的兼容模式将允许4.2+至开启/关闭编程飞行模式从内的非根应用程序。它也不会改变新实现的SecureRandom的。

The answers regarding targetSdkVersion are fine for some things, but if you're using something that was intentionally broken/changed in a newer API, they won't work at all. For example, no amount of compatibility mode will allow 4.2+ to turn airplane mode on/off programmatically from within a non-root app. It also won't change the new implementation of SecureRandom.

如果该应用程序真的只是完全无用的4.4,因为一个关键的功能已被删除,请尝试使用maxSdkVersion。使用去precated方法总是给我留下不好的味道,但如果他们不提供任何形式的功能替代的,有时是唯一的选择。

If the app really is just completely useless for 4.4 because a key feature was removed, try using maxSdkVersion. Using a deprecated method always leaves me with a bad taste, but if they don't offer any sort of functional replacement, sometimes it's the only choice.

像它说的的http://开发商。 android.com/guide/topics/manifest/uses-sdk-element.html#max ,设置maxSdkVersion并筛选它在谷歌播放,这样就不会被高于这一水平的设备看到。这是一个检查它的唯一的地方,虽然。侧载仍然是可能的。

Like it says in http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#max, setting the maxSdkVersion does filter it in Google Play, so it won't be seen by devices above that level. That's the only place that checks it, though. Side-loading will still be possible.

唯一真正的问题,你会碰到与人升级其操作系统。如果他们下载了从播放4.3和更高版本升级到4.2,该应用程序将无法正常工作。

The only real problem you'll run into is with people upgrading their OS. If they downloaded it from Play with 4.3, and later upgrade to 4.2, the app won't work correctly.

对于这些用户(和侧装载机),你可能想要做的启动版本检查。如果他们没有通过检查的,优雅地告诉他们发生了什么事对话框等远远高于一种无形的更好它不工作了!

For those users(and side-loaders), you may want to do a version check on startup. If they fail the check, gracefully tell them what happened in a dialog, etc. Much better than an invisible "it doesn't work anymore!"

不过,如果你能解决它通过改变你如何完成的,这是迄今为止最好的解决方案。

However, if you can work around it by changing how you accomplish , that is by far the best solution.

感谢。

这篇关于如何使一个应用程序不是由Android的奇巧的用户可以下载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆