Bay.NET user group presentation (Apr-15) on building apps for wearable platform using C#. Samples on https://github.com/conceptdev/xamarin-samples/tree/master/watch-and-wear
2. Wearables with C#
• About Xamarin
• Microsoft Band
• Android Wear
• Apple Watch
Samples
https://github.com/conceptdev/
xamarin-‐samples/watch-‐and-‐wear
3. Xamarin
•C# & .NET on iOS & Android
and Windows, of course
•Share code across all platforms
•Build with Xamarin Studio or
Visual Studio
WindowsAndroidiOS
Shared C# Application Code
C# UI C# + XML C# + XAML
Database, Web Services, App Logic
Xamarin Studio
Visual Studio
http://xamarin.com/
4. Xamarin.Forms
•C# & .NET on iOS & Android
and Windows, of course
•Share code across all platforms
•Build with Xamarin Studio or
Visual Studio
•Share user interface code in C# or
XAML too with Xamarin.Forms
WindowsAndroidiOS
Shared C# Application Code
Database, Web Services, App Logic
Xamarin Studio
Visual Studio
Shared C# or XAML UI
WindowsAndroidiOS
Shared C# Application Code
C# UI C# UI C# UI
Database, Web Services, App Logic
http://xamarin.com/forms
sharedUI
5. Xamarin + wearables
•Xamarin’s native approach supports
each platform’s wearable devices
•Each platform/device has a different
app architecture and capabilities
•All based on Bluetooth LE and a
“paired” phone WindowsAndroidiOS
C#
Database, Web Services, App Logic
6. Microsoft Band
•No code runs on device
(﴾but phone can generate notifications)﴿
•No user-‐input accepted from device
•Sensor data can be streamed to
phone app
•No “app” is deployed to device,
just exists as phone app
Windows Phone
App
C# code &
XAML UI
notifications &
customizations
sensor dataMicrosoft
Band SDK
7. Microsoft Band + Xamarin
•No code runs on device
(﴾but phone can generate notifications)﴿
•No user-‐input accepted from device
•Sensor data can be streamed to
phone app
•No “app” is deployed to device,
just exists as phone app
Windows Phone
App
C# code &
XAML UI
notifications &
customizations
sensor data
Xamarin.Android
App
C# code & UI
Xamarin
Band SDK
Component
Microsoft
Band SDK
Xamarin.iOS
App
C# code & UI
Xamarin
Band SDK
Component
8. Microsoft Band links
@mattleibow
@irisclasson http://irisclasson.com
http://winsupersite.com/microsoft-‐band/microsoft-‐band-‐apps-‐platform
http://www.windowsphone.com/en-‐us/store/search?q=microsoft+band
https://components.xamarin.com/view/microsoft-‐band-‐sdk
9. Android Wear
•Code & UI runs on device
(full Android app)
•User interacts with app on device
•Sensors vary by manufacturer, can be
accessed in code
•Communicate with phone app via APIs
•Wear app delivered inside phone app
Android
Wear app
Android App
C# code & UI
deploy
C# code & UI
MessageAPI
DataAPI
13. Microsoft Band Android Wear Apple Watch
App running on
device
No Yes No
(UI elements are loaded)
User input No Yes, touch and
voice
Yes, touch and
voice
Sensors Yes Yes
(depending on device)
No
(apps cannot access)
Build with C# Yes Yes Yes
Phone req’s Bluetooth LE
(Windows, iOS, Android)
Android 4.3
(Bluetooth LE)
iOS 8.2
Summary