Skip to Content

Use SAP Wizard to Create Your First Android Application

test
0 %
Use SAP Wizard to Create Your First Android Application
Details
// Explore More Tutorials

Use SAP Wizard to Create Your First Android Application

10/18/2018

Beginner
15 min.
Create an Android application that will be connected to an OData backend.

You will learn

  • How to create an Android app using the Android Studio integrated SAP Wizard


Step 1: Set up development tools

If Android Studio is running, close it.

Close Android Studio

If there is an existing project at C:\AndroidStudioProjects\WizApp, delete it.

Delete existing project

If there is an emulator running and an app on it named Wiz App, delete it (Long press, App info, then UNINSTALL).

App InfoUninstall App

Check if the emulator has airplane mode enabled.

Airplane mode enabled

If so, turn it off by swiping down from the top of the emulator and clicking the airplane icon.

Airplane mode disabled

All set, let’s begin!

Log on to answer question
Step 2: Create and run the project

Open Android Studio.

Android Studio

Choose Start a new SAP Cloud Platform Android project.

New project

The SAP Cloud Platform SDK has been pre-installed on this machine from Trial Downloads. For further installation details see Installing the SAP Cloud Platform SDK for Android.

The wizard can save the server connection details for multiple servers. A preconfigured account has been provided.

Server connection

If the values are missing, the following values can be used:

Field Value
Account Name SAP Cloud Platform Mobile Services Trial
Admin API URL https://hcpms-p2000464045trial.hanatrial.ondemand.com/
Admin UI URL https://hcpmsadmin-p2000464045trial.dispatcher.hanatrial.ondemand.com/?hc_reset
Username p2000464045
Password SCP!2pwd

On the Cloud Configuration tab, select Use Existing and set the Application ID to com.sap.wizapp.

Cloud configuration

The application configuration has already been created and has added multiple features of the SAP Cloud Platform Mobile Services.

App features

The SAP Cloud Platform Mobile Services provides a sample backend destination named com.sap.edm.sampleservice.v2 that is being used here to provide data for the application. It contains product categories, product, supplier, customer and sales order data.

OData services

On the Project Configuration tab, provide the following configuration data:

Field Value
Project Name Wiz App
Project Namespace com.sap.wizapp
Project Location C:\AndroidStudioProjects\WizApp
Use Discovery Service for Application bootstrapping uncheck
Generate Master-Detail Application check
Enable Logging check
Enable Upload check
Enable Push check and browse to C:\AndroidStudioProjects\google-services.json
Project configuration

After clicking Finish, a project is created.

Project created

Click the Run toolbar icon.

Run the project

Choose the emulator to run the app on.

Deployment target
Log on to answer question
Step 3: Explore the app

The welcome screen is shown the first time the app is run.

Welcome screen

Sign in with the following credentials:

Field Value
User Name p2000464045
Password SCP!2pwd
Authentication screen

The credentials are used to authenticate against the SAP Cloud Platform Identity Service, are securely stored by the app, and do not need to be re-entered.

The passcode (or fingerprint if enabled) screen provides an additional layer of security for your app.

Passcode screen

The first screen of the app shows the different entities that are in the sample OData service.

Entities screen

Tap on Products to reach the below list screen.

Products screen

Tap on a list item to show an editable detail screen.

Category detail

Congratulations! You have created your first Android app using the SAP Cloud Platform SDK for Android!

Which features did we enable for the generated application?
×

Next Steps

Back to top