Android Wear Applications in C# with Xamarin

Post on 28-Nov-2014

516 views 11 download

description

With the introduction of Google's Android Wear, you are no longer restricted to just phones and tablets when it comes to developing great Android apps. You want notifications on your wrist? You got it. You want to run an app on your wrist? You got it. Xamarin lets you create iOS, Android, Mac, and Windows apps from a shared C# code base and that means C# code will be running on your wrist. In this session, let me take you through the awesome new features of Android Wear and the tools required to start building the apps you want for Wear. We'll extend a current app with rich notifications and even create a brand new app from scratch live on stage that runs right on your Android Wear device.

transcript

Developing Android Wear !Apps in C#!

James Montemagno!Developer Evangelist, Xamarin!@JamesMontemagno!

Who is this guy?!

James Montemagno!Developer Evangelist, Xamarin!

@JamesMontemagno !!http://motzcod.es!

MyStepCounterApp.com!

What is Xamarin?!

Automatically test your app on!hundreds of mobile devices !

Create native iOS, Android, Mac and Windows apps in Visual Studio and C#

Xamarin’s Unique Approach!

Native With !Code Sharing!

Anything you can do in Objective-C, Swift, or Java !can be done in C# with Xamarin using Visual Studio!

What is a wearable?!

Current Wearables!

LG G Watch!§  Reference Device!§  $180!§  9 axis Sensor!§  Accelerometer!§  Compass!§  Gryo!

!

Samsung Gear Live!§  Consumer Device !§  $200!§  Sensors:!§  Accelerometer!§  Digital Compass!§  Gyroscope!§  Heart rate monitor!

Moto 360!§  First Circular Device !§  $250!§  Sensors:!§  Pedometer (9-axis)!§  Ambient Light!§  Optical Heart Rate!

Why You Should Care!

How they work!

Bluetooth 4.0 Low Energy!§  Used for all communication!

Android Phone Required!!§  Android 4.3+!§  Android Wear App !§  Bluetooth LE Required!§  http://g.co/WearCheck!

Android Wear!§  Android 4.4W (based of KitKat)!§  No Access To:!§  Android.Webkit!§  Android.Print!§  Android.App.Backup!§  Android.AppWidget!§  Android.Hardware.Usb!

§  Sensor Support!§  Call HasSystemFeature() before using API!

!Notifications!Wear Specific Apps!Companion Apps!!

Notifications!

Notifications - Actions!

§ Custom Actions § Voice Input §  Inbox Style Card

Notifications – Extended

http://www.nuget.org/packages/Xamarin.Android.Support.V4/

Demo!

§ Companion App •  Android app that runs on a wearable

§ New Themes § New UI Widgets •  BoxInsetLayout •  CircledImageView •  WearableListView •  More…

Android Wear – Building Apps

http://www.nuget.org/packages/Xamarin.Android.Wear/

Demo!

Android Wear – Sync Data

http://www.nuget.org/packages/Xamarin.GooglePlayServicesJellyBean/

§  Exposed via Google Play Services •  Data API

o  Sync datastore between phone and wearable § Message API

o  Send small payloads and simple o  communication

Sync Data!

Demo!

Resources!§  Tips for Your First Wear App!§  http://blog.xamarin.com/tips-for-your-first-android-wear-app/!!§  Google Documentation!§  http://developer.android.com/training/building-wearables.html!!§  Samples!§  http://developer.xamarin.com/samples/android/Android%20Wear/!!!!

Seattle Mobile .NET Developers Group!

Meetup.com/SeattleMobileDevelopers!Location: City University (6th and Wall)!

Next Meetup: October 14th !Topic: What’s new in iOS 8 and Android L !

Get Started Today: xamarin.com/download!

Q & A!!Get your free C# t-shirt:!xamarin.com/shirt!

Find Me:!@JamesMontemagno | @XamarinHQ!http://motzcod.es | http://blog.xamarin.com!