Skip to Content

Try Out the SAP BTP SDK Wizard for Android

Use the Android Studio-integrated SAP BTP SDK Wizard for Android to create a mobile app and configure it to make use of SAP Mobile Services features.
You will learn
  • How to create and run an Android app using the wizard
  • How to use Google Firebase to enable push notifications when generating an Android app using the wizard
  • Which screens are generated by the wizard
flyingfish162Bruce MengMarch 31, 2025
Created by
sandeep-tds
January 9, 2023
Contributors
sandeep-tds
flyingfish162

Prerequisites

  • Step 1

    Please read Prerequisites first.

    1. Open Android Studio.

    2. Choose New SAP BTP Android App

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

      Field Value
      Account Name SAP Mobile Services
      Admin API URL See below for how to get this URL
      Admin UI URL See below for how to get this URL
      Authentication Type Basic
      Username Username for your account
      Password Password for your account
      Save Account Information Check this so that you do not have to re-enter account information on subsequent runs of the wizard
    4. Go to the SAP Mobile Services cockpit and under Important Links, both Admin URLs are present and can be copied.

      Admin API and UI URL
      Server connection
    5. Click Next in the Server Connection screen.

    6. Select Sample in the Cloud Configuration screen and set the Application ID to btp.sdk.wizapp.

      Sample tab information
    7. SAP Mobile Services provides a sample back-end destination called com.sap.edm.sampleservice.v4, which is used here to provide data for the application. It includes product categories, products, suppliers, customers and sales order data. Select it and click Next.

      Odata service destination screen
    8. Provide the following configuration data in the Android Studio Project screen.

      Field Value
      Project Name Wiz App
      Project Namespace com.sap.wizapp
      UI Framework View-based UI / Jetpack Compose-based UI
      Project configuration
    9. Provide the following configuration data in the Project Features screen.

      Field Value
      Enable Multiple Users uncheck
      Activation Options Generate AppConfig.json
      OData Online
      Create a Sample User Experience for the Selected OData Destination check
      Enable Logging check
      Enable Upload check
      Enable Usage Reporting check
      Enable Crash Reporting optional
      Enable Push optional
      Project features
    10. If you would like to add push notification support to your app, proceed to Step 2, which describes how to acquire the google-services.json file required for cloud messaging. Otherwise, uncheck Enable Push, click Finish and proceed to Step 3.

    What kind of project does the wizard from SAP BTP SDK create?

  • Step 2

    If you check the Enable Push checkbox, an error message will appear, indicating 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
    1. Open the Firebase console and click Create project. (If you have created any before, click Add project.)

      Add project in Firebase
    2. Click Continue until a new project is successfully created.

    3. Navigate to the Project settings for the newly created project.

      Project settings
    4. Scroll down and add a Firebase to your app.

      Add Firebase to your Android app

      The Android package name must match the Project Namespace you used to create the app in Android Studio. In our example, the Android package name is com.sap.wizapp.

      Register App
    5. Download the google-services.json file.

      Download google-services.json file
    6. Now browse for the google-services.json file in the wizard. This file is located in the generated project’s app folder, enabling the app to work with Google Firebase notifications.

      Add google-services.json file to wizard

      You can add push configuration on the server as in the Send Notifications to Your Android Application tutorial.

    7. Click Create and proceed to Step 3.

    What file is required from Google Firebase to enable the project to receive push messages?

  • Step 3
    1. Wait for the build to finish.

      Project created

      You may encounter a build error similar to: “Could not resolve all files for configuration ‘:classpath’……”, open Preferences (Windows: Settings, Mac: Android Studio > Settings…) to change gradle jdk to 17.

      Set gradle jdk to 17

      Finally, sync the project with the gradle files.

      Sync project with gradle files

    2. Choose an emulator for running the app.

      If you enabled the push service, please ensure you install an emulator with the Target labeled as Google Play. For more information on creating virtual devices that run in the Android Emulator, see Create and manage virtual devices in the Android Studio User Guide.

      Deployment target
    3. Click the Run toolbar icon.

      Run the project

      The welcome screen is displayed the first time the app is launched.

      Welcome screen
    4. Check the agreement, click Get Started, and the sign-in screen is displayed. Log in with your username and password.

      Authentication screen

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

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

      Passcode screen
    5. You can modify the passcode policy in the Mobile Service Cockpit under Client Configuration in Client Settings page. The passcode screen will not be displayed if the Enable Passcode Policy is not checked.

      Client Settings page access
      Passcode Policy
    6. Enable Usage Reporting is checked, this screen can display details about how the collected data will be utilized. For now, select either Allow or Deny. Usage Reporting is covered in another tutorial in this mission.

      Usage Reporting Consent Screen
    7. Similar to Usage Reporting, if Enable Crash Reporting is checked, this screen will show details about how the collected information will be used. Choose either Allow or Deny. If you select Deny, the crash information will only be stored locally.

      Crash Reporting Consent Screen
    8. Click Next on the Allow Notifications screen to choose either Allow or Don’t allow to indicate whether you want the app to send you notifications.

    9. The first screen of the app displays various entities that are available in the sample OData service.

      Entities screen

      Tap Products to navigate to the products list.

      Products screen
    10. Tap a list item to display the following editable detail screen.

      Category detail

    For further information on generating your app, see Creating Apps with the Wizard.

    Congratulations! You have created your first Android app using the SAP BTP SDK Wizard for Android!


    What features does the generated app contain?

Back to top