In the previous article on Hacking for Missing Kids – Running iOS Version we looked at how to get the Xamarin app running on iOS. Next, is running the application on Android.
For reference here is the series of articles available
- Technology for Good
- Technology Overview
- Cloning the Project
- Running Xamarin App on iOS
- Running Xamarin App on Android
- Running Xamarin App on Windows
- Hockey App, Push Notifications & Wrap up
Do the following to run the application on Android
- Right click on the IRIS.Droid project and click Set As Default
- Change the Solution Platform to Any CPU
- Tap F5 or click the debug button in the tool bar to start debugging on Android. You can also change the OS version and emulator to run it on from here
When the application runs, you should get the following if running on the Visual Studio Android emulator.
Type in the following for credentials
- Username: Admin
- Password: password
- Tap login to see the available cases
You should end up with a list and then be able to navigate to a case details page.
Some things to note:
- If you are using an emulator, use the Visual Studio Android Emulator as it will make life easy for you
- If you get some errors compiling for Android make sure you have appropriate Android SDKs installed. For this project you need minimum API Level 19, but recommend you just install all of them.
For android SDKs, the following links will be helpful
- Overview of the Visual Studio Android Emulator – https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/debug-on-emulator/visual-studio-android-emulator/
- Launching the Android SDK Manager from Visual Studio – https://developer.xamarin.com/recipes/cross-platform/ide/launch_sdk_manager/#Launch_SDK_Manager_from_Visual_Studio
In the Android SDK Manager you should install the following
- Under Tools – All SDK Build-Tools
- Different Android API Levels for example API 24 install SDK Platform and Google APIs. You can install other options but these options will be enough
- Under Extra – Google USB Driver
Next up we’ll look at how to get the code base deployed and working on the Windows Platform.