Windows Azure Social Games Toolkit ImagesUsing Windows Azure Mobile Services in Android Applications. Introduction. Mobile computing is here. We cannot ignore the fact that more mobile computing devices sell than the classic PCs and hence mobile developers need to understand how to leverage the benefits of cloud computing for their mobile applications. Basics of Windows Azure Mobile Services. To help developers easily offer the power of cloud computing to their mobile applications, Microsoft offers “Windows Azure Mobile Services”, which allows creation of a scalable and secure backend for mobile applications. Windows Azure Mobile Services provides structured storage, user authentication and the ability to send push notifications. Windows Azure Mobile Services has SDKs to support Windows, Android, i. OS and HTML developers on top of powerful REST APIs, enabling developers to build connected applications across a varied range of platforms and provide a consistent experience across devices. These services can enable a user to toggle between devices and continue where he/she last left off, enabling seamless device transitions. Mobile Services enable application developers to: 1. Store Data in the cloud. Authenticate users easily. Easily send push notification. Easy customization to enable use of selected services. Support for monitoring, alerting and auto scaling. To see how easy it is to use Windows Azure Mobile services, let’s create a simple Android application powered by these cloud services. Hands On. First, we will use the Windows Azure Management portal to create a new mobile service. One of the pre- requisites of the hands on exercise is a Windows Azure subscription. A free trial is available by visiting http: //www. Free Trial. Once signed up, login to your Windows Azure subscription at https: //manage. You will see the screen below. Log into Your Windows Azure Subscription. Click the “New” link at the bottom of the page, choose “Computer > Mobile Service” and then “Create”, as shown below. Create Mobile Service. Provide a name for the URL for your mobile service. In our case, I am naming the URL test. Android. App. The complete URL will be test. Android. App. azure- mobile. Leave the default setting for the database (which should be “Create a new 2. MB SQL database”. Choose the other options as it maps for your use case. For the purpose of the demo, I am leaving it to the default values. Create a Mobile Service. Click the next arrow. You will now see the database settings. Select a new SQL database server and provide the server login name, login password and the region you want the server to be in. Click the Complete link.
This will start the creation of a new mobile service. New Mobile Service. In a few moments, the new mobile service will be ready. The next step involves creating a new Android application. Microsoft has made it easy to create a new Android application, by providing short cut steps in the Windows Azure Management Portal itself. Once the new mobile service is ready, click the service name or the arrow next to its name as shown below. Click the Arrow. This will take you to the Dashboard page for the mobile service. Dashboard. Now, we will provide the platform for which we want to build an application. Click Android as shown below. Click Android. The links below will change to show “Create a new android app” and “Connect an existing Android App”. Create a New Android App or Connect an existing Android App. For our case, we will choose “Create a new Android App”. The page will now show additional information as shown below. Create a New Android App. At this time, if you do not have the Android Developer Tools, you need to install them. They are available from https: //go. Link/? Link. ID=2. We will now click the link to “Create Todo. Learn all the essential features of Windows 10, including everything you need to know to install Windows 10, customize it to your liking, and start working with files. Prime[31] is a San Diego based, full service firm that specializes in producing top quality mobile applications and games for small and large businesses. We. Item Table”. A test table, which we will be using in our Android application, will be created for us. Create a Table. Next, we will download the starter Android project by clicking the Download link. Download Link. Once downloaded, extract the contexts of the zip file to your local folders. Now, fire up Eclipse and choose File- > Import. When the Import dialog is presented, choose “Android - > Existing Android Code into Workspace” and click “Next”. Eclipse Import. At the next screen, provide the path to the folder where you extracted the zipfile and click Finish. Import Projects. The downloaded project will now be imported into your Eclipse workspace. Some of you might get an error shown below.[2. Android. App] Unable to resolve target 'android- 1. If you get the error, launch Android SDK manager, and download Android 4. API 1. 8). Android SDK Manager. Once your project is successfully loaded in Eclipse, you can execute the application by clicking Run. Once the application runs, it will be rendered as below. Rendered Application. At the moment, the application only adds items in a todolist (the default template for the Windows Azure Mobile services application). If you enter any text and click “Add”, the content will be added to the cloud based database. You can verify that the data is stored in the cloud by navigating to the Data section of the test. Andriod. App workspace on the Windows Azure Management portal (as shown below). Data section of the test. Andriod. App Workspace. Click the Todo. Item table name. The Todo. Item Table. You can see that the detail you provided for the task is shown under the text column. Task Details. We can see how simple it was to create an Android application powered by Windows Azure Mobile Services. To see what is under the hood, check out the default source code that was created by the wizard. You can customize this code to make this work for the application you want to build. Summary. In this article, we learned how easy it was to create Android mobile applications powered by Windows Azure Mobile Services. I hope you have found this information useful. About the Author. Vipul Patel is a Program Manager currently working at Amazon Corporation. He has formerly worked at Microsoft in the Lync team and in the . NET team (in the Base Class libraries and the Debugging and Profiling team). He can be reached at vipul.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
September 2016
Categories |