简体   繁体   English

在“索尼互联网电视”(Google TV)的市场上展示一款Android应用

[英]Getting an Android App to Show Up in the market for “Sony Internet TV”(Google TV)

I'm having a bit of trouble getting my app to show up in the market under GoogleTV. 我的应用无法在GoogleTV下投放市场时遇到了麻烦。 I've searched google's official documentation and I don't believe the manifest lists any elements which would invalidate the program; 我已经搜索了Google的官方文档,但我不相信清单中会列出任何会使程序无效的元素; 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. 指定的唯一硬件需求是横向模式,唤醒锁和外部存储(均不应根据文档将其过滤为GTV),并且我将使用触摸屏元素的“ required”属性设置为false。

below is the AndroidManifest.xml for my project: 以下是我的项目的AndroidManifest.xml:

<?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 : ) 任何帮助将不胜感激,在此先感谢:)

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: 您可以使用以下命令检查和验证编译的APK:

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) (aapt是常规Android SDK的一部分)

如果您为应用启用了向前锁定,则该应用将不会在允许root访问的设备上显示在Google Play中。

It looks okay to me. 对我来说还好。 one things you might do is watch logcat carefully when you deploy. 您可能要做的一件事是在部署时仔细观察logcat。 The ADT plugin doesn't enforce 100% correctness in the manifest. ADT插件不会在清单中强制执行100%正确性。 I've found where I've had subtle errors and the only way I noticed was by watching logcat when the app gets deployed. 我发现自己有细微的错误,我发现的唯一方法是在部署应用程序时观看logcat。

Here is the official Google IO presentation on the topic, 这是有关该主题的Google IO官方演示,

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 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, 本页介绍清单功能如何影响Google TV的可见性,

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

A couple things I have found that help ensure it shows up: 我发现有几件事有助于确保它显示出来:

Your manifest should include not only a minSdkVersion but also a targetSdkVersion : 您的清单不仅应包括minSdkVersion还应包括targetSdkVersion

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

and be sure you are building to a target of 14+ 并确定您的目标是达到14岁以上

Also adding supports-screens helps: 另外添加supports-screens有助于:

<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. 如果您的应用不仅适用于GTV,而且适用于其他重要设备。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM