20

I am now officially confused about the difference between the two manifest elements and

I thought that by ONLY using Google Play will filter out devices that do not belong to the list of supported screens. The app will not show in the search result on those devices.

I thought using is sufficient but it does not seem to work!

Do I need to include as well?

Can somebody explain to me the difference in natural language. I did not find Google's documentation that clear unfortunately :s

Cheers

Abolfoooud
  • 2,663
  • 2
  • 27
  • 27

3 Answers3

20

supports-screens

However, if your application does not work well when resized to fit different screen sizes, you can use the attributes of the element to control whether your application should be distributed to smaller screens or have its UI scaled up ("zoomed") to fit larger screens using the system's screen compatibility mode.

compatible-screens
Any screen configuration that is not declared in this element is a screen with which the application is not compatible. Thus, external services (such as Google Play) should not provide the application to devices with such screens.

Source

So it seems supports-screens means your app's layout works well for particular screen and will be scaled in other screens

And compatible-screens means your app is compatible with only specific screens and devices. Devices with screen configurations other than those listed, won't be seen in the Play store.

Community
  • 1
  • 1
fida1989
  • 3,234
  • 1
  • 27
  • 30
15

Description

1.support-screens

It lets you specify the screen sizes your application supports and enable screen compatibility mode for screens larger than what your application supports. An application "supports" a given screen size if it resizes properly to fill the entire screen. Normal resizing applied by the system works well for most applications and you don't have to do any extra work to make your application work on screens larger than a handset device. However, it's often important that you optimize your application's UI for different screen sizes by providing alternative resources (layouts, drawables, images etc).

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

If your application does not support large and xlarge exclusively, system's screen compatibility mode would scale up ("zoom") UI to fit larger screens . Since you have not designed for larger screen sizes and the normal resizing does not achieve the appropriate results, screen compatibility mode will scale your UI by emulating a normal size screen and medium density, then zooming in so that it fills the entire screen.However this causes pixelation and blurring of your UI.

2.compatible-screens

It specifies each screen configuration with which the application is compatible. Only one instance of the element is allowed in the manifest, but it can contain multiple elements. Each element specifies a specific screen size-density combination with which the application is compatible. Any screen configuration that is not declared in this element is a screen with which the application is not compatible.

Difference

a) support-screens

  1. Basically the Android system itself read the manifest element and then enables screen compatibility mode.

  2. It's important that you always use this element in your application to specify the screen sizes your application supports.

b) compatible-screens

  1. The Android system does not read the manifest element (neither at install-time nor at runtime). This element is informational only and may be used by external services (such as Google Play) to better understand the application's compatibility with specific screen configurations and enable filtering for users.

  2. Normally, you should not use this manifest element. Using this element can dramatically reduce the potential user base for your application, by not allowing users to install your application if they have a device with a screen configuration that you have not listed. You should use it only as a last resort, when the application absolutely does not work with specific screen configurations.

Ritesh Gune
  • 16,629
  • 6
  • 44
  • 72
  • Which one should I use? –  Dec 16 '15 at 11:46
  • I just want my app to show up on every screen size.. thats it. http://stackoverflow.com/questions/34308081/will-this-work-on-all-screen-sizes/34308197?noredirect=1#comment56362904_34308197 –  Dec 16 '15 at 12:13
  • What is the best way to test this scenario? it seems like on emulator you cant test this..And if any one doesnt have all kind of devices. – RockandRoll Apr 28 '16 at 06:36
1

Yes, Google make it confusing, their documentation needs a lot of work. They say how to make it for specific screen sizes using "compatible-screens", then use supported-screens in a different situation. I thought this paragraph here helps make it clear about the impact of using compatible-screens element in your manifest, (emphasis mine):

In such a case, you can use the element to manage the distribution of your application based on combinations of screen size and density. External services such as Google Play use this information to apply filtering to your application, so that only devices that have a screen configuration with which you declare compatibility can download your application.

The element must contain one or more elements. Each element specifies a screen configuration with which your application is compatible, using both the android:screenSize and android:screenDensity attributes. Each element must include both attributes to specify an individual screen configuration—if either attribute is missing, then the element is invalid (external services such as Google Play will ignore it).

What's confusing is they add this note afterwards

Note: Although you can also use the element for the reverse scenario (when your application is not compatible with smaller screens), it's easier if you instead use the as discussed in the next section, because it doesn't require you to specify each screen density your application supports

"Easier" is relative to your needs, which is what confused me. Then they go on and say this (emphasis mine):

Caution: If you use the 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 , as discussed in the previous section about Declaring an App is Only for Handsets.

So it seems that "compatible-screens" will force Google play store to filter according to screen configuration. The "supports-screens" element affects your device's screen-compatibility mode, which is different from "compatible screens".

angryITguy
  • 9,332
  • 8
  • 54
  • 82