This question is similar to this one , however I tried everything and still cannot get the cordova-plugin-statusbar to work.
I am using PhoneGap Build to create a PhoneGap / Cordova application. In config.xmlI have a plugin included like this:
<gap:plugin name="cordova-plugin-statusbar" source="npm" />
And then I have JavaScript to set the color of the status bar:
document.addEventListener('deviceready', SetStatusBarColor, false);
function SetStatusBarColor() {
if (StatusBar) {
StatusBar.backgroundColorByHexString('#4CAF50');
}
}
However, no matter what I do, I can not get the status bar to change the color of the phone. PhoneGap uses Cordova version 5.2.0, and my phone has Android 5.1.1.
source
share