# Black Status Bar with Ionic Cordova Run

**URL:** <https://forum.ionicframework.com/t/black-status-bar-with-ionic-cordova-run/118869>\
**Category:** ionic-v3\
**Created:** [January 20, 2018, 4:58pm UTC](https://forum.ionicframework.com/t/black-status-bar-with-ionic-cordova-run/118869 "2018-01-20T16:58:10Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![DevinShoe](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/devinshoe/32/110748_2.png) [@DevinShoe](https://forum.ionicframework.com/u/DevinShoe)\
**Post date:** [January 20, 2018, 4:58pm UTC](https://forum.ionicframework.com/t/black-status-bar-with-ionic-cordova-run/118869/1 "2018-01-20T16:58:10Z")

</div>

The status bar is completely black (showing no notifications, no time, no WiFi indicators, etc.) whenever I deploy my Ionic application to my Android device. The command I’m using is `ionic cordova run android --device`. If I use `--livereload` the status bar appears like normal, but I can’t use the app then unless I am plugged into my computer. I have all of my ionic and cordova dependencies updated globally and in my project, and this appears to happen in the first couple commits of my project so I don’t think I did anything to change this behavior. Does anyone know why this is happening, or is this expected behavior?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [January 20, 2018, 5:31pm UTC](https://forum.ionicframework.com/t/black-status-bar-with-ionic-cordova-run/118869/2 "2018-01-20T17:31:45Z")

</div>

Do you get the same behaviour with a new project started with `ionic start`?  
What is your `ionic info` output?

---

<div class="post-metadata">

**Author:** ![DevinShoe](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/devinshoe/32/110748_2.png) [@DevinShoe](https://forum.ionicframework.com/u/DevinShoe)\
**Post date:** [January 20, 2018, 5:50pm UTC](https://forum.ionicframework.com/t/black-status-bar-with-ionic-cordova-run/118869/3 "2018-01-20T17:50:30Z")

</div>

I created a new project and it seems like the status bar works fine on there. Here’s the `ionic info` output for the project I’m having issues with.

```auto
cli packages: (/home/devin/code/ionic/CryptoProfitLog/node_modules)

    @ionic/cli-utils : 1.19.1
    ionic (Ionic CLI) : 3.19.1

global packages:

    cordova (Cordova CLI) : 8.0.0 

local packages:

    @ionic/app-scripts : 3.1.5
    Cordova Platforms : android 7.0.0
    Ionic Framework : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    Node : v6.12.3
    npm : 5.6.0 
    OS : Linux 4.13

Environment Variables:

    ANDROID_HOME : /home/devin/Android/Sdk

Misc:

    backend : pro

```

One thing that I noticed that was interesting was that path the the CLI packages went to the projects `node_modules` directory, while the new project I started goes to `/usr/lib/node_modules`.

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [January 20, 2018, 6:02pm UTC](https://forum.ionicframework.com/t/black-status-bar-with-ionic-cordova-run/118869/4 "2018-01-20T18:02:34Z")

</div>

Compare the `package.json` file of the two projects.

---

<div class="post-metadata">

**Author:** ![DevinShoe](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/devinshoe/32/110748_2.png) [@DevinShoe](https://forum.ionicframework.com/u/DevinShoe)\
**Post date:** [January 20, 2018, 6:18pm UTC](https://forum.ionicframework.com/t/black-status-bar-with-ionic-cordova-run/118869/5 "2018-01-20T18:18:41Z")

</div>

By removing the `ionic` `devDependency` from my `package.json` I was able to get the CLI packages to point at `/usr/lib/node_nodules` but that doesn’t seem to have fixed my issue. I don’t really see a difference in my `package.json` at all to be honest.

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [January 20, 2018, 6:28pm UTC](https://forum.ionicframework.com/t/black-status-bar-with-ionic-cordova-run/118869/6 "2018-01-20T18:28:04Z")

</div>

Then this is not the culprit - tbh it would have surprised me.  
Now check the code - or copy over your content over to the new app and see if this breaks things there as well. If yes, do it step by step until you find the trigger.

---

<div class="post-metadata">

**Author:** ![DevinShoe](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/devinshoe/32/110748_2.png) [@DevinShoe](https://forum.ionicframework.com/u/DevinShoe)\
**Post date:** [January 20, 2018, 7:39pm UTC](https://forum.ionicframework.com/t/black-status-bar-with-ionic-cordova-run/118869/7 "2018-01-20T19:39:40Z")

</div>

I finally figured out what it was. I had to delete `cordova-plugin-statusbar` from my `config.xml` and `package.json` and also delete all generated files. Now everything seems to be working fine though.

---

<div class="post-metadata">

**Author:** ![sisdev](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sisdev/32/124208_2.png) [@sisdev](https://forum.ionicframework.com/u/sisdev)\
**Post date:** [February 4, 2019, 4:00pm UTC](https://forum.ionicframework.com/t/black-status-bar-with-ionic-cordova-run/118869/8 "2019-02-04T16:00:29Z")

</div>

for me worked this one on ionic 4  
Just write “this.statusBar.styleBlackTranslucent();” instead of “this.statusBar.styleDefault();”  
in app.component.ts

cheers

---

<div class="post-metadata">

**Author:** ![hrbolouri](https://avatars.discourse-cdn.com/v4/letter/h/d78d45/32.png) [@hrbolouri](https://forum.ionicframework.com/u/hrbolouri)\
**Post date:** [January 4, 2020, 9:39am UTC](https://forum.ionicframework.com/t/black-status-bar-with-ionic-cordova-run/118869/9 "2020-01-04T09:39:17Z")

</div>

According to the cordova doc:  
[https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-statusbar/](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-statusbar/)

```auto
StatusBar.styleLightContent();

```

Should be the solution.

---

<div class="post-metadata">

**Author:** ![victor-nunesm](https://avatars.discourse-cdn.com/v4/letter/v/13edae/32.png) [@victor-nunesm](https://forum.ionicframework.com/u/victor-nunesm)\
**Post date:** [October 12, 2020, 9:09pm UTC](https://forum.ionicframework.com/t/black-status-bar-with-ionic-cordova-run/118869/10 "2020-10-12T21:09:46Z")

</div>

Thank you @hrbolouri, it worked for me. I’m using Ionic 5 and Angular 10.

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 8:54pm UTC](https://forum.ionicframework.com/t/black-status-bar-with-ionic-cordova-run/118869/11 "2021-07-19T20:54:00Z")

</div>

Closed on July 19, 2021, 8:54pm UTC


