Reputation: 73453
I want to publish an application that specifically runs only on 800x480 or higher screens.
I don't want users with 480x320, 320x240 etc devices to get it from Android Market. How do I configure it?
Market Filters seems to have the answer but I still don't get it.
Upvotes: 13
Views: 2547
Reputation: 786
after hitting google hard i found as manifest config:
<compatible-screens>
<screen android:screenSize=["small" | "normal" | "large" | "xlarge"]
android:screenDensity=["ldpi" | "mdpi" | "hdpi" | "xhdpi"] />
...
like described here.
in your case you can reduce downloads to the following sizes:
WVGA800 (480x800) WVGA854 (480x854) 600x1024
those screens have 71% share of the market.
scroll down on the following links to find market shares and resolution "names".
scroll down to find resolution names
Hope that's helpin' out. Cheers
Upvotes: 1
Reputation: 168843
As far as an android app is concerned, I'm not sure. Good question.
However if you're writing a browser app in HTML/Javascript, you can check in Javascript using a combination of the screen.width/height, document.documentElement.clientWidth/Height, and a few other methods. If you really wanted to, this would be a way of blocking your site from low-res machines.
You can also specify CSS to react differently according to the screen size using media queries, although that would be less about blocking and more about adapting to suit the environment.
The Quirksmode website has a good article about the intricacies of dtermining screen size and other attributes in a mobile browser environment.
Upvotes: 0
Reputation: 7385
I havent tried this on Android but I think this should work:
layout-480x320
folder display the same message and provide an exit button to exit the app. This way you can have all non supported screen sizes display this message and have no functionality. The default layout
folder will have the UI for your supported screen sizes of course. This way on non supported devices you can also say what all handsets are supported in the message.<supports-screens android:anyDensity="false" />
in your manifest file.This wont make your app invisible on non supported resolutions but allows for clean and simple mechanism to communicate to user.
Upvotes: 2
Reputation:
Unfortunately, in the current state of the Market, you aren't able to do this. According to the <supports-screens>
reference doc - you can only filter by the "screen size", and as you noted, the WVGA/FWVGA resolutions are "normal."
You can have your app detect it programatically using the DisplayMetrics
class using heightPixels
and widthPixels
but that's only after it's been purchased/installed, which is what I assume you want to avoid.
Upvotes: 6
Reputation: 25584
UPDATE: This does not work (see comments below)
In your manifest:
<supports-screens
android:largeScreens="true"
android:normalScreens="false"
android:smallScreens="false"/>
Upvotes: 0