0

I'm using Android Studio 1.0.2 and I've created a new watch face project by following instructions on Android developer site: https://developer.android.com/training/wearables/watch-faces/service.html I ended up with an application that can be run on my watch, showing the Hello round world text, but the watch face is not available/visible in the watch face picker. Just as if there is no service registration in manifest file. I have no idea what may be wrong - I double checked all steps and necessary settings in manifest file. Does anyone have any idea what to check? Have anyone experienced the same problem? Thank you!

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="cz.dmn.meteorwatch" >

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

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

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@android:style/Theme.DeviceDefault" >
    <activity
        android:name=".WatchfaceActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

<service
    android:name=".MeteorWatchFaceService"
    android:label="Meteor"
    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/preview" />
    <!--<meta-data
        android:name="com.google.android.wearable.watchface.preview_circular"
        android:resource="@drawable/preview" />-->
    <intent-filter>
        <action android:name="android.service.wallpaper.WallpaperService" />
        <category
            android:name=
                "com.google.android.wearable.watchface.category.WATCH_FACE" />
    </intent-filter>
</service>

d.aemon
  • 761
  • 1
  • 7
  • 20
  • If you have created a Wear app that can be launched via the 'Start APP_NAME' voice actions, then that is an activity and not a watch face service. Without any code it is hard to see what you are missing. – ianhanniballake Jan 14 '15 at 20:59
  • I have both - an activity AND watch face service in manifest file. The fact that I'm able to start the application means that it is successfully installed in my watch. But I can't see the watch face in picker. I'll update the question with my wearable manifest file. Maybe I'm blind and missing something. – d.aemon Jan 15 '15 at 08:00

1 Answers1

0

Comparing with sample application manifest I've found out, that I misplaced the <service> tag within the manifest file. Having put it within an <application> tag solved the problem. Sorry for bothering with such dumb mistake.

d.aemon
  • 761
  • 1
  • 7
  • 20