ARTICLE AD BOX
I am developing a React Native application for a telecommunications company. The app allows users to purchase Samsung devices in installments. If a user fails to make a payment, the device is locked via Samsung Knox.
The Knox lock screen provides two buttons: one to call customer service and another to open our app over the lock screen, so the user can pay the bill. Currently, the "Open App" button is not working—when pressed, nothing happens.
I have modified the AndroidManifest.xml as follows:
<activity android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:exported="true" android:showWhenLocked="true" android:inheritShowWhenLocked="true" android:excludeFromRecents="true" android:turnScreenOn="true">Specifically, I added these properties to ensure the app can bypass the lock screen:
android:showWhenLocked="true" android:inheritShowWhenLocked="true" android:excludeFromRecents="true" android:turnScreenOn="true"Additionally, in MainActivity.java, I added the following logic inside the onCreate() method:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1) { setShowWhenLocked(true); setTurnScreenOn(true); KeyguardManager keyguardManager = (KeyguardManager)getSystemService(Context.KEYGUARD_SERVICE); if (keyguardManager != null) { keyguardManager.requestDismissKeyguard(this, null); } }This functionality is intended for modern devices (Android 15, 16, and above).
Testing results:
Emulator: When I launch the app on an emulator with the lock screen active, the app displays correctly over the lock screen.
Physical Samsung Device (Knox): When trying to trigger the app via the "Open App" button provided by the Samsung Knox interface, it fails to open.
Does anyone know why the app works over the standard lock screen but fails to be invoked by the Samsung Knox "Open App" trigger? Are there specific Intent Filters or Knox-specific permissions required for this interaction?
