Configuring watch faces
Awesome watch faces can be created to delight the wearer; however, users enjoy the ability to customize the final appearance of any personal technology.
How to do it...
Similar to communicating with wearables, our watch face configuration activity manages settings by synchronizing setting selections from the activities to the watch face service:
- We need to create the configuration activity, and apply an
[IntentFilter]
attribute with a specification value that will be used to associate the watch face with this activity:[Activity] [IntentFilter( new[] { "com.xamarincookbook.wearables.CONFIG" }, Categories = new[] { "com.google.android.wearable.watchface.category.WEARABLE_CONFIGURATION", Android.Content.Intent.CategoryDefault })] public class WearableConfigurationActivity : Activity { }
- Then, to associate the activity with the watch face service, we apply a
[MetaData]
attribute using the activities action value as the metadata value:[MetaData...