Microsoft Azure Mobile Apps with Xamarin Android – jump start
Microsoft Azure App Service is fully managed Platform as a Service (PaaS). It gives developers a rich set of capabilities connected with web and mobile.
Mobile Apps platform is a part of it that offers high scalability in mobile development. Mobile developers can us Azure Mobile Apps for storing data in the cloud, offline data storage and background synchronization, authenticating users or sending push notifications.
It is accessible from all popular mobile platforms: Android, iOS and Windows.
Azure Mobile App integration with Xamarin Android
What do I need to start?
1) Visual Studio 2013 Community (for free) or higher
2) Microsoft Azure subscription (you can test it for free here)
3) Xamarin Android subscription (you can test it for free here)
4) Android Phone or Xamarin Android Player Emulator (download here)
1) Configure your Mobile App on the Azure Portal: Azure Portal
a) Select “Web+Mobile” optiion and then “Mobile App”:
b) Type the name for your Mobile App Service and choose “S1 Standard Plan”:
c) Create new “Resource Group” (in souch group you can collect you resources like website or database) and new “App Service plan”(set of features you can share between apps):
d) After that you must configure database for you Mobile App. Click “Package settings” -> “USERDATABASE” and then “Create a new databse”.
There you must also provide name for your database, “Pricing Tier” (it is just a pricing plan and offer), choose “S1 Standard”:
e) Last point is connected with database server configuration. Insert “Server name”, “Admin login”, “Password” (this will enable access to you databse in the future). You must also choose “LOCATION” I have selected “North Europe” because it is cheaper for the region I live.
f) Your Azure Mobile App is ready to create:
g) If you configured everything, you should see the screen below. Our Azure Mobile App is ready!
1) Select “Browse all” section on the left bar ->Mobile Apps and the select the app you created above:
2) Click “Add Client” option. Download “Server Project” with number 2 and “Xamarin.Android” project with number 3:
3) You have to also download “Publish Profile” With it you will be able to publish your Aure Mobile App from Visual Studio:
Done! Now you can open your Mobile App project in Visual Studio. Firstly open the “Server project” version:
1) Build the whole solution:
2) Import “Publish profile” you have downloaded earlier:
3) Validate connection with Azure:
4) In this step set “Configuration” to “Release”. Click “Next”. Do not worry about other information displayed. I will write about it in the next post.
5) Click “Publish”. When its finished your browser should open with the next screen below:
That’s it! Your Azure Mobile App is working properly! Let’s open Xamarin.Android project now and connect to our Azure app!
1) Firstly open and build whole solution:
2) Launch Xamarin Android Player emulator (or connect you Android phone with developer options enabled):
3) Start project:
4) Our Xamarin Android app is connected with Azure Mobile App! Now you can add new item or select one for deleting:
This is the last point. You have created your Azure Mobile App and connected it with your Xamarin Android application.
In this post I tried to show how easily you can create Mobile App on Microsoft Azure cloud platform.
In the next post I will go through the code for both projects: server and mobile so you can understand how exactly this whole integration works.