How to show the Windows 10 system status bar on mobile when writing the app in JavaScript? The Windows.UI.ViewManagement.StatusBar
class is not available on Mobile, or so says Visual Studio 2017.
You need to add the references to the UWP Mobile Extension, because the status bar only exists on Mobile.
Go to Project > Add References.
Check "Windows Mobile Extension for the UWP" and press "OK".
WARNING: You need to check if the API is present because the app can crash if it is not. Like this:
if (Windows.Foundation.Metadata.ApiInformation.isTypePresent("Windows.UI.ViewManagement.StatusBar")) {
let statusbar = Windows.UI.ViewManagement.StatusBar.getForCurrentView();
statusbar.showAsync();
}