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

  1. Technology for Good
  2. Technology Overview
  3. Cloning the Project
  4. Running Xamarin App on iOS
  5. Running Xamarin App on Android
  6. Running Xamarin App on Windows
  7. Hockey App, Push Notifications & Wrap up

Do the following to run the application on Android

  1. Right click on the IRIS.Droid project and click Set As Default
    image11
  2. Change the Solution Platform to Any CPU
    image17
  3. 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
    image18

When the application runs, you should get the following if running on the Visual Studio Android emulator.
image19

Type in the following for credentials

  1. Username: Admin
  2. Password: password
  3. 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.

image20image21

Some things to note:

  1. If you are using an emulator, use the Visual Studio Android Emulator as it will make life easy for you
  2. 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

  1. Overview of the Visual Studio Android Emulator – https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/debug-on-emulator/visual-studio-android-emulator/
  2. 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

  1. Under Tools – All SDK Build-Tools
  2. 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
  3. Under Extra – Google USB Driver

Next up we’ll look at how to get the code base deployed and working on the Windows Platform.

Leave a Reply