0

I'm developing an app that only supports tablets for now. But I don't have high res photos for tablets with higher density (Like latest Asus tablet with ~230 dpi, 1920X1200, I think it's called TF700T or something like this), and I don't want to start testing the ui on this screen. I have only mdpi photos for most of the general tablets today (1280x720 and 10.1'), and I developed the app on a tablet with this screen, which is the common size of tablets today.

I know how to set the app to support only xlarge screens, but I also want it to support only mdpi screens. I couldn't figure out a way for doing it from Android Developers guides.

My manifest for now:

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

Thanks, Elad

Elad92
  • 2,471
  • 4
  • 22
  • 36
  • Define support. What do you expect users to see on the 7" or 5" tablet or a high density screen phone like the Galaxy S III? The usage of supports-screens is generally for screen compatibility mode. – Morrison Chang Sep 24 '12 at 22:16

2 Answers2

2

Use <compatible-screens>:

<compatible-screens>
    <screen android:screenSize="xlarge" android:screenDensity="mdpi" />
</compatible-screens>

See: http://developer.android.com/guide/topics/manifest/compatible-screens-element.html

Though creating an app that is highly resolution-dependent like this is not a particularly good strategy.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Thanks a lot, I probably have missed this. I know this is in a good strategy, but this is only the first release :) – Elad92 Sep 25 '12 at 12:01
0

You cannot prevent mdpi density tablets from installing your application, but you can force them to run it in screen compatibility mode , that is done with android:largestWidthLimitDp attribute of <support-screens>

Also there's the attribute android:compatibleWidthLimitDp that will offer the user to choose if he wants to run the app in screen compat mode or not.

For the description and use of those two attributes read here

Nelson
  • 49,283
  • 8
  • 68
  • 81
  • I don't want to prevent them, I want that only mdpi density tablets will be able to use the app. – Elad92 Sep 25 '12 at 12:02