FabriBertani / Plugin.Maui.ScreenSecurity

Safeguard your .NET MAUI app effortlessly by preventing content exposure, screenshots, and recordings with ease.
MIT License
140 stars 11 forks source link

Keyboard is still appearing during recording #37

Open CalbinKing opened 1 month ago

CalbinKing commented 1 month ago

I'm using 1.1.7-bete Both iOS and Android still show the keyboard during recording

        /// <summary>
        ///     When overridden, allows application developers to customize behavior immediately prior to the
        ///     <see cref="Page" /> becoming visible.
        /// </summary>
        protected override void OnAppearing()
        {
            ScreenSecurity.Default.ActivateScreenSecurityProtection();
            base.OnAppearing();      
        }

        /// <summary>
        ///     When overridden, allows the application developer to customize behavior as the <see cref="Page" />
        ///     disappears.
        /// </summary>
        protected override void OnDisappearing()
        {
            ScreenSecurity.Default.DeactivateScreenSecurityProtection();
            base.OnDisappearing();
        }

20240805_085254000_iOS. ![20240805_085305000_iOS](https://github.c Screenshot_20240805_150311_com huawei himovie overseas om/user-attachments/assets/1f5873d8-53d3-4e9c-b8a1-dc71244b60df) Screenshot_20240805_150234_com huawei himovie overseas

FabriBertani commented 2 weeks ago

Hi @CalbinKing , hope you're doing well.

Unfortunately, this is impossible to archive because the keyboard and other stuff are OS related and we cannot control them. The only way to hide the keyboard from recording and screenshots is by setting IsPassword property of an Entry control to true, Apple designed it to be this way.

Best I can do is create an EventHandler only for iOS, that is triggered when recording starts/ends and you can see how to handle the situation.

Let me know if that will work for you.