Ionic2.RC0 and Ionic2.RC1: Plugin StatusBar not working in Android with crosswalk

Hi,

I migrated from beta11 to RC0 and now RC1, added crosswalk and I do not have the same behavior with “StatusBar”.

StatusBar appears blue with white text, whereas with the beta 11 was white text on black background.
When splashscreen is show, statusbar is black with white text (so it’s ok).

I use the following line (as before):

     this.platform.ready (). then (() => {
         // Okay, so the platform is ready and our plugins are available.
         // Here you can do Any native Higher level things you might need.
         StatusBar.styleDefault ();

Someone has the same problem or a solution to change color of statusbar with android?

Edit: Same result with StatusBar.styleDefault() or without.

  • I reinstalled the plugins without success. => KO
  • I removed/added Android Platform => KO
  • With a blank project “ionic start mySideMenu sidemenu --v2” without crosswalk=> StatusBar works as expected
  • with starter project:
    i add crosswalk: “ionic plugin add cordova-plugin-crosswalk-webview --save”
    ionic android run => KO, status bar is blue
  • resinstalled Java, JDK, SDK => KO
  • test with crosswalk API 21 Beta or API 20 or API 17 => KO
  • tested with Ionic2.RC1 => KO
  • tested with Ionic2.RC2 => KO

… looking forward

Issue opened by reedrichards:

1 Like

I have the same problem, StatusBar is blue in Android.

i removed crosswalk and then statusbar works as expected.

At this time, I don’t know how to use statusbar with crosswalk.

1 Like

someone has a project that does it work? Statubar + Crosswalk

with starter project:

  • i add crosswalk: “ionic plugin add cordova-plugin-crosswalk-webview --save”
  • ionic android run

=> KO, status bar is blue

1 Like

Getting this issue as well.

if someone have a project with Ionic2.RC0, Crosswalk and StatusBar working, please let me know, it will be a clue.

I don’t know if it’s an issue related to Ionic (build process?), CrossWalk or plugin.

Switching from last Beta to RC.0 I noticed the same change with Xwalk when I was running my app on my real device Nexus 5X

To fix it and apply the color I want I do the following:

initializeApp() {
this.platform.ready().then(() => {
  StatusBar.styleDefault();

  let isAndroid:boolean = this.platform.is('android');
  if (isAndroid) {
      StatusBar.backgroundColorByHexString("#000000");
  }
 });
}

Observations: This seems to work fine most of the time. However I noticed sometimes when the app is put in idle in a specific way (like using hardware home button) and opened again, then this color may be not applied again. I’ve not yet invest time to analyze it.

This doesn’t work at all for me, the bar stays light blue with white text on normal start on a Nexus 5X as well.

1 Like

Sorry to hear that. I just did and deployed a new apk and that still works for me, my status bar bg is black.

Update: But I’m agree, when I click the hardware tab and when the app goes reduced in the background, then the bar is blue too

My app has a different behavior, status bar is still blue.

StatusBar.backgroundColorByHexString does not seem to apply

sorry to hear that guys…

Same problem… Any luck with a workaround ?

Same issue here. =/
After upgrading to RC0/RC1 the status bar became blue on android.

Same issue here, after upgrading to RC1 bar appears blue…

This worked for me…

setTimeout(() => {
if (platform.is(‘android’)) {
StatusBar.backgroundColorByHexString("#A44F0F");
}
}, 1000);

EDIT : When the app goes reduced in the background, the bar still blue…

Same here. I presume if you use crosswalk without ionic it works.

Guyz, I just opened an issue in the cordova status bar tracking tool. Let’s see what happens.

https://issues.apache.org/jira/browse/CB-12094

2 Likes

Someone have tested with Ionic RC2?

For me, still same blue with RC.2

Got the same problem. Got the backgroundColorByHexString function working by setting a 1 second timeout but the blue color still appears once you open the app switcher.