1

I am told to build an app in Android 2.2 which will not support tablets.

I went through lots of googling but found no solution. I also found this link but this give how to do the same from 2.3 onwards.

My problem is that I can't switch to 2.3 as my client want to support the app from 2.2.

Here is the code I am using in my manifest

<supports-screens android:normalScreens="true"
    android:largeScreens="true"
    android:anyDensity="true"/>

The code above doesn't prevent the app to download from tablet, and so it crashes.

halfer
  • 19,824
  • 17
  • 99
  • 186
Nik
  • 2,913
  • 7
  • 40
  • 66

3 Answers3

1

The code in that link will work fine. Set your sdkTarget to 2.3 and your minSDK as 2.2.

David Scott
  • 1,666
  • 12
  • 22
  • Thank you for a very quick reply. but will my app run on 2.2? I also found from http://developer.android.com/guide/market/publishing/multiple-apks.html - Caution: By default, all screen size attributes in the element are "true" if you do not declare them otherwise. However, because the android:xlargeScreens attribute was added in Android 2.3 (API level 9), Google Play will assume that it is "false" if your application does not set either android:minSdkVersion or android:targetSdkVersion to "9" or higher. but have no idea if this will work – Nik May 02 '12 at 10:53
1

A little bit unexpected answer, I think, but have your tried to ignore screen sizes completely and just request PHONE features in the manifest? It's quite rare for a tablet to have those, so you effectively filter 'em out. For example, your may write in your AndroidManifest.xml:

<uses-permission android:name="android.permission.CALL_PHONE" />
lenik
  • 23,228
  • 4
  • 34
  • 43
0

try below code

<supports-screens android:smallScreens="true"
                  android:normalScreens="true"
                  android:largeScreens="false"
                  android:xlargeScreens="false"
                  android:anyDensity="false" />
Venkat Reddy
  • 49
  • 10