Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Supporting smart phone only

My application is live on google play. I want to make it compatible with smart phone only.For that I have done like this...

 <uses-sdk
    android:minSdkVersion="4"/>
 <supports-screens
    android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:xlargeScreens="false" />

And my problem is market does not filter for tablet (mdpi tablet like Samsung tab1).one thing is that some phone like WVGA800* (480x800)(mdpi),WVGA800** (480x800)(ldpi) in large screen and some tablet also comes in this range.So i want to allow phones not tablet then what should be the solution???

I found some help from here http://developer.android.com/guide/topics/manifest/supports-screens-element.html

 <uses-sdk
    android:minSdkVersion="4"
    android:targetSdkVersion="16" />
 <supports-screens
    android:largeScreens="true"
    android:largestWidthLimitDp="320"
    android:normalScreens="true"
    android:smallScreens="true"
    android:xlargeScreens="false" />

Will it work on market??..I am asking with this kind of solution if anybody is having experience of this.My problem is i can not test by uploading new version of application.please help me..

Alternative solution will do.

Thanks in advance.

like image 959
Bhavesh Hirpara Avatar asked Jul 16 '12 05:07

Bhavesh Hirpara


1 Answers

Have you added 'compatiable-screens' tag to your AndroidManifest.xml? It's what Google Play uses to filtering devices based on screen sizes.

<compatible-screens>
    <!-- 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" />      
    <!-- large screens -->
    <screen android:screenSize="large" android:screenDensity="hdpi" />
    <screen android:screenSize="large" android:screenDensity="xhdpi" />
</compatible-screens>

By not including android:screenSize="xlarge", your apps will not show up for 10.1" tablets. android:screenSize="large" is a little bit tricky. It could be devices up to 7" so Galaxy Tab 7" falls into this category. But I am not sure if the newer Galaxy S3, or Galaxy Nexus with 4.75" screen falls into 'large' screen category.

Try adding the above snippet to your AndroidManifest.xml, and if Google Play includes 7" tablets in the supported devices list, you can always remove them.

like image 126
azgolfer Avatar answered Oct 19 '22 20:10

azgolfer