Skip to Content

Try Out SAP Cloud Platform SDK for Android Wizard

0 %
Try Out SAP Cloud Platform SDK for Android Wizard

Try Out SAP Cloud Platform SDK for Android Wizard

Use the Android Studio integrated SAP Wizard to create a mobile app and configure it to make use of features of the SAP Cloud Platform Mobile Services.

You will learn

  • How to create and run an Android app using the wizard
  • How to create a Google Firebase project, enable Cloud Messaging and download a google-services.json file from Google Firebase console to enable push messaging
  • What screens are generated by the wizard


Before you start, make sure you have:

Step 1: Create and run the project

Open Android Studio.

Android Studio

Choose Start a new SAP Cloud Platform Android project.

New project

The wizard can save the server connection details for multiple servers. Fill in the required fields as shown below.

Ensure you have completed the prerequisites for this tutorial before continuing.

Field Value
Account Name SAP Cloud Platform Mobile Services Trial
Admin API URL See below for how to get this URL
Admin UI URL See below for how to get this URL
Username Username for your trial account user
Password Password for your trial account user
Save Account Information Check the first time the account info so it does not have to be re-entered on subsequent runs of the wizard

Go to the SAP Cloud Platform Mobile Services website and under Important Links, both URLs will be present

Admin API and UI URLServer connection

Click Next on the Server Connection tab.

On the Cloud Configuration tab select Create and provide the required information.

Field Value
Application Name Wiz App
Application ID
Authentication Type Basic
Create tab information

Click Next to configure the OData Services.

OData services blank

The SAP Cloud Platform Mobile Services provides a sample backend destination named that is being used here to provide data for the application. It contains product categories, product, supplier, customer and sales order data. Since you are creating a new application, add

OData services add service

Click Next to continue to the project configuration.

OData services done

On the Android Studio Project tab provide the following configuration data.

Field Value
Project Name Wiz App
Project Namespace
Target Language Java
Project configuration

On the Project Features tab, provide the following configuration data.

Field Value
Use Discovery Service as Configuration Provider uncheck
OData Online
Create a sample user experience for the selected OData Destination check
Enable Logging check
Enable Upload check
Enable Usage check
Enable Push optional
Project features

If you would like to add push notification support to your application, proceed to Step 2 which describes how to acquire a google-services.json file needed for push messaging. Otherwise, uncheck Enable Push, click Finish and proceed to Step 3.

What is the name of the wizard used to create the project?
Step 2: Enable push notifications (optional)

When the Enable Push checkbox is checked, an error message is shown explaining that you need to specify a google-services.json file. We will obtain this file from the Cloud Messaging feature in Google Firebase.

Push Notifications enabled

Open the Firebase console and click on Add project.

Add project in Firebase

Access Project Settings for the newly created project.

Project settings

Add Firebase to your app.

Add Firebase to your Android app

The Android package name must match the Project Namespace used when creating the app in Android Studio. In our example, the Android package name is

Register App

Download the google-services.json file.

Download google-services.json file

Now browse for the google-services.json file in the wizard. This file is placed into the app folder of the generated project and helps enable the app to work with Google Firebase notifications.

Add google-services.json file to wizard

The push configuration on the server will be added in the tutorial Send notifications to your application.

Click Finish.

What file is required from Google Firebase to enable the project to receive push messages?
Step 3: Explore the app

Wait for the build to finish.

Project created

Click the Run toolbar icon.

Run the project

Choose the emulator to run the app on.

For more information on creating Virtual Devices that run in the Android Emulator, see here.

Deployment target

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

Welcome screen

Sign in with your credentials.

Authentication screen

The entered credentials, are securely stored by the app, and do not need to be re-entered the next time the app is opened.

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

Passcode screen

The passcode policy can be modified in the Mobile Service Cockpit under Client Policies feature. The passcode screen will not be shown if the Enable Passcode Policy is not checked.

Passcode Policy

As usage reporting was enabled, this screen can be used to show details of how the collected data will be used. Usage is covered in a later tutorial in this mission.

Data Collection 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

Further information on the generate application can be found at Running the Wizard.

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

What features does the generated app contain?

Next Steps

Back to top