如果我要发布一个更新与minSDK一支比市场上高? [英] What if I want to release an update with higher minSDK than the one on the market?

查看:78
本文介绍了如果我要发布一个更新与minSDK一支比市场上高?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经发布了在市场上的应用与< STRONG> minSDK 设置为4(安卓1.6),但现在我想发布一个更新与特征1.6不可用,所以我需要一个更高的 minSDK

I have released an app on the market with minSDK set to 4 (Android 1.6) but now I want to release an update with features unavailable in 1.6 so I need a higher minSDK.

所以,我的问题是:??此更新将运行1.6的用户被通知...如果是他们将能够下载/安装

So, my question is: Will users running 1.6 be notified of this update?...and if yes will they be able to download/install it?

推荐答案

没有他们不应该被通知的更新。市场将过滤应用了一起,他们将不再能够看到它或接收更新。

No they shouldn't be notified of the update. The market will filter the application out all together and they will no longer be able to see it or receive updates.

如果你想补充一点,使用较高的API级别的功能,但不排除用户的较低级别的API,你可以使用一些反射来实现这一点:

If you want to add features that use a higher api level but not exclude user's of a lower api level you can use some reflection to enable this:

           public static Method getExternalFilesDir;        

            try {
                    Class<?> partypes[] = new Class[1];
        partypes[0] = String.class;
                    getExternalFilesDir = Context.class.getMethod("getExternalFilesDir", partypes);
            } catch (NoSuchMethodException e) {
                    Log.e(TAG, "getExternalFilesDir isn't available in this devices api");
            }

这一块code是在说:

This piece of code is saying:

在Context.class有我得到了这个方法   <一href="http://developer.android.com/reference/android/content/Context.html#getExternalFilesDir(java.lang.String)"相对=nofollow> getExternalFilesDir (API 9级)

Within the Context.class have I got this method getExternalFilesDir (API level 9)

如果这样的实例变量getExternalFilesDir因为这种方法的反射调用其他留作空白。

If so instantiate the variable getExternalFilesDir as a reflective call to this method else leave it as null.

再后来你可以简单地做

     // If the user's device is API9 or above
     if(getExternalFilesDir != null){
       // Invoke is basically the same as doing Context.getExternalFilesDir(var1, var2);
       getExternalFilesDir.invoke(variable1, variable2);
     } else {
        // User cannot use this method do something else
     }

希望帮助

这篇关于如果我要发布一个更新与minSDK一支比市场上高?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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