Here is an example that shows you how to create a wear tile use Xamarin.
- Create a Xamarin binding library
AndroidX.Wear.Tiles
. - Download the latest androidx.wear.tiles pre-release from maven (current is 1.0.0-alpha11).
Place the aar file intoJar
in your solution, set Build Action toLibraryProjectZip
in the property. - Download the latest androidx.wear.tiles tiles-proto pre-release from maven (current is 1.0.0-alpha11).
Place the jar file intoJar
folder of your solution, set Build Action toEmbeddedReferenceJar
in the property. - Add
Xamarin.Google.Guava.ListenableFuture
NuGet package to this binding solution. - Edit the
Metadata.xml
. (I have fixed some bindings)
- Add the
AndroidX.Wear.Tiles
to references. - Create and paste the
MyTileService.cs
, also care about the service name attribute. - Build and deploy to your watch.
If no errors happened, the Xamarin tile will appear on the Pick a Tile
menu,
Select it you will see the Hello world!
tile on the screen.
I've searched a lote but I did not found an example of WearOS Tile until I found this page, Special Thanks.