Skip to Content
0
Jan 25, 2023 at 02:15 PM

Disable FLAG_SECURE during Android BTP SDK Authentication

437 Views

Hi,

we are currently developing a native app with BTP SDK 4.0.1 for Android and we are using OAuth to authenticate against Mobile Services on BTP.

The app is also used on a device farm, which means the content of the screen of the actual device is streamed to the user. Unfortunately the authentication views coming from the BTP SDK are black only and therefore unusable for the user - whereas the view is perfectly visible when testing on an actual device.

I found out, that Android prevents screen sharing for devices running Android 12 or newer for screens that are "protected". After decompiling the foundation.aar I found that the flag used for that behaviour (FLAG_SECURE) is for example used in the WebViewActivity.

Is there any way to make the screens that the SDK uses for authentication not "protected", so Android will allow screen sharing?