Skip to content

Crash Report

The crash report makes it easy for apps to automatically gather uncaught exceptions and upload them to mobile services for further analysis.

When a crash happens unexpectedly, the stack trace is saved, along with device and app information, to device storage before the app terminates. The next time the user launches the app, the crash information is collected and the crash report is sent to mobile services when the network is connected.

User consent is required in order to send out the crash report, since it may contain sensitive user information.

The CrashService class is core for accomplishing this functionality. Client code need to add CrashService instance to SDKInitializer.start method for crash report.

After adding the CrashService instance, client code does not need any additional configuration. Capturing and sending the crash report will be performed automatically.

boolean isOnlineOData = true;
CrashService crashService = new CrashService(isOnlineOData);
SDKInitializer.INSTANCE.start(this, new MobileService[]{crashService}, null);
val isOnlineOData = true
val crashService = CrashService(isOnlineOData)
SDKInitializer.start(this, crashService)

The information sent in the crash report includes:

  • Stack trace and Thread pool
  • Application id and version
  • Build and SDK version
  • Android version
  • Device id and model name
  • Device locale and screen size
  • Timestamp of the crash
  • Network connectivity

Crash reports can be viewed using the SAP mobile service cockpit.


Last update: November 30, 2023