I have an application developed for Honeycomb (initially 3.0) and after the ICS is released the users can install it to theirs phones with ICS, not just to tablets. How can I filter these phones? I have tried with the <support-screens>
but that is not working. Also an interesting (at least to me) thing my application won't scale down to smaller screens. I used fixed sized controls but the size is in dp.
In short:
public static boolean isHoneycomb() {
// Can use static final constants like HONEYCOMB, declared in later versions
// of the OS since they are inlined at compile time. This is guaranteed behavior.
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB;
}
public static boolean isTablet(Context context) {
return (context.getResources().getConfiguration().screenLayout
& Configuration.SCREENLAYOUT_SIZE_MASK)
>= Configuration.SCREENLAYOUT_SIZE_LARGE;
}
public static boolean isHoneycombTablet(Context context) {
return isHoneycomb() && isTablet(context);
}
Copied from this answer here: https://stackoverflow.com/a/8427523/253583
You will also probably want to restrict Android Market from enabling users to install this on phones with http://developer.android.com/guide/topics/manifest/supports-screens-element.html in your manifest.