Kaloyan Roussev
Kaloyan Roussev

Reputation: 14711

App not available for a specific phone | How to exclude TV in manifest

I'm trying to exclude TVs, but my app is shown as not supported in the Google Play store for Vodafone Smart 4 turbo phone - here are its specs

http://www.gsmarena.com/vodafone_smart_4_turbo-6507.php

Here is my Manifest:

 <uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/app_id" />
<permission
android:name="com.arshad.map.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<compatible-screens>
<!-- all small size screens -->
<screen
android:screenDensity="ldpi"
android:screenSize="small" />
<screen
android:screenDensity="mdpi"
android:screenSize="small" />
<screen
android:screenDensity="hdpi"
android:screenSize="small" />
<screen
android:screenDensity="xhdpi"
android:screenSize="small" />
<screen
android:screenDensity="480"
android:screenSize="small" />
<!-- all normal size screens -->
<screen
android:screenDensity="ldpi"
android:screenSize="normal" />
<screen
android:screenDensity="mdpi"
android:screenSize="normal" />
<screen
android:screenDensity="hdpi"
android:screenSize="normal" />
<screen
android:screenDensity="xhdpi"
android:screenSize="normal" />
<screen
android:screenDensity="480"
android:screenSize="normal" />
<!-- all big screens -->
<screen
android:screenDensity="ldpi"
android:screenSize="large" />
<screen
android:screenDensity="mdpi"
android:screenSize="large" />
<screen
android:screenDensity="hdpi"
android:screenSize="large" />
<screen
android:screenDensity="xhdpi"
android:screenSize="large" />
<screen
android:screenDensity="480"
android:screenSize="large" />
<!-- All extra big screens -->
<screen
android:screenDensity="ldpi"
android:screenSize="xlarge" />
<screen
android:screenDensity="mdpi"
android:screenSize="xlarge" />
<screen
android:screenDensity="hdpi"
android:screenSize="xlarge" />
<screen
android:screenDensity="xhdpi"
android:screenSize="xlarge" />
<screen
android:screenDensity="480"
android:screenSize="xlarge" />
</compatible-screens>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<uses-permission android:name="com.arshad.map.permission.MAPS_RECEIVE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature
android:name="android.hardware.location.network"
android:required="false" />
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<uses-feature
android:name="android.hardware.location.gps"
android:required="false" />
<uses-feature
android:name="android.hardware.location"
android:required="false" />
<uses-feature
android:name="android.hardware.wifi"
android:required="false" />
<uses-feature
android:name="android.hardware.telephony"
android:required="false" />
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false" />
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="false" />

Upvotes: 1

Views: 965

Answers (1)

weston
weston

Reputation: 54781

Don't use these screen tags supports-screens and compatible-screens. Particularly as you are including everything, so there's really no need.

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

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 specific screen configurations.

Exclude TVs

It turns out you are trying to exclude TVs. No need, it is opt-in and to include TVs you need to follow the instructions here.

One of those instructions tells you to not-require these features like this:

<uses-feature android:name="android.hardware.touchscreen"
        android:required="false"/>
<uses-feature android:name="android.hardware.faketouch"
        android:required="false"/>
<uses-feature android:name="android.hardware.telephony"
        android:required="false"/>
<uses-feature android:name="android.hardware.camera"
        android:required="false"/>
<uses-feature android:name="android.hardware.bluetooth"
        android:required="false"/>
<uses-feature android:name="android.hardware.nfc"
        android:required="false"/>
<uses-feature android:name="android.hardware.gps"
        android:required="false"/>
<uses-feature android:name="android.hardware.microphone"
        android:required="false"/>
<uses-feature android:name="android.hardware.sensor"
        android:required="false"/>

This is something you are doing on the whole, so do not do that either if you do not want to be available TVs.

Leanback requirement

TV support is definitely opt-in, as you need a specific Activity for TV launching from here:

Caution: If you do not include the CATEGORY_LEANBACK_LAUNCHER intent filter in your app, it is not visible to users running the Google Play store on TV devices. Also, if your app does not have this filter when you load it onto a TV device using developer tools, the app does not appear in the TV user interface.

I.e. your app will not be available in play if you do not have an activity with this intent filter:

<intent-filter>
  <action android:name="android.intent.action.MAIN" />
  <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>

Note also:

Declaring a hardware feature as required by setting its value to true prevents your app from being installed on TV devices or appearing in the Android TV home screen launcher.

So for example, something like this would guarantee it will not work on TV.

<uses-feature android:name="android.hardware.touchscreen"
    android:required="true"/>

Upvotes: 3

Related Questions