Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

150 lines (93 sloc) 8.77 KB

Get started with Mobile Services

This tutorial shows you how to add a cloud-based backend service to an Android app using Azure Mobile Services. In this tutorial, you will create both a new mobile service and a simple To do list app that stores app data in the new mobile service.

A screenshot from the completed app is below:

Completing this tutorial requires the Android Developer Tools, which includes the Eclipse integrated development environment (IDE), Android Developer Tools (ADT) plugin, and the latest Android platform. Android 4.2 or a later version is required.

The downloaded quickstart project contains the Mobile Services SDK for Android. While this project requires Android 4.2 or a later version, the Mobile Services SDK requires only Android 2.2 or a later version.


To complete this tutorial, you need an Azure account. If you don't have an account, you can create a free trial account in just a couple of minutes. For details, see Azure Free Trial.

Create a new mobile service

[WACOM.INCLUDE mobile-services-create-new-service]

Create a new appCreate a new Android app

Once you have created your mobile service, you can follow an easy quickstart in the Management Portal to either create a new app or modify an existing app to connect to your mobile service.

In this section you will create a new Android app that is connected to your mobile service.

  1. In the Management Portal, click Mobile Services, and then click the mobile service that you just created.

  2. In the quickstart tab, click Android under Choose platform and expand Create a new Android app.

    This displays the three easy steps to create an Android app connected to your mobile service.

  3. If you haven't already done so, download and install the Android Developer Tools on your local computer or virtual machine.

  4. Click Create TodoItem table to create a table to store app data.

  5. Under Download and run your app, click Download.

    This downloads the project for the sample To do list application that is connected to your mobile service. Save the compressed project file to your local computer, and make a note of where you save it.

Run your Android app

The final stage of this tutorial is to build and run your new app.

  1. Browse to the location where you saved the compressed project files and expand the files on your computer.

  2. In Eclipse, click File then Import, expand Android, click Existing Android Code into Workspace, and then click Next.

  3. Click Browse, browse to the location of the expanded project files, click OK, make sure that the TodoActivity project is checked, then click Finish.

    This imports the project files into the current workspace.

  4. From the Run menu, click Run to start the project in the Android emulator.


    To be able to run the project in the Android emulator, you must define a least one Android Virtual Device (AVD). Use the AVD Manager to create and manage these devices.

  5. In the app, type meaningful text, such as Complete the tutorial, and then click Add.

    This sends a POST request to the new mobile service hosted in Azure. Data from the request is inserted into the TodoItem table. Items stored in the table are returned by the mobile service, and the data is displayed in the list.


    You can review the code that accesses your mobile service to query and insert data, which is found in the file.

  6. Back in the Management Portal, click the Data tab and then click the TodoItems table.

    This lets you browse the data inserted by the app into the table.

Next Steps

Now that you have completed the quickstart, learn how to perform additional important tasks in Mobile Services:

Jump to Line
Something went wrong with that request. Please try again.