androidxamarin.formssamsung-knox

Xamarin.forms Enable Status Bar after activiating Kiosk Mode in knox standard sdk 5.7


forms Android app which uses the Knox Standard SDK v.5.7.

When entering into Kiosk mode, the status bar gets hidden, however I need to keep the status bar visible.

I have seen similar questions but none with a concrete answer that work. The problem is basically the same as being described here: https://seap.samsung.com/forum-topic/unable-enable-status-bar-after-activiated-kiosk-mode

KnoxKioskMode = KnoxKioskMode ?? KnoxKioskMode.GetInstance(context);
var knoxKioskSettings = new KioskSetting
{
    SystemBar = true,
    HomeKey = false,
    StatusBarExpansion = false,
    StatusBar = true,
    NavigationBar = false,
    MultiWindow = false,
    SettingsChanges = true,
    WipeRecentTasks = false,
    AirView = false,
    SmartClip = false,
    AirCommand = false,
    BlockedEdgeFunctions = KnoxKioskMode.EdgeFunctionAll
};

KnoxKioskMode.EnableKioskMode(knoxKioskSettings);
KnoxKioskMode.AllowHardwareKeys(DisabledKeys, false);

// This does not work as the system bar is still hidden.
KnoxKioskMode.HideSystemBar(false);
KnoxKioskMode.HideStatusBar(false);

Any ideas how I can show the system bar using the Knox sdk?


Solution

  • I have had a similar issue:

    I found moving the flags:

    KioskConfig.HideSystemBar(false);
    KioskConfig.HideStatusBar(false);
    

    before:

    KioskConfig.EnableKioskMode(KioskSettings);
    

    solved this issue. The flags are false by default though, so it this is the first time you enable them there is no need to mark them false but its its a reset then yeah move them above.