author | ms.service | ms.topic | ms.date | ms.author |
---|---|---|---|---|
conceptdev |
app-service-mobile |
include |
05/09/2019 |
crdun |
-
Open the project using Android Studio, using Import project (Eclipse ADT, Gradle, etc.). Make sure you make this import selection to avoid any JDK errors.
-
Open the file
ToDoActivity.java
in this folder - ZUMOAPPNAME/app/src/main/java/com/example/zumoappname. The application name isZUMOAPPNAME
. -
Go to the Azure portal and navigate to the mobile app that you created. On the
Overview
blade, look for the URL which is the public endpoint for your mobile app. Example - the sitename for my app name "test123" will be https://test123.azurewebsites.net. -
In
onCreate()
method, replaceZUMOAPPURL
parameter with public endpoint above.new MobileServiceClient("ZUMOAPPURL", this).withFilter(new ProgressFilter());
becomes
new MobileServiceClient("https://test123.azurewebsites.net", this).withFilter(new ProgressFilter());
-
Press the Run 'app' button to build the project and start the app in the Android simulator.
-
In the app, type meaningful text, such as Complete the tutorial and then click the 'Add' button. This sends a POST request to the Azure backend you deployed earlier. The backend inserts data from the request into the TodoItem SQL table, and returns information about the newly stored items back to the mobile app. The mobile app displays this data in the list.