Question

I'm having a bit of trouble getting my app to show up in the market under GoogleTV. I've searched google's official documentation and I don't believe the manifest lists any elements which would invalidate the program; the only hardware requirement specified is landscape mode, wakelock and external storage(neither which should cause it to be filtered for GTV according to the documentation) and I set the uses touchscreen elements "required" attribute to false.

below is the AndroidManifest.xml for my project:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.whateversoft"
    android:versionCode="2"
    android:versionName="0.1" >

    <uses-sdk android:minSdkVersion="8" />
    <application
        android:icon="@drawable/ic_launcher"
        android:label="Color Shafted"
        android:theme="@style/Theme.NoBackground"
        android:debuggable="false">
        <activity
            android:label="Color Shafted"
            android:name=".colorshafted.ColorShafted" 
            android:configChanges = "keyboard|keyboardHidden|orientation"
            android:screenOrientation = "landscape">
            <!--  Set as the default run activity -->
            <intent-filter >
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:label="Color Shafted Settings"
            android:name=".colorshafted.Settings" 
            android:theme="@android:style/Theme"
            android:configChanges = "keyboard|keyboardHidden">
            <!--                                  -->
        </activity>
    </application>
    <!-- DEFINE PERMISSIONS FOR CAPABILITIES -->
    <uses-permission android:name = "android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name = "android.permission.WAKE_LOCK"/>
    <uses-feature android:name="android.hardware.touchscreen" android:required="false"    />
    <!-- END OF PERMISSIONS FOR CAPABILITIES -->
</manifest>

I'm about to start promoting the app after the next major release so its been kind of a bummer since I can't seem to get this to work. Any help would be appreciated, thanks in advance : )

Était-ce utile?

La solution

It looks okay to me. one things you might do is watch logcat carefully when you deploy. The ADT plugin doesn't enforce 100% correctness in the manifest. I've found where I've had subtle errors and the only way I noticed was by watching logcat when the app gets deployed.

Here is the official Google IO presentation on the topic,

http://static.googleusercontent.com/external_content/untrusted_dlcp/www.google.com/en/us/events/io/2011/static/presofiles/developing_android_applications_for_google_tv.pdf

This page describes how the manifest features effect visibility to google TVs,

https://developers.google.com/tv/android/docs/gtv_androidmanifest

Autres conseils

If you enable forward locking for you app, it will not show up in Google Play on devices that allow root access.

The manifest looks good, as others said, there's a slight chance of subtle mistakes in the manifest tags.

you can inspect and verify the compiled APK by using the command:

aapt dump badging yourFileName.apk

Check the resulting output for any unexpected things like features pulled in implicitly by permissions.

(aapt is part of the regular Android SDK)

A couple things I have found that help ensure it shows up:

Your manifest should include not only a minSdkVersion but also a targetSdkVersion:

<uses-sdk android:minSdkVersion="8" />
<uses-sdk android:targetSdkVersion="14" />

and be sure you are building to a target of 14+

Also adding supports-screens helps:

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

and finally:

  <uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
  <uses-feature android:name="com.google.android.tv" android:required="false"/>

if your app is not only for GTV but also other devices that is important.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top