Hiding status bar in Ionic View


#1

I read elsewhere that Ionic View does indeed support the StatusBar plugin, but I cannot seem to get it to hide (or do anything else, for that matter). I am calling StatusBar.hide(); in my app.js file and have included the StatusBar plugin; everything else is the same as the blank Ionic project template. Any ideas? Am I missing something, or is this not supposed to work?


#2

Does anyone have any insight into this? No change with the latest update of Ionic View…


#3

The best way to use the StatusBar is by using the ngCordova wrapper:
http://ngcordova.com/docs/plugins/statusbar/

First add the plugin to your project with

cordova plugin add org.apache.cordova.statusbar

And then use the snippet in the docs.


#4

Thanks, but this isn’t my issue. This code works if I build my app and view it on a device, but it does not work in Ionic View.


#5

Oh sorry, I didn’t realize you were talking about Ionic View, the app viewer, I was thinking about an “ionic view” :slight_smile:

According to this it should work out of the box:

View uses the Cordova inAppBrowser plugin to launch your apps in their own separate WebView, so you can preview and test them. Normally, inAppBrowser only displays web content, but we might have hacked it a little to give apps access to the Cordova API and plugins. Ionic apps are hybrid apps for a reason, and a preview is not the same without plugin support! At the moment, plugin access is restricted to a specific subset of plugins, including GeoLocation, Keyboard, StatusBar, and BarcodeScanner

http://ionicframework.com/blog/view-app-is-alive/

Can you share your code?


#6

I can use the Ionic Weather sample as an example (https://github.com/driftyco/ionic-weather). If I build this and emulate it in the iOS Simulator, the status bar is hidden. When I upload it and try to view it using Ionic View, the status bar is still present. Any ideas? It seems like the Status Bar plugin just isn’t working with Ionic View, but I haven’t seen any other complaints about this.


#7

If that’s the case I guess it means the StatusBar plugin is in fact broken for Ionic View. I would report it here:
https://github.com/driftyco/ionic-view-issues/issues


#8

I may be late in this discussion, but Status bar wouldn’t be hiding in Ionic View. The View app is just a web browser packaged by Ionic. Internally, it doesn’t use cordova, hence any CORDOVA or native changes will not reflect in Ionic View.

This can be backed by the fact, when we do ionic upload it just creates a zip file of www folder and uploads it. Hence, the Ionic app never has details of corodva plugins that your app uses. It is just a browser which renders index.html. So, it shows what your mozilla browser shows just in different mobiles.


#9

Hello!

I’m new to this discussion but I have the same problem.

So what you’re saying is that even though the Status Bar shows up in the app in Ionic View (and in my case pushes the logo of the app down), if I release/build the app the Status Bar should be gone in the app?

Using the Status Bar plugin of course.