diff --git a/docs/html/guide/appendix/market-filters.jd b/docs/html/guide/appendix/market-filters.jd index 6ca8acc46e998..f826f43d37123 100644 --- a/docs/html/guide/appendix/market-filters.jd +++ b/docs/html/guide/appendix/market-filters.jd @@ -5,23 +5,25 @@ page.title=Market Filters
Android Compatibility<supports-screens><uses-configuration>When a user searches or browses in Android Market, the results are filtered, and -some applications might not be visible. For example, if an application requires a + +
When a user searches or browses in Android Market, the results are filtered based on which +applications are compatible with the user's device. For example, if an application requires a trackball (as specified in the manifest file), then Android Market will not show -the app on any device that does not have a trackball.
The manifest file and -the device's hardware and features are only part of how applications are filtered -— filtering also depends on the country and carrier, the presence or absence -of a SIM card, and other factors.
+the app on any device that does not have a trackball. + +The manifest file and the device's hardware and features are only part of how applications are +filtered—filtering might also depend on the country and carrier, the presence or absence of a +SIM card, and other factors.
Changes to the Android Market filters are independent of changes to the Android platform itself. This document will be updated periodically to reflect -any changes that occur.
+any changes that affect the way Android Market filters applications. +Android Market uses the filter restrictions described below to determine
whether to show your application to a user who is browsing or searching for
-applications on a given device. When determining whether to display your app,
+applications on an Android-powered device. When determining whether to display your app,
Market checks the device's hardware and software capabilities, as well as it's
carrier, location, and other characteristics. It then compares those against the
restrictions and dependencies expressed by the application itself, in its
-manifest, .apk, and publishing details. If the application is
+manifest file and publishing details. If the application is
compatible with the device according to the filter rules, Market displays the
application to the user. Otherwise, Market hides your application from search
results and category browsing.
You can use the filters described below to control whether Market shows or -hides your application to users. You can request any combination of the -available filters for your app — for example, you could set a +
You can use the filters described below to control whether Market shows or
+hides your application to users. You can use any combination of the
+available filters for your app—for example, you can set a
minSdkVersion requirement of "4" and set
smallScreens="false" in the app, then when uploading the app to
Market you could target European countries (carriers) only. Android Market's
@@ -92,16 +98,18 @@ makes the app invisible to the user, the user will not see that an upgrade is
available.
+
+
Most Market filters are triggered by elements within an application's manifest file, AndroidManifest.xml, -although not everything in the manifest file can trigger filtering. The -table below lists the manifest elements that you can use to trigger Android -Market filtering, and explains how the filtering works.
+although not everything in the manifest file can trigger filtering. +Table 1 lists the manifest elements that you should use to trigger Android +Market filtering, and explains how the filtering for each element works. -Table 1. Manifest elements that +
Table 1. Manifest elements that trigger filtering on Market.
Android Market uses other application characteristics to determine whether to show or hide an application for a particular user on a given device, as described in the table below.
-Table 2. Application and publishing characteristics that affect filtering on Market.
+Table 2. Application and publishing +characteristics that affect filtering on Market.
| Filter Name | How It Works |
|---|
In addition to the manifest elements in table 1, Android Market can also +filter applications based on the advanced manifest elements in table 3.
+ +These manifest elements and the filtering they trigger are for exceptional use-cases +only. They are designed for some types of high-performance games and similar applications that +require strict controls on application distribution. Most applications should never use +these filters.
+ +Table 3. Advanced manifest elements for +Android Market filtering.
+| Manifest Element | Summary |
|---|---|
|
+ Android Market filters the application if the device screen size and density does not match +any of the screen configurations (declared by a {@code <screen>} element) in the {@code +<compatible-screens>} element. +Caution: Normally, you should not use +this manifest element. Using this element can dramatically +reduce the potential user base for your application, by excluding all combinations of screen size +and density that you have not listed. You should instead use the {@code +<supports-screens>} manifest element (described above in table +1) to enable screen compatibility mode for screen configurations you have not accounted for +with alternative resources. + |
+
+<compatible-screens> + <screen android:screenSize=["small" | "normal" | "large" | "xlarge"] + android:screenDensity=["ldpi" | "mdpi" | "hdpi" | "xhdpi"] /> + ... +</compatible-screens> ++
<manifest><screen> elements. Each <screen> element
+specifies a specific screen size-density combination with which the application is compatible.
+
+ The Android system does not read the {@code <compatible-screens>} manifest +element (neither at install-time nor at runtime). This element is informational only and may be used +by external services (such as Android Market) to better understand the application's compatibility +with specific screen configurations and enable filtering for users. 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 Android Market) should not provide the application to +devices with such screens.
+ +Caution: 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 all screen configurations. Instead of using this element, +you should follow the guide to Supporting +Multiple Screens, in order to provide complete support for multiple screens, by adding +alternative resources for different screen sizes and densities.
+ +If you want to set only a minimum screen size for your your application, then you +should use the {@code +<supports-screens>} element. For example, if you want your application to be available +only for large and xlarge screen devices, the {@code +<supports-screens>} element allows you to declare that your application does not +support small and normal screen sizes. External services (such as Android +Market) will filter your application accordingly. You can also use the {@code +<supports-screens>} element to declare whether the system should resize your +application for different screen sizes.
+ +Also see the Market Filters +document for more information about how Android Market filters applications using this and +other manifest elements.
+ +
-<supports-screens android:smallScreens=["true" | "false"]
+<supports-screens android:resizeable=["true" | "false"]
+ android:smallScreens=["true" | "false"]
android:normalScreens=["true" | "false"]
android:largeScreens=["true" | "false"]
android:xlargeScreens=["true" | "false"]
@@ -19,17 +20,33 @@ page.title=<supports-screens>
An application "supports" a given screen size if it fills the entire screen and works as +expected. By default, the system will resize your application to fill the screen, if you have set +either {@code +minSdkVersion} or {@code +targetSdkVersion} to {@code "4"} or higher. Resizing works well for most applications and +you don't have to do any extra work to make your application work on larger screens.
+ +In addition to allowing the system to resize your application, you can add additional support +for different screen sizes by providing alternative +layout resources for different sizes. For instance, you might want to modify the layout +of an activity when it is on a tablet or similar device that has an xlarge screen.
+ +If your application does not support large or xlarge screens, then you should +declare that it is not resizeable by setting {@code android:resizeable} to +{@code "false"}, so that the system will not resize your application on larger screens.
+ +If your application does not support small screens, then +there isn't much the system can do to make the application work well on a smaller screen, so +external services (such as Android Market) should not allow users to install the application on such +screens.
-Based on the target device screen density, the Android -framework will scale down assets by a factor of 0.75 (low dpi screens) -or scale them up by a factor of 1.5 (high dpi screens). -The screen density is expressed as dots-per-inch (dpi).
For more information, see Supporting Multiple Screens.
@@ -38,16 +55,40 @@ The screen density is expressed as dots-per-inch (dpi).To provide the best experience on all screen sizes, you should allow resizing and, if your +application does not work well on larger screens, follow the guide to Supporting Multiple Screens to enable +additional screen support.
+This attribute was introduced in API Level 9.
Based on the "standard" device screen density (medium dpi), the Android framework will scale +down application assets by a factor of 0.75 (low dpi screens) or scale them up by a factor of 1.5 +(high dpi screens), when you don't provide alternative resources for a specifc screen density. The +screen density is expressed as dots-per-inch (dpi).