Google Developer Group   January 14th, 2013
Mono for Android...for Google Developers                   Craig Dunn               Developer Evangelist         craig@xam...
HeadlineYour	  own	  sub	  headline                                 OVERVIEW
What is Mono?Open source implementation of the .NET Common Language  Runtime (CLR) and the C# language  • Linux, MacOS X, ...
What is Mono for Android?    Mono C# & .NET  + Android API bindings  + UI designer  + Visual Studio plug-in (or MonoDevelo...
What is Mono for Android?• Runs natively   - Fast enough for games, eg. flight simulation• Use platform’s UI controls• Acc...
What is Mono for Android?                   • LINQ support                   • .NET XML APIs                   • Event han...
Rich IDE Support • Point and Click UI generation • Code completion to explore Android APIs • Source control (Subversion & ...
Debugging on Emulator & Devices• Debug with Android simulator and on devices• Set breakpoints, watches, single-step throug...
HeadlineYour	  own	  sub	  headline                                 DEMO
Who moved my cheese?• /res/ & R.java• findViewById• Android.xml• Anonymous classes• Naming (InitialCaps)!
HeadlineYour	  own	  sub	  headline                                 Tech stuff
Runtime• Mono runtime is bundled with each app• For faster debugging, a Shared  Runtime can be installed• Apps deployed to...
LinkingMono compiler strips out unused classes/libraries   • Mobile devices – size matters!   • Trap for young players: it...
Binding• Xamarin releases new versions of  Mono for Android that correspond to  each API level and release from  Google.• ...
Xamarin.Mobile APIsxamarin.com/mobile• Camera• Contacts• Geolocation• Compass/Accelerometer• NotificationsFor Android, iOS...
Cross-Platform Development• Share code• Shared data with SQLite• Shared web services with WebClient/  HttpClient• Conditio...
Cross-Platform DevelopmentiCircuit• Code re-use http://praeclarum.org/
HeadlineYour	  own	  sub	  headline                                 DEMO
Cross-Platform DevelopmentMWC 2012 sample
Cross-Platform Developmentmwc.xamarin.com
Cross-Platform DevelopmentOther Cross-Platform Libraries• MonoCross              code.google.com/p/monocross  Cross-platfo...
Customers           Complete access to iOS & Android UI and APIs   Native binary, not interpreted, for responsive, fluid p...
HeadlineYour	  own	  sub	  headline                                 Questions?
HeadlineYour	  own	  sub	  headline                                 Thank you!        Learn more at our conference        ...
Upcoming SlideShare
Loading in …5
×

Mono for Android... for Google Devs

14,367 views
14,213 views

Published on

Presentation to the East Bay Google Developers Group - January 14th, 2013

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
14,367
On SlideShare
0
From Embeds
0
Number of Embeds
66
Actions
Shares
0
Downloads
28
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Mono for Android... for Google Devs

  1. 1. Google Developer Group January 14th, 2013
  2. 2. Mono for Android...for Google Developers Craig Dunn Developer Evangelist craig@xamarin.com @conceptdevXamarins Mono for Android tools let you build applications for Android using C#.You can write code on a Mac with MonoDevelop, or for Windows choose betweenMonoDevelop and Visual Studio. Whats in it for Java developers? C# is an easyleap, and you can then re-use your code on iOS and Windows devices. Well look atthe tooling, building an Android app with C# and the principles of sharing code withiPhones, iPads and Windows.
  3. 3. HeadlineYour  own  sub  headline OVERVIEW
  4. 4. What is Mono?Open source implementation of the .NET Common Language Runtime (CLR) and the C# language • Linux, MacOS X, Solaris, BSD, Wii, PS3, PS Vita! • Started in 2001 as Ximian, purchased by Novell in 2003, released in 2004 • 2009: MonoTouch created (released 2010) • 2010: Mono for Android created (released 2011) • 2011: Novell purchased by Attachmate ($2.2b) - Xamarin is born... http://www.mono-project.com/ http://github.com/mono http://xamarin.com/
  5. 5. What is Mono for Android? Mono C# & .NET + Android API bindings + UI designer + Visual Studio plug-in (or MonoDevelop) = Android application development http://xamarin.com/android Released April 2011
  6. 6. What is Mono for Android?• Runs natively - Fast enough for games, eg. flight simulation• Use platform’s UI controls• Access all Android features• Incorporate existing Java
  7. 7. What is Mono for Android? • LINQ support • .NET XML APIs • Event handling & delegates • Parallel LINQ
  8. 8. Rich IDE Support • Point and Click UI generation • Code completion to explore Android APIs • Source control (Subversion & Git) • Use Visual Studio or our own cross-platform IDE
  9. 9. Debugging on Emulator & Devices• Debug with Android simulator and on devices• Set breakpoints, watches, single-step through code, hover over variables• Change object values real-time
  10. 10. HeadlineYour  own  sub  headline DEMO
  11. 11. Who moved my cheese?• /res/ & R.java• findViewById• Android.xml• Anonymous classes• Naming (InitialCaps)!
  12. 12. HeadlineYour  own  sub  headline Tech stuff
  13. 13. Runtime• Mono runtime is bundled with each app• For faster debugging, a Shared Runtime can be installed• Apps deployed to users always include the runtime, but...
  14. 14. LinkingMono compiler strips out unused classes/libraries • Mobile devices – size matters! • Trap for young players: it might strip out stuff you want to keep! • Classes/methods/properties used via Reflection • Classes/methods/properties used in serialization operationsBy default disabled in DEBUG, so stuff will work there and mysteriously break in RELEASE [Preserve(AllMembers = true)]
  15. 15. Binding• Xamarin releases new versions of Mono for Android that correspond to each API level and release from Google.• Tools are provided to help you ‘bind’ any existing Java lib (.jar) to incorporate into your Mono app
  16. 16. Xamarin.Mobile APIsxamarin.com/mobile• Camera• Contacts• Geolocation• Compass/Accelerometer• NotificationsFor Android, iOS, Win Phone & Win 8/RT
  17. 17. Cross-Platform Development• Share code• Shared data with SQLite• Shared web services with WebClient/ HttpClient• Conditional compilation (if required)Write your UIfor each platform
  18. 18. Cross-Platform DevelopmentiCircuit• Code re-use http://praeclarum.org/
  19. 19. HeadlineYour  own  sub  headline DEMO
  20. 20. Cross-Platform DevelopmentMWC 2012 sample
  21. 21. Cross-Platform Developmentmwc.xamarin.com
  22. 22. Cross-Platform DevelopmentOther Cross-Platform Libraries• MonoCross code.google.com/p/monocross Cross-platform UI framework• Vernacular github.com/rdio/vernacular Cross-platform localization framework• MonoGame monogame.net Cross-platform XNA game framework, from Xbox to Windows RT (as well as iOS and Android)
  23. 23. Customers Complete access to iOS & Android UI and APIs Native binary, not interpreted, for responsive, fluid performance under the most demanding app scenarios Infinite Flight TouchDraw Rdio iOS, Mac & Android iOS, Android, WP (Samsung only)
  24. 24. HeadlineYour  own  sub  headline Questions?
  25. 25. HeadlineYour  own  sub  headline Thank you! Learn more at our conference xamarin.com/evolve Austin, Texas ~ April 14-17

×