How to change StatusBar color in ionic 2

There seems to be a problem on Ionic 2 . It doesn’t seem to be possible to change the StatusBar color, in some custom ROM like MIUI , the statusbar¬†always appears black with white text. How to force ionic to change statusbar color?

Here the answer from my brother, tommy pradana

constructor(public platform: Platform) {
        if ('android') ) {
            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.

or you could use this code below

if (cordova.platformId == 'android') {

And dang…. it will force statusbar color to change based on your code. So, let’s coding again

Leave a Reply

Your email address will not be published. Required fields are marked *