android-Distributing to Specific Screens

来源:互联网 发布:羊毛毡淘宝哪家好 编辑:程序博客网 时间:2024/06/05 14:37

Although we recommend that you design your application to function properly on multiple configurations of screen size and density, you can instead choose to limit the distribution of your application to certain types of screens, such as only tablets and other large devices or only handsets and similar-sized devices. 

Here's what the manifest entry looks like if your application is compatible with only small and normal screen sizes:

<manifest ... >    <compatible-screens>        <!-- all small size screens -->        <screen android:screenSize="small" android:screenDensity="ldpi" />        <screen android:screenSize="small" android:screenDensity="mdpi" />        <screen android:screenSize="small" android:screenDensity="hdpi" />        <screen android:screenSize="small" android:screenDensity="xhdpi" />        <!-- all normal size screens -->        <screen android:screenSize="normal" android:screenDensity="ldpi" />        <screen android:screenSize="normal" android:screenDensity="mdpi" />        <screen android:screenSize="normal" android:screenDensity="hdpi" />        <screen android:screenSize="normal" android:screenDensity="xhdpi" />    </compatible-screens>    ...    <application ... >        ...    <application></manifest>
<manifest ... >    <supports-screens android:smallScreens="false"                      android:normalScreens="false"                      android:largeScreens="true"                      android:xlargeScreens="true"                      android:requiresSmallestWidthDp="600" />    ...    <application ... >        ...    </application></manifest>
Caution: If you use the <supports-screens> element for the reverse scenario (when your application is not compatible with larger screens) and set the larger screen size attributes to "false", then external services such as Google Play do not apply filtering. Your application will still be available to larger screens, but when it runs, it will not resize to fit the screen. Instead, the system will emulate a handset screen size (about 320dp x 480dp; see Screen Compatibility Mode for more information). If you want to prevent your application from being downloaded on larger screens, use <compatible-screens>, as discussed in the previous section about Declaring an App is Only for Handsets.

>Although we recommend that you publish one APK for your application, Google Play allows you to publish multiple APKs for the same application when each APK supports a different set of screen configurations (as declared in the manifest file). 

If you need more information about how to publish multiple APKs on Google Play, read Multiple APK Support.

0 0
原创粉丝点击