Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Past Posts in this Series |
This Post is About Android Client |
Finally, we are ready to talk about Android development. Yes, that means we are going to take out the Eclipse IDE and code in Java. Our Android client will make JSON calls against cloud data. ![]() |
Setting up Eclipse and Android for Development |
You obviously need to setup your Android development environment. These links will get your started. You will need to learn about downloading and installing Eclipse, the Android SDK, the Java runtime, etc. Everything that follows here assumes you have a properly configured Eclipse environment and associated Android tooling.
|
Creating the Android Project in Eclipse |
Select File / New / Android Project. ![]()
![]() |
CloudClientActivity.java |
We are now ready to start adding our java code. Notice we have already been provided CloudClientActivty.java. ![]()
|
Data.java |
Add a java module and insert code. ![]() ![]() ![]() ![]()
|
Main.xml |
The next 4 files represent the user interface. Lets start with Main.xml. It is already provided. ![]() ![]()
|
Dialog.xml |
Add a new xml file by right-mouse clicking on layout. Choose New / Android XML File. ![]()
|
list_item.xml |
Add a new xml file by right-mouse clicking on layout. Choose New / Android XML File. Insert the following xml code:
|
toast_layout.xml |
Add a new xml file by right-mouse clicking on layout. Choose New / Android XML File. Insert the following xml code:
|
Modify AndroidManifest.xml |
We need to tell the application that an connecting to the internet is possible from within the application. This is done by modifying the XML inside of AndroidManifest.xml. We need to add the following line:
<uses-permission android:name="android.permission.INTERNET" /> This is what AndroidManifest.xml should look like:
|
Ready to compile and run ! |
Close your Android emulators, if they are open. Save and close all the java and xml files. Select the following command: Project / Clean. ![]() ![]() ![]() ![]() ![]() |
Conclusion |
This concludes this 8-part series on constructing a RESTful Azure (Microsoft Cloud) and performing CRUD operations from an Android client application. This has demonstrated the whole process from start to end, complete with source code. Hope you found value in it! -Bruno ![]() |