SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
โคข Open full site

Use Usage Reporting in Your Android Application

See how the Usage Reporting feature can help provide information on how your app is being used.

Overview

🎓 beginner 30 min. SAP BTP Sdk For AndroidBeginnerAndroidMobileOdataSAP Business Technology Platform

You will learn

  • โœ”How the Usage Reporting feature works
  • โœ”How to customize the consent screen
  • โœ”How to further instrument the Wizard app
  • โœ”How to add code to enable auto-upload of usage data based on the client policy
Bruce Meng B Bruce Meng January 7, 2026
Created by April 26, 2024
Contributors

Prerequisites

Prerequisites

Steps

Step 1 Manual upload of usage data
โ€”

As shown in the tutorial, Try Out the SAP BTP SDK Wizard for Android, ensure that Enable Usage Reporting is checked when creating the app.

Enable Usage when Creating App
Enable Usage when Creating App

When the app is first installed, a consent screen will automatically be shown to users.

The app must first receive permission to collect usage information from the user.

  1. Tap ALLOW to allow the app to record how the app is being used.

    Consent Screen
    Consent Screen

    If DENY was selected, the user’s choice can later be changed in the app’s Settings screen.

    Usage in Settings
    Usage in Settings

    Once you try to enable Consent to Usage Collection, the consent screen will be displayed again to confirm your choice.

    The Consent to Usage Collection will be disabled and cannot be enabled if usage was not enabled in the Mobile Services cockpit.

  2. To review this policy setting, in the Mobile Services cockpit, access Client Usage and User Feedback by navigating to Mobile Applications > Native/MDK > btp.sdk.wizapp > Client Usage and User Feedback.

    Access Client Usage and User Feedback
    Access Client Usage and User Feedback

    The Client Usage Configuration specifies whether uploads of usage data are allowed and the time interval between automatic usage report uploads.

    The preset value for Upload Report After is 0 (usage reports will not be uploaded automatically), which we will use in the implementation of automatically uploading usage reports to the server. Finally, click Save to save any changes.

    Enable Usage in Client Policies
    Enable Usage in Client Policies

  3. From the Settings screen, tap Upload Usage Data.

    Click Upload Usage
    Click Upload Usage

  4. If an empty usage report notification is shown when Upload Usage Data is selected, navigate away from the app by going to your phone’s Home screen and re-entering the app. Then try uploading the usage report again. Placing the app in the background will complete or end the current usage session. Partial sessions can not be uploaded.

    Empty Usage Report Upload Attempt
    Empty Usage Report Upload Attempt

    If Upload Usage Data was successful, then a Toast message should pop up informing you that the usage information has been uploaded to the server.

    Successful Usage Upload
    Successful Usage Upload

Step 2 Examine uploaded usage data
+
Step 3 Add further usage instrumentation
+
Step 4 Auto-upload of usage data
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 4
1. Manual upload of usage data 2. Examine uploaded usage data 3. Add further usage instrumentation 4. Auto-upload of usage data

Learn more →