Develop Android Application  with Mono for Android      Nicko Satria Utama          Level 100
What is Android• It is an Operating System derived from Linux  that is developed by Open Handled Alliance  led by Google• ...
What is Dalvik VM• Commonly used Virtual Machine on Android• Convert from Java byte code to Dalvix  Executable on installa...
Mono for Android• It is developed by Xamarin.• It is an alternate implementation using Mono  in Android environment• It is...
Mono for Android• It uses C# as development language• It uses .NET Base Class Library• It can be developed using Visual St...
Architecture
Architecture• Mono and Dalvik has access directly and  independently to Linux so there is no stacking  between Mono and Da...
Mono for Android Interested Feature• Simple installation compare to use another  tool.• Using C# 3.0• Support SQL Lite• Co...
Mono for Android Interested Feature• Design UI directly using axml (Android XML)  by drag and drop from Visual Studio 2010...
Mono for Android Performance• It is faster than using Java.• It is a bit slower than Java in the startup since  the size i...
Mono for Android Software             Requirement• Windows XP SP2 or latest or Windows Server  2003 or latest.• IIS instal...
Installation (trial license)• Goto http://xamarin.com/trial• Fill it everything and then click Mono for  Android for Windo...
Installation (trial license)• Just follow the installation wizard
Installation (trial license)• Just follow the wizard. This screen checks if  components is installed. VS 2010 instance  mu...
Installation (trial license)• The required component will be displayed.
Installation (trial license)• Just follow the wizard. It will download all  required component.
Installation (trial license)• After it finished, Please restart the Windows.  It is useful for setting environments like  ...
Installation Android SDK• Mono for Android will install some of Android  SDK from API 8, 10, 12 and 14 in the  installatio...
Configure Android Virtual Device• Mono for Android will configure some Android  Virtual Device with default configuration ...
Creating first project in VS 2010• Start Visual Studio 2010• Create a new project type of mono droid. For  example: Androi...
Creating first project in VS 2010• Run on debug configuration
Creating first project in VS 2010• Choose one of started device from the list.  The developer can start a new device if  n...
Creating first project in VS 2010• This is a the display of Android emulator.
Creating first project in VS 2010• Select a started emulator.
Creating first project in VS 2010• This is the application inside Android  emulator.
Creating first project in VS 2010• Developers can debug directly in VS 2010
Installation Troubleshooting• Unautorized Access on  c:usersEmric02AppDataLocalTempMonofor  Droidinstaller_r20.exe. This f...
Installation Troubleshooting• OS is not recognized or error. It happens on  Windows 8 Preview or Windows 2012 Server  RC. ...
Development Consideration• Keep as simple as possible and use variable or  instance wisely.• Decrease use of Java/Dalvik s...
Development Consideration• Your application will package together with  Mono runtime and make application size  bigger tha...
Resources• Mono for Android documentation  http://docs.xamarin.com/android/getting_star  ted/Introduction_to_Mono_for_Andr...
Resources• Tested performance Dalvik vs Monodroidhttp://www.koushikdutta.com/2009/01/dalvik-vs-mono.html• Dalvik VM on Goo...
Questions?• Post some questions on  http://www.stackoverflow.com
THANK YOU
Upcoming SlideShare
Loading in...5
×

Develop android application with mono for android

4,611

Published on

Published in: Technology
1 Comment
0 Likes
Statistics
Notes
  • Be the first to like this

No Downloads
Views
Total Views
4,611
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
1
Likes
0
Embeds 0
No embeds

No notes for slide

