Skip to content

Print Data and Opening URLs Restriction

The SAP BTP SDK for Android has introduced print data and opening URLs restrictions. The print data restriction blocks the printing of data. This secures sensitive data from being compromised.

The URL opening restriction prevents URLs from opening in external browsers or other applications. It also protects your data from potential malware and other threats.

Enable Policy

Admin can enable these two policies by enabling Restrict Print Data and Restrict Opening URLs in the Client Configuration tab under the Mobile Settings Exchange feature in mobile services cockpit.

Add AppManagementService

An app developer can leverage these two features by adding the AppManagementService instance to the SDKInitializer.start method.

val services = mutableListOf<MobileService>()
services.add(AppManagementService())
SDKInitializer.start(this, * services.toTypedArray())

AppManagementService will check the two policies configured in mobile services cockpit. If Restrict Print Data and Restrict Opening URLs are not enabled, adding AppManagementService will not have any effect in the client app.

Note

Client apps can still open mobile services onboarding or logout URLs in external browsers when the OAuth authentication option is set to CCT in flows.

If you want to bypass the opening URLs restriction, you can set the ALLOW_OPEN_URL extra property to true in the request intent. The URL then opens in an external browser or another application.

import com.sap.cloud.mobile.foundation.common.ALLOW_OPEN_URL

val intent = Intent(Intent.ACTION_VIEW, Uri.parse("http://www.sap.com")).apply {
    putExtra(ALLOW_OPEN_URL, true)
}
startActivity(intent)

Last update: April 30, 2026