Android App For Mobile Service In Azure

Introduction

This article will help you to create a Mobile Service in Azure, which can work for Android.

What are Mobile Services?

Mobile Services is a platform, provided by Microsoft Windows Azure, to support high strength mobile apps with help of Azure. It helps you to manage with your app data at the backend, join hands with the notification services, join with other Cloud services, etc.,

Mobile Services in Azure helps you to code with two languages for your backend business logics:

JavaScript (or) .NET

Here, we will be working with JavaScript

Note: Click here to know about creating a Mobile Service in Azure.

Developer Requirements

  1. Android Studio (click here to download Android Studio)
  2. Windows Azure account (click here to get a temporary Azure account)

Follow the steps, given below, to create an Android app under Mobile Service in Azure and add the data towards the backend database.

Step 1: Login to Azure Portal and click Mobile Service name, that has been created:

Mobile Service

Click the instance. Here, you can find an option called Choose a platform – select Android in it.

Android

Step 2: Click Create a New Android App. Make sure, you have Android Studio, installed at your machine. Now click “Create TodoItem Table”.

Here, in my case, the table is already created. You create a table, if you have created the Mobile Service now.

Create TodoItem Table

Now, download the app by clicking Download.

Download

Step 3: Extract the app and run it on Android Studio.

Launch Android Studio now.

Android Studio

Step 4: Click Import Project (Eclipse ADT, Gradle, etc).

Import Project

Step 5: Select your Build.Gradle file.
Build.Gradle file

Now, run the code in Android Studio and add the data.

As soon as the data is added from the app, which has been developed from Azure Portal, you can find the data added in the Mobile Service instance of Azure Management Portal under Data tab of Azure Mobile Service.

Azure Mobile Service

Here, inside the “Data” under Todoitem table, you can find the data added.