Develop android application with mono for android

  1. 1. Develop Android Application with Mono for Android Nicko Satria Utama Level 100
  2. 2. What is Android• It is an Operating System derived from Linux that is developed by Open Handled Alliance led by Google• Run on Smartphone to Tablet to Netbooks• It has Apache license 2.0• Based on Linux kernel 2.6• Support ARM and x86 Architechture
  3. 3. What is Dalvik VM• Commonly used Virtual Machine on Android• Convert from Java byte code to Dalvix Executable on installation• It is installed in the handset.
  4. 4. Mono for Android• It is developed by Xamarin.• It is an alternate implementation using Mono in Android environment• It is not installed in the handset.• It is used by Microsoft and other big vendors to develop Android Apps.• It is a paid license. A trial license will run on emulator only.
  5. 5. Mono for Android• It uses C# as development language• It uses .NET Base Class Library• It can be developed using Visual Studio 2010 or MonoDevelop as an IDE• The code will compiled into Mono IL• It can interopt between Dalvik and Mono via Mono Callable Wrapper and Android Callable Wrapper
  6. 6. Architecture
  7. 7. Architecture• Mono and Dalvik has access directly and independently to Linux so there is no stacking between Mono and Dalvik
  8. 8. Mono for Android Interested Feature• Simple installation compare to use another tool.• Using C# 3.0• Support SQL Lite• Consume web service and WCF directly through basicHttpBinding• Can run and debug on Visual Studio 2010
  9. 9. Mono for Android Interested Feature• Design UI directly using axml (Android XML) by drag and drop from Visual Studio 2010 toolbox• Simple project assets/artifacts.• All Mono shared runtime and user assembly will be compiled and package into one file.
  10. 10. Mono for Android Performance• It is faster than using Java.• It is a bit slower than Java in the startup since the size is bigger than Java• An article for perfomance comparison between Dalvik and Mono http://www.koushikdutta.com/2009/01/dalvik -vs-mono.html
  11. 11. Mono for Android Software Requirement• Windows XP SP2 or latest or Windows Server 2003 or latest.• IIS installed for web service or WCF project.• Visual Studio 2010 at least Professional edition with Service Pack 1.
  12. 12. Installation (trial license)• Goto http://xamarin.com/trial• Fill it everything and then click Mono for Android for Windows.• It will download setup.exe and then run it
  13. 13. Installation (trial license)• Just follow the installation wizard
  14. 14. Installation (trial license)• Just follow the wizard. This screen checks if components is installed. VS 2010 instance must be turn off
  15. 15. Installation (trial license)• The required component will be displayed.
  16. 16. Installation (trial license)• Just follow the wizard. It will download all required component.
  17. 17. Installation (trial license)• After it finished, Please restart the Windows. It is useful for setting environments like JAVA_HOME or else to be recognized by Windows.
  18. 18. Installation Android SDK• Mono for Android will install some of Android SDK from API 8, 10, 12 and 14 in the installation with default configuration.• Developers can download another API for another Android target.
  19. 19. Configure Android Virtual Device• Mono for Android will configure some Android Virtual Device with default configuration from API 8, 10, 12 and 14• Developers can make a new Android Virtual Device with own configuration.
  20. 20. Creating first project in VS 2010• Start Visual Studio 2010• Create a new project type of mono droid. For example: Android Application
  21. 21. Creating first project in VS 2010• Run on debug configuration
  22. 22. Creating first project in VS 2010• Choose one of started device from the list. The developer can start a new device if nothing started.
  23. 23. Creating first project in VS 2010• This is a the display of Android emulator.
  24. 24. Creating first project in VS 2010• Select a started emulator.
  25. 25. Creating first project in VS 2010• This is the application inside Android emulator.
  26. 26. Creating first project in VS 2010• Developers can debug directly in VS 2010
  27. 27. Installation Troubleshooting• Unautorized Access on c:usersEmric02AppDataLocalTempMonofor Droidinstaller_r20.exe. This file can be deleted, Add “Everyone” on temp folder security and installation wizard can be started• Java runtime SE cannot found or already installed. The Mono for Android needs specific Java runtime SE 6 update 23 at least on x86. Please uninstall your Java runtime SE and lets the mono for android do the job. After installation is succeed, it can be upgrade to latest update.
  28. 28. Installation Troubleshooting• OS is not recognized or error. It happens on Windows 8 Preview or Windows 2012 Server RC. Please uninstall or use virtual machine like virtualbox or vmware; and install on RTM version of Windows.• Cannot access to android hardware device. This error will appear when you use trial. Just ignore it.
  29. 29. Development Consideration• Keep as simple as possible and use variable or instance wisely.• Decrease use of Java/Dalvik specific API since it will decrease performance. Find similar function/class/method on .NET
  30. 30. Development Consideration• Your application will package together with Mono runtime and make application size bigger than Java/Dalvik. It makes some time to load. It can use splash screen to hide it.
  31. 31. Resources• Mono for Android documentation http://docs.xamarin.com/android/getting_star ted/Introduction_to_Mono_for_Android• Mono for Android Community on stackoverflow http://stackoverflow.com/questions/tagged/m onodroid?sort=active
  32. 32. Resources• Tested performance Dalvik vs Monodroidhttp://www.koushikdutta.com/2009/01/dalvik-vs-mono.html• Dalvik VM on Google IO 2008 on Youtube http://www.youtube.com/watch?v=ptjedOZEX PM• Xamarin channel on Youtube http://www.youtube.com/user/xamarinhq
  33. 33. Questions?• Post some questions on http://www.stackoverflow.com
  34. 34. THANK YOU

×