[DRAFT]
To remove the status bar in iOS 7 use the following entries in the plist file.
<key>UIStatusBarHidden</key>
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
In the configuration on XCode the following achieves the same
set
Status bar is initially hidden = YES
add row: View controller-based status bar appearance = NO
Edit .plist file for the iOS build by adding:
UIStatusBarHidden = true
UIViewControllerBasedStatusBarAppearance = false
First, we need to note this only works on Cordova (recommend v3.3.1) or another native UIWebViewwrapper. If we use Cordova, we will need to install one plugin:
$ cordova plugin add org.apache.cordova.statusbar
Then, we will use Ionic’s Platform service to listen for the device ready event and remove the status bar:
angular.module(‘myApp’, [‘ionic’])
.controller(‘MyCtrl’, function($scope, Platform) {
Platform.ready(function() {
// hide the status bar using the StatusBar plugin
StatusBar.hide();
});
});
My app.js
if (window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
cordova.plugins.Keyboard.disableScroll(true);
}
if (window.StatusBar) {
// org.apache.cordova.statusbar required
StatusBar.hide();
StatusBar.styleDefault();
}
For API level 19:
In addition to setting the fullscreen flag, I also had to add the following to hide the soft keys:
View decorView = getWindow().getDecorView();
// Hide both the navigation bar and the status bar.
// SYSTEM_UI_FLAG_FULLSCREEN is only available on Android 4.1 and higher, but as
// a general rule, you should design your app to hide the status bar whenever you
// hide the navigation bar.
int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
https://developer.android.com/training/system-ui/navigation.html
You can also set the sticky immersion as described here:https://developer.android.com/training/system-ui/immersive.html
This is how I do it – hides the title and makes it full screen:
// requesting to turn the title OFF
requestWindowFeature(Window.FEATURE_NO_TITLE);
// making it full screen
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
I also have this in my AndroidManifest under Application:
android:theme=“@android:style/Theme.NoTitleBar.Fullscreen”
References
http://ionicframework.com/tutorials/fullscreen-apps/
https://forum.ionicframework.com/t/status-bar-not-hidden-in-spash-screen-in-android/38976