# Problem with status bar color

**URL:** <https://forum.ionicframework.com/t/problem-with-status-bar-color/19375>\
**Category:** cordova\
**Created:** [March 19, 2015, 2:03pm UTC](https://forum.ionicframework.com/t/problem-with-status-bar-color/19375 "2015-03-19T14:03:29Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![tpalmer75](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/tpalmer75/32/90478_2.png) [@tpalmer75](https://forum.ionicframework.com/u/tpalmer75)\
**Post date:** [July 1, 2015, 6:57pm UTC](https://forum.ionicframework.com/t/problem-with-status-bar-color/19375/21 "2015-07-01T18:57:01Z")

</div>

Can this be done within the Ionic View app?

I’ve installed the plugin from the repo, linked to the script in the HTML, added the library to my module, and included the function as its listed above.

I haven’t learned how to create real Android emulations, so I’m working within the Ionic View app, but the Status Bar isn’t updating. Is it simply because I’m inside the app?

---

<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 1, 2015, 7:10pm UTC](https://forum.ionicframework.com/t/problem-with-status-bar-color/19375/22 "2015-07-01T19:10:22Z")

</div>

This is not possible inside of view.

> **[Ionic Services Docs](http://legacy-cloud-docs.ionic.io)**
>
> Documentation for the Ionic Services Service: Push, Users, Package, and Deploy

---

<div class="post-metadata">

**Author:** ![hassan29](https://avatars.discourse-cdn.com/v4/letter/h/8edcca/32.png) [@hassan29](https://forum.ionicframework.com/u/hassan29)\
**Post date:** [November 1, 2015, 5:26am UTC](https://forum.ionicframework.com/t/problem-with-status-bar-color/19375/23 "2015-11-01T05:26:04Z")

</div>

Did anything come of this. What was the final solution. I am having the same problem with ios.

---

<div class="post-metadata">

**Author:** ![vinimendes3](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/vinimendes3/32/94949_2.png) [@vinimendes3](https://forum.ionicframework.com/u/vinimendes3)\
**Post date:** [December 20, 2015, 5:10am UTC](https://forum.ionicframework.com/t/problem-with-status-bar-color/19375/24 "2015-12-20T05:10:53Z")

</div>

I’ve tried with StatusBar directly from native cordova, and later I’ve tried with $cordovaStatusbar plugin.  
Both cases I tested on my device (LG G3 - Android 5.0) and it’s NOT WORK =(.  
I tested on simulator (Genymotion) in versions above 5.0, and it’s work.  
Is this normal? In some devices, can it not work in specific devices?

---

<div class="post-metadata">

**Author:** ![vigets](https://avatars.discourse-cdn.com/v4/letter/v/9fc29f/32.png) [@vigets](https://forum.ionicframework.com/u/vigets)\
**Post date:** [March 25, 2016, 9:09am UTC](https://forum.ionicframework.com/t/problem-with-status-bar-color/19375/25 "2016-03-25T09:09:44Z")

</div>

I have same error with cordova 5+ and android 5.1.1 on LG Magna, here is my code

if (StatusBar) {  
// org.apache.cordova.statusbar required  
if (cordova.platformId == ‘android’) {  
StatusBar.overlaysWebView(false);  
StatusBar.backgroundColorByHexString("#fff");  
}  
[//StatusBar.styleDefault](https://StatusBar.styleDefault)();  
}

i’he tried to run this commands in google chrome://inspect/#devices but has no effect, and always i receive an “undefined” after execute this commands, a little help please?

---

<div class="post-metadata">

**Author:** ![montychawda](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@montychawda](https://forum.ionicframework.com/u/montychawda)\
**Post date:** [May 14, 2016, 10:12am UTC](https://forum.ionicframework.com/t/problem-with-status-bar-color/19375/26 "2016-05-14T10:12:13Z")

</div>

hi  
i tried to change status bar color also use same way but not work.  
but now i change in  
project dir-\>plugins\>cordova-plugin-splashscreen-\>src-\>android-\>SplashScreen.java

change inside this  
setStatusBarBackgroundColor(preferences.getString(“StatusBarBackgroundColor”, “#000000”));

to

setStatusBarBackgroundColor(preferences.getString(“StatusBarBackgroundColor”, “#04ADC0”));//your color hexstring here

then remove android platform  
and  
add android platform again

its works!..

---

<div class="post-metadata">

**Author:** ![ladmerc](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/ladmerc/32/99220_2.png) [@ladmerc](https://forum.ionicframework.com/u/ladmerc)\
**Post date:** [June 18, 2016, 6:40am UTC](https://forum.ionicframework.com/t/problem-with-status-bar-color/19375/27 "2016-06-18T06:40:35Z")

</div>

I doubt this would be the preferred solution. You’re overriding the default in the plugin, and setting it explicitly to your chosen color. I’ll advise upgrading to the latest version of the plugin

---

<div class="post-metadata">

**Author:** ![Vigneshdr](https://avatars.discourse-cdn.com/v4/letter/v/7ab992/32.png) [@Vigneshdr](https://forum.ionicframework.com/u/Vigneshdr)\
**Post date:** [October 25, 2016, 5:37am UTC](https://forum.ionicframework.com/t/problem-with-status-bar-color/19375/28 "2016-10-25T05:37:14Z")

</div>

Hi @mhartington

I want to change the status bar color in Android 4 version.  
By default it shows black color.

Any solution for this?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Love9056](https://avatars.discourse-cdn.com/v4/letter/l/7c8e57/32.png) [@Love9056](https://forum.ionicframework.com/u/Love9056)\
**Post date:** [December 2, 2016, 9:26am UTC](https://forum.ionicframework.com/t/problem-with-status-bar-color/19375/29 "2016-12-02T09:26:46Z")

</div>

nope really didn’t work at all

---

<div class="post-metadata">

**Author:** ![sajith](https://avatars.discourse-cdn.com/v4/letter/s/d2c977/32.png) [@sajith](https://forum.ionicframework.com/u/sajith)\
**Post date:** [March 20, 2017, 6:04am UTC](https://forum.ionicframework.com/t/problem-with-status-bar-color/19375/30 "2017-03-20T06:04:40Z")

</div>

plugin –  
org.apache.cordova.statusbar= [https://github.com/apache/cordova-plugin-statusbar.git](https://github.com/apache/cordova-plugin-statusbar.git)

and inside config method add  
if (window.StatusBar) {

```
                if (ionic.Platform.isAndroid()) {
                    StatusBar.backgroundColorByHexString("#3f723b");
                } else {
                    StatusBar.styleLightContent();
                }
            }
```

---

<div class="post-metadata">

**Author:** ![Samiru](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@Samiru](https://forum.ionicframework.com/u/Samiru)\
**Post date:** [March 30, 2017, 12:15pm UTC](https://forum.ionicframework.com/t/problem-with-status-bar-color/19375/31 "2017-03-30T12:15:38Z")

</div>

Hi ,

I am also facing same issue I am unable to set background color, can someone please help me ?  
here is my code

initializeApp() {  
this.platform.ready().then(() =\> {  
// Okay, so the platform is ready and our plugins are available.  
// Here you can do any higher level native things you might need.  
[//StatusBar.styleDefault](https://StatusBar.styleDefault)();  
[//StatusBar.overlaysWebView](https://StatusBar.overlaysWebView)(true);  
StatusBar.backgroundColorByName(“red”);  
Splashscreen.hide();  
this.getUsers();  
});  
}

Note : I have tried install and uninstall of StatusBar plugin but did’t work

Thanks  
Samiran

[Previous page](https://forum.ionicframework.com/t/problem-with-status-bar-color/19375.md?page=1)
