introduction to android with c# using xamarin

22
Craig Dunn Developer Evangelist Xamarin [email protected] @conceptdev Android with C# using Xamarin

Upload: craig-dunn

Post on 07-May-2015

608 views

Category:

Technology


4 download

DESCRIPTION

Presented at NDC Oslo, 14th June 2013.

TRANSCRIPT

Page 2: Introduction to Android with C# using Xamarin

Why Xamarin.Android?

• Write C# apps for Android phones & tablets• Share C# with other platforms:

Xamarin.iOSWindows PhoneWindows Store Appsre-use C# from existing projects

• Create native Android user interface• Native runtime == native performance• Use Java libraries (if required)

aka Why Are You Here?

Page 3: Introduction to Android with C# using Xamarin

How Does it Work?

• Mono C# + .NET implementation for Linuxstarted in 2001/released 2004perfect fit for today’s mobile platforms: iOS & Android

• “Bindings”exposes Android as C#you can write your own to incorporate any Java

• Compilerproduces IL and ships a native runtime to execute itcan link out unused code

Page 4: Introduction to Android with C# using Xamarin

How Does it Work?

Page 5: Introduction to Android with C# using Xamarin

Xamarin Installer

• Simple unified installerhttp://xamarin.com/downloadinstalls Android SDK for you

• Register with Google to deploy on Play (but you can deploy directly too)

http://play.google.com/apps/publish

Page 6: Introduction to Android with C# using Xamarin

Mac OS X WindowsWindows

IDE

iOS

Android

Windows Phone

Development Environment Support

XamarinBusiness Edition+

Mac+

Page 7: Introduction to Android with C# using Xamarin

Android Development Environment

Xamarin Studio

Visual Studio

Page 8: Introduction to Android with C# using Xamarin

Android UI Designer

Xamarin Studio

Visual Studio

Page 9: Introduction to Android with C# using Xamarin

Android Development Environment

Shared runtime fordebugging only.

Linking reduces size

Choose CPU arch

Page 10: Introduction to Android with C# using Xamarin

Android Development Environment

• AndroidManifest.xmlPermissionsApp configurationuse [Activity] and other attributes

Page 11: Introduction to Android with C# using Xamarin

Android Development Environment

• Deployment

Signing wizard

Page 12: Introduction to Android with C# using Xamarin

DEMO

Page 13: Introduction to Android with C# using Xamarin

DEMO

Page 14: Introduction to Android with C# using Xamarin

RESULT

Page 15: Introduction to Android with C# using Xamarin

SHARE

Components

Code

‘Structure’

Design

Page 16: Introduction to Android with C# using Xamarin

SHARE

Page 17: Introduction to Android with C# using Xamarin

Recap

• Build Android apps in C# with .NET• Use Xamarin Studio or Visual Studio• Apps have native look and feel• Apps run natively, with native performance• Share code• Component Store

http://components.xamarin.com

Page 18: Introduction to Android with C# using Xamarin

What’s Next?

• async/await• F#• Portable Class Libraries (PCL)• Google Play Services

In app purchasingLocation servicesMaps v2

• Google Support LibDrawer Navigation + more!

Page 19: Introduction to Android with C# using Xamarin

What’s Next?async/await

Page 20: Introduction to Android with C# using Xamarin

Go!• 10 minute guide to building an app

http://xamarin.com/getting-started • Docs, Recipes

http://docs.xamarin.com/• Forums

http://forums.xamarin.com• Samples

http://github.com/xamarin

http://xamarin.com/download

Page 21: Introduction to Android with C# using Xamarin

Q&A