- 18 Oct 2024
- 1 Minute to read
- DarkLight
App Shielding screen mirroring
- Updated on 18 Oct 2024
- 1 Minute to read
- DarkLight
When App Shielding detects screen mirroring, it can display a customized layout on the second screen. This customized layout can help the customer to understand that the application blocks screen mirroring due to security requirements.
To integrate App Shielding customized layout in your application (Android):
Ensure that Check screen mirroring and Block screen mirroring is enabled in the configuration.
For more information about configuring the App Shielding behavior after performing a security check, see OneSpan Customer Portal.
Add the shield_screen_mirroring_android.aar library as a dependency to your application. For more information about how to add the dependency see Import App Shielding libraries in Android Studio.
Add a layout that will be displayed as a replacement during screen mirroring. The layout file should be located in the resource folder, for example: res/layout/layout_screen_mirroring_replacement.xml.
Create a class that extends the android.app.Application class, for example MyApplication. Then, add the annotation no.promon.shield.ui.ScreenMirroringLayoutName to it, as follows:
@ScreenMirroringLayoutName("layout_screen_mirroring_replacement") public class MyApplication extends Application { ... }
Register your application class in AndroidManifest.xml.
You should always register your application class in AndroidManifest.xml even it does not contain any code except the ScreenMirroringLayoutName annotation.
You can see an example implementation of App Shielding Screen Mirroring in the sample that is provided with the package.
Enable additional display names
App Shielding also allows you to add trusted displays by adding one or several additional display names in the corresponding input field, Additional Display Name, on the OneSpan Customer Portal Configuration page or in the OneSpan Mobile Portal. This serves to avoid false positive screen mirroring or screen sharing detection.