I'm about to publish my Android application on the marketplace, however I've decided to just design it for devices with normal screen sizes and with high density (The HTC Desire for example).
This application will not look right on any other device apart from those with the same spec as the HTC Desire.
I was wondering how I might be able to limit the application on the market to fit these specifications?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package=""
android:versionCode="1"
android:versionName="1.0" android:installLocation="auto">
<supports-screens
android:smallScreens="false"
android:normalScreens="true"
android:largeScreens="false"
android:xlargeScreens= "false"
android:anyDensity="false"
android:requiresSmallestWidthDp="480"
android:compatibleWidthLimitDp="480"
android:largestWidthLimitDp="480"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-sdk android:minSdkVersion="8" />
<application android:icon="@drawable/icon" android:label="@string/app_name" android:screenOrientation="landscape">
<activity android:name=".PhonegapScreenshotPluginActivity"
android:label="@string/app_name"
android:configChanges="orientation|keyboardHidden" android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
If your application is for Android 3.2 and higher, you can use :
<supports-screens
android:smallScreens="false"
android:normalScreens="true"
android:largeScreens="false"
android:xlargeScreens= "false"
android:anyDensity="true"
android:requiresSmallestWidthDp="480"
android:compatibleWidthLimitDp="480"
android:largestWidthLimitDp="480"/>
else you can use :
<supports-screens
android:smallScreens="false"
android:normalScreens="true"
android:largeScreens="false"
android:xlargeScreens= "false"
android:anyDensity="true" />
Have a look at the following urls:
http://developer.android.com/guide/topics/manifest/supports-screens-element.html
http://developer.android.com/guide/practices/screens_support.html
Also I would like to share with you following text:
What does it mean when we say normal screen?
We tell Android that we only support devices that fall into the normal screens class. Note that this doesn't necessarily imply that our application isn't installable anymore on other devices. It doesn't even mean that it's doomed to break on them, but it has other implications. We didn't mention actual sizes in pixels or densities in dpi.
For more details, please read page 146 of http://www.manning.com/collins/AiP_sample_ch04.pdf
There is also a manifest element, which can be of more use in your situation. Here's a link to the documentation page. In Manifest it will look like this:
<compatible-screens>
<screen android:screenSize="normal" android:screenDensity="hdpi" />
</compatible-screens>
Hope this helps.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.