Android Question A question about editing the manifest <SOLVED>

Peter Simpson

Expert
Licensed User
Longtime User
Hello All,
The following link somehow explains to developers how to add an activity (like configuration) to an Android Wear watch face and have it so when you tap on the watch face for about a second, my set set configuration activity will appear. I'm not a person who loves the manifest, I can usually figure it out but in this case I'm completely baffled. I have been trying but sadly to no avail. This would be great to get working for wear apps.

Click Here to see Providing Configuration Activities

I have already done my own routine in touch, but it does not flow with all the other watch faces on my watch in how they navigate to their user configuration screens.

Basically if I can implement the XML correctly, when viewing previously selected watch faces, there will be a configuration icon cog displayed beneath my actual watch face. My face currently does not show the configuration cog but I do have a configuration screen, I just need to implement the XML into the manifest correct.

I'm having issues with the following.

B4X:
<service
    android:name=".DigitalWatchFaceService" ... />
    <!-- companion configuration activity -->
    <meta-data
        android:name=
           "com.google.android.wearable.watchface.companionConfigurationAction"
        android:value=
           "com.example.android.wearable.watchface.CONFIG_DIGITAL" />
    <!-- wearable configuration activity -->
    <meta-data
        android:name=
           "com.google.android.wearable.watchface.wearableConfigurationAction"
        android:value=
           "com.example.android.wearable.watchface.CONFIG_DIGITAL" />
    ...
</service>

And also this.

<activity
    android:name=".DigitalWatchFaceWearableConfigActivity"
    android:label="@string/digital_config_name">
    <intent-filter>
        <actionandroid:name=
            "com.example.android.wearable.watchface.CONFIG_DIGITAL"/>
        <categoryandroid:name=
        "com.google.android.wearable.watchface.category.WEARABLE_CONFIGURATION"/>
        <categoryandroid:name="android.intent.category.DEFAULT"/>
    </intent-filter></activity>


Thank you...
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
How does your Manifest text look like?

Post the code from Manifesteditor
 
Upvote 0

Peter Simpson

Expert
Licensed User
Longtime User
Here you go @DonManfred,
I thought that I followed the directions correctly, but obviously I hadn't.

My settings Activity is called 'Configuration'

B4X:
AddServiceText(configuration, 
    <!-- companion configuration activity -->
    <meta-data android:name= "com.google.android.wearable.watchface.companionConfigurationAction"
        android:value= "com.test.twf.Configuration" />
 
    <!-- wearable configuration activity -->
    <meta-data android:name= "com.google.android.wearable.watchface.wearableConfigurationAction"
        android:value= "com.test.twf.Configuration" />
)

AddManifestText(
    <activity
        android:name="Configuration"
        android:label="Configuration">
     
        <intent-filter>
            <action android:name="com.test.twf.Configuration" />
            <category android:name="com.google.android.wearable.watchface.category.WEARABLE_CONFIGURATION" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
)

Cheers...
 
Last edited:
Upvote 0

Peter Simpson

Expert
Licensed User
Longtime User
Good morning all,
Yes I have an Activity named Configuration. I just doing what you said but to no avail. I've been looking through the forum and the web for help in writing this but I'm unfortunately failing miserably.

I've tried following the direction right here, but sadly I've messed up somewhere.

Thanks everyone...
 
Last edited:
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
How did you solve it?
 
Upvote 0

Peter Simpson

Expert
Licensed User
Longtime User
Hello @Erel and @Star-Dust, the answer was really easy.
I was basically really tired and I kept missing adding the '<meta-data' line, as I already fixed my spelling mistake error, all the changes I kept doing and I kept forgetting to add that meta line. It was only the following morning when I got back from a meeting with a client and looked at the manifest before I started doing my work that I spotted my error.

All I needed was a good nights sleep :)

Anyway, I've posted the working manifest editor code RIGHT HERE.

Thank you again...
 
Last edited:
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
Thanks to you for your contribution @Peter Simpson ,

For over two years I've been studying with Android Studio a way to make a dial, following tutorials, guides and videos. But without results

@corwin42's library opened a world (although I still have to understand all the steps well) and your contribution to the setup is very important.

Now it would take a vacation week to finish all the pending projects. But this is what I would like to finish
 
Upvote 0
Top