繁体   English   中英

兼容Android Wear WatchFace 0设备

[英]Android Wear WatchFace 0 device compatible

我正在尝试在Google Play上发布我的表盘,但是当我仅针对Wear签名Apk并将其上传到Google Developer Console时,得到0种支持。 我的清单是使用Android开发人员指南构建的,因此应该可以。

    <?xml version="1.0" encoding="utf-8"?>

<uses-feature android:name="android.hardware.type.watch" />

<uses-permission android:name="com.google.android.permission.PROVIDE_BACKGROUND" />
<uses-permission android:name="android.permission.WAKE_LOCK" />

<application
    android:allowBackup="true"
    android:icon="@drawable/playicon"
    android:label="@string/app_name"
    android:theme="@android:style/Theme.DeviceDefault" >
     <service
        android:name=".DigitalClockService"
         android:label="@string/app_name"
         android:allowEmbedded="true"
         android:taskAffinity=""
         android:permission="android.permission.BIND_WALLPAPER" >
         <meta-data
             android:name="android.service.wallpaper"
             android:resource="@xml/watch_face" />
         <meta-data
             android:name="com.google.android.wearable.watchface.preview"
             android:resource="@drawable/playicon" />
         <meta-data
             android:name="com.google.android.wearable.watchface.preview_circular"
             android:resource="@drawable/playicon" />
         <intent-filter>
             <action android:name="android.service.wallpaper.WallpaperService" />
             <category
                 android:name=
                     "com.google.android.wearable.watchface.category.WATCH_FACE" />
         </intent-filter>
    </service>
</application>

您无法发布服装APK。 您必须使用文档所述的方法将其嵌入常规apk中。这意味着您将有两个模块,而最终apk将在/ res / raw /文件夹中嵌入Wear apk。

暂无
暂无

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

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