Git Product home page Git Product logo

cordova-plugin-statusbar's People

Contributors

agrieve avatar alsorokin avatar breautek avatar clelland avatar cmarcelk avatar csantanapr avatar dblotsky avatar eddyverbruggen avatar erisu avatar filmaj avatar infil00p avatar janpio avatar jcesarmobile avatar johnyellow avatar jsoref avatar kant2002 avatar ldeluca avatar macdonst avatar menardi avatar myster-t avatar pelish8 avatar purplecabbage avatar shazron avatar stacic avatar stevengill avatar t1st3 avatar timbru31 avatar travisdahl avatar twomz avatar vladimir-kotikov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-plugin-statusbar's Issues

Not working at all on IOS

Hi,

I'm using Cordova CLI 7.1.0 and this plugin is not working on IOS at all. Not when I'm trying to set values via config.xml or ondeviceready.
When I do console.log to the StatusBar object it's present, But the methods has no effect what so ever.
Tested on Iphone 5s, 6, 6 plus, 8 plus.

Please advise.

Status bar text color not changing in android ?

The status bar text color is not changing in android. My Code is
statusbar: {
iosOverlaysWebView: true,
androidTextColor: "#f0f",
enabled: true,
androidBackgroundColor: "#ff0",
androidOverlaysWebView: true,
},

Flag to know if the statusbar overlay was successful

Feature Request

I'd like a flag to know if the statusbar overlay was successful so I can apply different styles if I have something absolutely positioned at the top.

When the overlay is successful, the app has a 100% height relative to the phone screen, so I have to account for a top padding. When the overlay is not successful, I'm left with an empty space at the top. I'd like to know when this operation has success so I can apply styles accordingly.

(Everything else in the template is not relevant)

Convert to eslint

This plugin is still using jshint instead of eslint as all the other Cordova plugins.

iPhone XS when app is changed from portrait view to landscape view and then back to portrait view the status menu appears on top of the application menu

Bug Report

Problem

img5

What is expected to happen?

The menu bar appears below the status

What does actually happen?

menu and status bars are one top of each other. User cannot use the menu once phone has been changed from Portrait to Landscape and then back to Portrait

Information

Command or Code

Environment, Platform, Device

Apcahe cordova
Ionic

Version information

  • [X ] I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • [ X] I included all the necessary information above

StatusBar overlays WebView after using Cordova Camera plugin in iOS 13

Bug Report

Problem

The StatusBar overlays the WebView on iOS 13 after using the camera plugin (cordova-plugin-camera), even if "StatusBarOverlaysWebView" is set to false.

What is expected to happen?

The StatusBar should not overlay the WebView when returning from the camera.

What does actually happen?

The StatusBar overlays the WebView when returning from the camera.

Information

Launch the app and the StatusBar should behave as expected (does not overlay the WebView). Now launch the camera via the cordova plugin, take a picture (or cancel out), and on returning to the app, the StatusBar is now overlaying the WebView. To correct it you can change the device orientation, which seems to reset the StatusBar / WebView.

Command or Code

Please see the following GitHub repository:

https://github.com/ISeeBinary/StatusBarTestApp

When running the example you will see a red button at the top of the screen that launches the camera. There is also a green button for toggling the StatusBar on and off. This is because calling StatusBar.hide followed by StatusBar.show also seems correct its behaviour.

Environment, Platform, Device

  • iPhone XS (iOS 13.1.3)

Version information

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Bug with light background on Android

Bug Report

Problem

When I use the following commands:
StatusBar.styleLightContent
StatusBar.backgroundColorByName("white")
StatusBar.backgroundColorByHexString("#f7f7f8")
Only the statusbar background changes but the texts/icons keep white too.
I got an image existing on GitHub issues(That is happening with me on Android), but I didn't found the solution
48235716-d17a5680-e373-11e8-9e1d-f955b19b29cb

Version information

cordova-plugin-statusbar 2.4.2
cordova CLI 8.0.0
Moto G5
Android 8.1.0

[Android] overlaysWebView(true) doesn't work as expected when called in deviceready event

Bug Report

Problem

Statusbar doesn't go into overlaymode when using overlaysWebView(true) when called inside the deviceready callback.

What is expected to happen?

The statusbar should go into overlay mode.

What does actually happen?

The statusbar stays in solid.

Information

I've provided a reproduction app available at https://github.com/breautek/statusbar-overlay-issue

I simply call StatusBar.overlaysWebView(true), however the statusbar remains a solid black colour.

If I open up the dev tools, and call StatusBar.overlaysWebView(true) again via the javascript console, it still doesn't work.

In the console, if I do:

StatusBar.overlaysWebView(false);
StatusBar.overlaysWebView(true);

Then the statusbar finally goes into the overlay state.

Additionally, if I comment out the StatusBar.overlaysWebView(true); line in deviceready and launch the app. Then call StatusBar.overlaysWebView(true); in the console, the statusbar does go into overlay mode the first time. Surrounding StatusBar.overlaysWebView(true); also works the first time in deviceready IF I surround the statement in a setTimeout of 1 second.

Occassionally the code in the reproduction app works as expected as is the first time. This suggests there is a race condition at play here.

Original discovery of this bug was found at #155 (comment)

Command or Code

Environment, Platform, Device

Observed on Android 6 & Android 9, cordova-android 8.1.0
Cordova 9

Version information

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

iOS 13 dark mode default text colour is white

Bug Report

On iOS 13, when using dark mode, the default status bar text colour is white, which means that using styleDefault() results in the reverse of the desired text colour being applied, ie white not black text.

Version information


   Ionic CLI                     : 5.2.3 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.7.1
   @angular-devkit/build-angular : 0.802.0
   @angular-devkit/schematics    : 8.2.0
   @angular/cli                  : 8.2.0
   @ionic/angular-toolkit        : 2.0.0

Cordova:

   Cordova CLI       : 9.0.0 ([email protected])
   Cordova Platforms : android 8.0.0, browser 6.0.0, ios 5.0.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 9 other plugins)

Utility:

   cordova-res : 0.3.0 (update available: 0.6.0)
   native-run  : 0.2.8 

System:

   Android SDK Tools : 26.1.1 (/Users/ccampbell/Library/Android/sdk)
   ios-sim           : 8.0.1
   NodeJS            : v12.4.0 (/usr/local/Cellar/node/12.4.0/bin/node)
   npm               : 6.9.2
   OS                : macOS Mojave
   Xcode             : Xcode 10.3 Build version 10G8```



## Checklist
- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above

Incorrect Status Bar Position on iPad Pro 3rd Gen

The status bar appears correclty in the simulator, but when deployed to an actual device it is incorrect.
img_0011

This only happens on the new iPad Pro 12.9 Gen 3 Model.
I also verified the correct behavior on a normal iPad 2018 and an iPhone XS Max without issues.

Plugin not working correctly IOS

I'm using the following config.xml

<plugin name="cordova-plugin-statusbar" />
<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="StatusBarBackgroundColor" value="#000000"/>
<preference name="StatusBarStyle" value="lightcontent" />

The statusbar text is white, thats OK but the statusbar itself is not black (#000000) as defined in the config.xml It is transparent...

Using:

<preference name="phonegap-version" value="cli-8.0.0" />

Device: IOS12 on iPhone6
Phonegap Build

Screenshot: https://i.imgur.com/IQejdi5.png
When the keyboard pop up the content scrolls behind the statusbar content... :/

Documentation of Preferences implies support for iOS only

The documentation of the Preferences implies that only iOS is supported.

Specifically, for the Preferences StatusBarOverlaysWebView, StatusBarBackgroundColor, StatusBarStyle, and StatusBarDefaultScrollToTop, each paragraph begins with the language "On iOS", which implies it may only be supported on iOS. Since this is not the case, I recommend the documentation be updated for clarity.

<input type="file"/> breaks iPhoneX

Place an <input type="file"/> TAG somewhere in your App.

Click on it, then click on "Browse", so that iOS displays the System Browser.
Then you can click on "Cancel" and Boom, when you are back to your App the safe area space for the Virtual HomeBar has disappeared.

I'm using <plugin name="cordova-plugin-splashscreen" spec="^5.0.2" /> (using image sizes for iPhoneX), also using <plugin name="cordova-plugin-statusbar" spec="2.4.2" />.

The combination works perfectly in all circumstances except when calling the System Dialogs (Browse / Photo Library).

[iOS 13] Status Bar Style properties don't work when system dark mode is enabled.

Bug Report

Problem

When system dark mode is enabled in iOS 13, commands such as this.statusBar.styleDefault(), styleBlackOpaque(), etc. doesn't affect the color of the text in the status bar. It begins working again as soon as dark mode is disabled.

What is expected to happen?

Those commands such as styleDefault() should affect the status bar text color regardless of system dark mode being able.

What does actually happen?

The text color doesn't change

Information

Command or Code

This is the code pertaining to the statusbar in app.component.ts:
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)'); prefersDark.addListener((mediaQuery) => this.themeControl(mediaQuery.matches)); this.statusBar.overlaysWebView(true); this.statusBar.show(); this.splashScreen.hide();

This is the code which controls the theme of the app:
constructor(private rendererFactory: RendererFactory2, @Inject(DOCUMENT) private document: Document, private statusBar: StatusBar) { this.renderer = this.rendererFactory.createRenderer(null, null); }

enableDark() { this.renderer.addClass(this.document.body, 'dark') this.statusBar.styleBlackTranslucent(); Keyboard.setKeyboardStyle('dark') }

enableLight() { this.renderer.removeClass(this.document.body, 'dark') this.statusBar.styleDefault(); Keyboard.setKeyboardStyle('light') };

Environment, Platform, Device

Observed on iOS 13.1.2 using ionic-v4 compiled to an IPA file on an iPhone XS

Version information

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Statusbar Color not applied immediately if you have a splash screen

Bug Report

Problem

If you have a splash screen, the status bar color is only applied after the app loads... Not on startup.

Similar report #104

What is expected to happen?

Status bar color should be applied immediately.

What does actually happen?

Status bar color is not applied immediately.

Information

GCj9dpNFfb

Command or Code

npm run android

Environment, Platform, Device

Tested on Android 8.0 & 9.0 (Device & Emulator)

Version information

CLI

Platfrom

  • Android

Plugins

  • cordova-plugin-whitelist
  • cordova-plugin-statusbar
  • cordova-plugin-splashscreen

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Wrong status bar height after input:file "Take Photo" (iOS 13 only)

Bug Report

With StatusBarOverlaysWebView=false, if I choose "Take Photo" from an <input type="file" accept="image/*" />, when the app goes back to the webview (clicking Cancel is enough) the status bar height is set to 0.
After that, the status bar aspect is the same as if it was set to StatusBarOverlaysWebView=true.
In iOS 12 the height is set properly.

Problem

After a photo is taken (or "Cancel" is clicked) cordovaViewWillAppear is invoked (file CDVStatusBar.m), then [self resizeWebView]; is called.
Inside resizeWebView, [UIApplication sharedApplication].statusBarFrame returns a 0x0 CGRect.
Consequently, the height of the status bar is set to 0.

What is expected to happen?

The status bar height should be set to the correct height.

What does actually happen?

The status bar height is set to 0, so the result is the same as StatusBarOverlaysWebView=true.

Information

To fix this problem, I have changed the cordovaViewWillAppear method with the same fix applied to statusBarDidChangeFrame.
I don't know if this has any side effects...

Before

-(void)cordovaViewWillAppear:(NSNotification*)notification
{
    [self resizeWebView];
}

After

-(void)cordovaViewWillAppear:(NSNotification*)notification
{
    //Fix
    //[self resizeWebView];
    //add a small delay ( 0.1 seconds ) or statusbar size will be wrong
    __weak CDVStatusBar* weakSelf = self;
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
        [weakSelf resizeWebView];
    });
    //End fix
}

Command or Code

  • Create an empty cordova project cordova create TestApp com.cordova.testApp TestApp
  • Add iOS platform cordova platform add ios
  • Add cordova-plugin-statusbar cordova plugin add cordova-plugin-statusbar
  • In www/index.html, replace <body> with <body>TEST<input type="file" accept="image/*" />
  • In www/css/index.css remove
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-right, 0px)
  • In config.xml insert:
    <preference name="StatusBarOverlaysWebView" value="false" />
    <preference name="StatusBarBackgroundColor" value="#E4E4E4" />
  • Run cordova prepare
  • From XCode run the app in a physical device (iOS simulator has no camera)
  • Click "Choose File", then "Take Photo", then "OK"
  • Finally click Cancel (or take a photo), now "TEST" is under the status bar

Environment, Platform, Device

iOS 13
Tested on iPad Pro 9.7 and iPhone X.

Version information

Cordova CLI 9.0.0
Cordova iOS platform v5.1.1
cordova-plugin-statusbar v2.4.2

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Fails with cli-8.0.0

Using PhoneGap with cli-8.0.0 it fails:

"plugman-151 install --platform android --project  --plugin cordova-plugin-statusbar --nohooks=.": Fetching plugin "cordova-plugin-statusbar" via npm
Installing "cordova-plugin-statusbar" at "2.4.2" for android
Failed to install 'cordova-plugin-statusbar': Error: ENOENT: no such file or directory, open '/AndroidManifest.xml'
    at Error (native)
    at Object.fs.openSync (fs.js:640:18)
    at Object.fs.readFileSync (fs.js:508:33)
    at Object.parseElementtreeSync (/cordova/node_modules/cordova-common/src/util/xml-helpers.js:180:27)
    at new AndroidManifest (/cordova/lib/AndroidManifest.js:29:20)
    at AndroidProject.getPackageName (/cordova/lib/AndroidProject.js:99:12)
    at Api.addPlugin (/cordova/Api.js:223:57)
    at handleInstall (/usr/local/lib/npm/lib/node_modules/pgb-plugman-151/node_modules/pgb-cordova-lib/src/plugman/install.js:594:10)
    at /usr/local/lib/npm/lib/node_modules/pgb-plugman-151/node_modules/pgb-cordova-lib/src/plugman/install.js:364:24
    at _fulfilled (/usr/local/lib/npm/lib/node_modules/pgb-plugman-151/node_modules/q/q.js:787:54)
ENOENT: no such file or directory, open '/AndroidManifest.xml'

Status bar don't overlay web view in Ionic

Ionic: 3.20.0
Cordova: 8.0.0
Cordova-ios: 4.5.5
Plugin version: 2.4.2
iOS version: 11.4 (emulator)

Configurations:
StatusBar.overlaysWebView(true);

I want the status bar overlay web view, but for some reason, my status is setting to white.

Result: image

Status bar visible after focus into input / StatusBar.hide() not working

Bug Report

  • Android
  • CLI 7.1.0
  • Orientation landscape
  • config.xml
    plugin name="cordova-plugin-statusbar" source="npm" />
    preference name="StatusBarOverlaysWebView" value="true" />
    preference name="StatusBarBackgroundColor" value="#000000" />
    preference name="StatusBarStyle" value="lightcontent" />

Problem

When the user focus on an input text field, the keyboard appears but also the status bar
When trying to hide the status bar in focusin event with StatusBar.hide() the status bar is not hidding.
Also when calling StatusBar.hide() on focusout, the status bar is still not hiding.
Also when calling StatusBar.hide() with a little setTimeout 500ms the status bar is not hidding

What is expected to happen?

When using StatusBar.hide() the status bar should disappear

What does actually happen?

When using StatusBar.hide() the status bar is not hidding

Information

Please note that if an alert is invoked the status bar is disappearing

Command or Code

Environment, Platform, Device

Version information

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Deprecate styleBlackTranslucent and styleBlackOpaque

StatusBar.styleBlackTranslucent and StatusBar.styleBlackOpaque just set the value to UIStatusBarStyleLightContent because their original values were deprecated by Apple on iOS 7. So makes no sense to have them anymore. We should deprecate or remove them.

Styles documentation is confusing

Bug Report

Problem

Styles documentation is confusing:

Issue 1: default and lightcontent are confused

StatusBarStyle (status bar style, defaults to lightcontent)

However, JS functions styleDefault and styleLightcontent have different descriptions:

StatusBar.styleDefault
Use the default statusbar (dark text, for light backgrounds).

StatusBar.styleLightContent
Use the lightContent statusbar (light text, for dark backgrounds).

Issue 2: blacktranslucent has the wrong description (equal to lightcontent)

StatusBar.styleBlackTranslucent
Use the blackTranslucent statusbar (light text, for dark backgrounds).

StatusBar.styleLightContent
Use the lightContent statusbar (light text, for dark backgrounds).

However, in fact blacktranslucent makes the text dark.

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Plugin not working on Android 9

I'm trying to fix issue with StatusBarOverlaysWebView, but it's not working on Android 9.

How it looks like on Android 9: https://ibb.co/BZ4KVpB

How it looks like on PhoneGap Developer Application: https://ibb.co/W5574HC

I tried every possible combination editing config.xml. Now my config.xml look like this:

<platform name="android">
    <preference name="StatusBarStyle" value="lightcontent" />
    <preference name="android-minSdkVersion" value="21" />
    <allow-intent href="market:*" />
    <preference name="StatusBarBackgroundColor" value="#000000" />
    <preference name="StatusBarDefaultScrollToTop" value="false" />
    <preference name="StatusBarOverlaysWebView" value="true" />
</platform>

I run plugin with JS and it gives me normally object of StatusBar:

  document.addEventListener('deviceready', fullScreen);
  function fullScreen() {
    AndroidFullScreen.setSystemUiVisibility(AndroidFullScreen.SYSTEM_UI_FLAG_FULLSCREEN | AndroidFullScreen.SYSTEM_UI_FLAG_LOW_PROFILE);
    console.log(StatusBar);
    if (cordova.platformId == 'android') {
      StatusBar.overlaysWebView(true);
      StatusBar.backgroundColorByHexString('#33000000');
       
    } 
  }

Is there any trick about this?

Transparent status bar?

Issue Type

Please how can get a transparent status bar in my ionic app

  • Support Question

Environment, Platform, Device

Ionic 4.1
Cordova plugin status bar 2.4.2

Status bar is always white

How can I make status bar translucent? (I don't want to do it in config.xml, I also tried)
Whatever change I make, it doesn't reflect in the app. So far I tried this.

StatusBar.styleLightContent();
I also played with StatusBar.overlaysWebView(false);
The only way it works is if I set it up like this, StatusBar.styleDefault();, but it shows a white bar with black text.

The result is always this, a white status bar with no text (iOS 12, Cordova 8.1.1):
img_1338

StatusBar.overlaysWebView(true) doesn't work in iOS 13

Bug Report

Problem

Status bar isn't overlaying WebView when telling the plugin to do so.

What is expected to happen?

Status bar should overlay the WebView when asking the plugin to do so

What does actually happen?

The status bar does not overlay the WebView

Information

  1. Create a new project
    • cordova create ./cordovaTest
  2. Add plugin
    • cordova plugin add https://github.com/apache/cordova-plugin-statusbar.git
  3. Modify config.xml to add this inside <widget/>:
    • <preference name="StatusBarOverlaysWebView" value="true" />
  4. Add iOS platform:
    • cordova platform add ios
  5. Prepare iOS platform:
    • cordova prepare ios
  6. Open Xcode project
    • open ./platforms/ios/HelloCordova.xcworkspace
  7. Run in an iPhone 8 simulator
  8. Observe that the status bar is not overlaying the WebView. Status bar is white
  9. Open a web inspector from safari for the WebView
  10. Run:
    • StatusBar.overlaysWebView(true)
  11. Observe status bar still doesn't overlay webview
  12. Run:
    • StatusBar.hide()
  13. Observe the status bar is hidden (so the library works)

Environment, Platform, Device

  • Device: iPhone 8, and iPhone 8 Simulator
  • Platform: iOS

Version information

  • Device: iPhone 8 (simulator)
    Device OS: iOS 13 (and 13.1)
  • Cordova: 9.0.0 ([email protected])
    • Platform: ios 5.0.1
  • Plugin: 2.4.3 (also tried the repo)

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

version 2.4.2 : status bar is overlapped on android devices

With older version 2.2.2 this was working fine with android but that version was not compatible with iphone XS and iphone X (UI of model was not aligned properly/ overlapped to the status bar.
Let me know if there are any quick fixes.

Thanks in advance

Add new styleDarkContent

That sets the native value to UIStatusBarStyleDarkContent. Note that it's an iOS 13 value, so in older version it should set the value to UIStatusBarStyleDefault as it used to have the same effect (set text to black color)

[Android] Statusbar doesn't remember background color when overlay mode changes

Bug Report

Problem

The statusbar forgets its background color when StatusBar.overlaysWebView(true) is invoked or toggled.

What is expected to happen?

The statusbar to retain its background color when overlaysWebView is called. overlaysWebView should only change the overlay state, not the statusbar color.

What does actually happen?

The statusbar always goes to a completely transparent color on StatusBar.overlaysWebView(true)

Information

Originally the bug was discovered at #155 (comment)

Command or Code

StatusBar.overlaysWebView(true);
StatusBar.backgroundColorByHexString('#33000000'); // Statusbar is a slightly transparent gray here, as expected
...
StatusBar.overlaysWebView(false); // statusbar goes black as expected
...
StatusBar.overlaysWebView(true); // statusbar should be slightly transparent gray

Another example:

StatusBar.backgroundColorByHexString('#FF0000'); // status bar is red
StatusBar.overlaysWebView(true); // status bar is overlayed but loses its color.
StatusBar.overlaysWebView(false); // status bar goes back to black, should be red

Environment, Platform, Device

Android 9

Version information

Cordova 9, cordova-android 9, statusbar 2.4.3

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

statusbar overlaysWebView defaults to true not work on android

Bug Report

Problem

onDeviceReady I set overlaysWebview to true, but it's not work. But it worked again when system keyboard show. That is very strange!! I used this plugin on android 8.0

What is expected to happen?

What does actually happen?

Information

Command or Code

Environment, Platform, Device

Version information

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Cant set desired statusbar properties

Bug Report

Cant get desired status bar properties

Problem

I need statusbar background to be transparent, and font-color to be black

What does actually happen?

Background color is black or any other color i set, but no any opacity, ever.

Information

According to docs, i tried (in config.xml)

  1. . (which is actually 'true' by default)
This should make statusbar transparent. But i get black solid background with no transparency. 2) also i set hex color value via ARGB alternatively tried via StatusBar.backgroundColorByHexString('#00FFFFFF') in index.jsx file in this case i dont get any transparency at all, seems like ARGB value is not being recognised correctly.

Environment, Platform, Device

phone with Android 8.1.0

Version information

I make hybrid app in React,
Cordova Platforms : android 8.0.0, ios 5.0.1
"cordova-plugin-statusbar": "^2.4.3",

Checklist

  • I searched for existing GitHub issues
  • I included all the necessary information above

Plugin is shifted for IOS 12 iPad Pro 11-inches

Issue Type

  • [X ] Bug Report
  • Feature Request
  • Support Question

Description

For iPad Pro 11-inches ios 12 Status bar placed on the middle of the screen

Information

Command or Code

Environment, Platform, Device

Ipad Pro 11-inch

Version information

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.9.2
ionic (Ionic CLI) : 3.9.2

global packages:

Cordova CLI : 8.1.2 ([email protected]) 

local packages:

@ionic/app-scripts : 3.1.8
Cordova Platforms  : android 6.3.0 browser 5.0.4 ios 4.4.0
Ionic Framework    : ionic-angular 3.9.1

System:

Android SDK Tools : 25.2.5
ios-deploy        : 1.9.4 
Node              : v6.11.3
npm               : 3.10.10 
OS                : macOS
Xcode             : Xcode 10.1 Build version 10B61 

Checklist

  • [x ] I searched for already existing GitHub issues about this
  • I updated all Cordova tooling to their most recent version
  • I included all the necessary information above

StatusBar Blocked events at the top of the screen Ionic 3

Blocked events at the top of the screen

If I have the statusbar visible with statusBar.overlaysWebView (false), the application does not recognize events in a range between 50px and 100px approximately 100% of the width in iOS.

Sometimes it recognizes the slide event or click far below the buttons.

Temporary solution
I have achieved an interim solution by keeping the statusbar hidden with statusBar.hide () and statusBar.overlaysWebView (true);

This does not happen in the browser or in the iOS emulator.

But in my company we want to keep this statusbar visible.

The plugin version is 2.4.2

And this I get from ionic info:

Ionic:

   ionic (Ionic CLI)  : 4.12.0 (/Users/fitpalapp/.nvm/versions/node/v9.10.1/lib/node_modules/ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.1

Cordova:

   cordova (Cordova CLI) : 8.1.2 ([email protected])
   Cordova Platforms     : android 7.0.0, ios 4.5.5
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 21 other plugins)

System:

   Android SDK Tools : 26.1.1 (/Users/fitpalapp/Library/Android/sdk)
   ios-deploy        : 1.9.4
   NodeJS            : v9.10.1 (/Users/fitpalapp/.nvm/versions/node/v9.10.1/bin/node)
   npm               : 5.6.0
   OS                : macOS Mojave
   Xcode             : Xcode 10.1 Build version 10B61

Screenshot taken from iPhone x with the problem solved, specifying the area of ​​the problem.

Captura de Pantalla 2019-04-04 a la(s) 3 33 43 p  m

Problems with transparency on custom background color

Bug Report

Problem

No transparency when using backgroundColorByHexString("#BB000000") and this.statusBar.overlaysWebView(true);.

What is expected to happen?

The status bar should be an overlay on the web view and shoul be kinda transparent.

What does actually happen?

The status bar is behaving as if this.statusBar.overlaysWebView(false); was called and the color is dark gray-ish..

Information

Command or Code

this.statusBar.backgroundColorByHexString("#BB000000"); this.statusBar.overlaysWebView(true);

and

this.statusBar.overlaysWebView(true); this.statusBar.backgroundColorByHexString("#BB000000");

have been tested

Environment, Platform, Device

Ionic, Cordova, on Android 6.0.1 and Android 9.

Version information

Ionic:

   Ionic CLI          : 5.2.4 (/usr/local/lib/node_modules/ionic)
   Ionic Framework    : ionic-angular 3.9.6
   @ionic/app-scripts : 3.2.3

Cordova:

   Cordova CLI       : 9.0.0 ([email protected])
   Cordova Platforms : android 8.0.0, ios 4.5.5
   Cordova Plugins   : cordova-plugin-ionic-webview 1.2.1, (and 19 other plugins)

Checklist

  • I searched for existing GitHub issues (according to suggested issues)
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

iOS location issue on uploading the appstore - ask for NSLocationAlwaysUsageDescription

Hi,
I got the following message from apple once I uploaded the app to the app store.

Missing Purpose String in Info.plist File - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSLocationAlwaysUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data will be required to include a purpose string. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).Thanks so much for filing an issue or feature request! Please fill out the following (wherever relevant):

Does your plugin use the device location / uses an API that uses the device location?

Reproduction

I don't get any error once I build and run the app in debug/release mode.
only got the above mail from apple once I uploaded the app store.

Additional Information

  • cordova-plugin-statusbar version: 2.4.2
  • List of installed plugins:
    code-push 2.0.6 "CodePushAcquisition"
    com.elasticode.cordova 2.1.7 "Elasticode Cordova Plugin"
    com.etoro.chinaupdateplugin 13.0.0 "ChinaUpdatePlugin"
    cordova-android-support-gradle-release 2.0.1 "cordova-android-support-gradle-release"
    cordova-custom-config 5.0.2 "cordova-custom-config"
    cordova-plugin-app-version 0.1.9 "AppVersion"
    cordova-plugin-appsflyer-sdk 4.4.15 "AppsFlyer"
    cordova-plugin-code-push 1.11.13 "CodePush"
    cordova-plugin-customurlscheme 4.3.0 "Custom URL scheme"
    cordova-plugin-device 2.0.2 "Device"
    cordova-plugin-dialogs 2.0.1 "Notification"
    cordova-plugin-enable-multidex 0.1.3 "Enable Multidex"
    cordova-plugin-facebook4 4.2.1 "Facebook Connect"
    cordova-plugin-file 6.0.1 "File"
    cordova-plugin-file-transfer 1.7.1 "File Transfer"
    cordova-plugin-googleplus 5.3.2 "Google SignIn"
    cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
    cordova-plugin-intercom 6.2.0 "Intercom"
    cordova-plugin-network-information 2.0.2-dev "Network Information"
    cordova-plugin-splashscreen 5.0.2 "Splashscreen"
    cordova-plugin-statusbar 2.4.2 "StatusBar"
    cordova-plugin-wechat 2.6.0 "Wechat"
    cordova-plugin-whitelist 1.3.3 "Whitelist"
    cordova-plugin-zip 3.1.0 "cordova-plugin-zip"
    cordova-universal-links-plugin 1.2.1 "Universal Links Plugin"
    ionic-plugin-keyboard 2.2.1 "Keyboard"
    org.apache.cordova.inappbrowser 0.2.2 "InAppBrowser"
    phonegap-plugin-mobile-accessibility 1.0.4 "Mobile Accessibility"
    urbanairship-cordova 7.3.0 "Urban Airship
  • Cordova version: 7.0.0
  • iOS/Android/Windows version: 12
  • Does this reproduce on a debug build or release build? NO
  • Does this reproduce on a simulator, or only on a physical device? NO

iOS 13 Webview Shifted after Camera Closed

Bug Report

Problem

When either the camera or the image picker is pulled up and then closed either by canceling or performing the intended action, the entire webview is shifted up so that it appears as if the status bar is overlaying the webview (app content is behind the status bar).

What is expected to happen?

The webview should appear as it did when the camera or image picker was initially launched.

What does actually happen?

Upon close, the webview is behind the status bar.

Information

This only appears to happen in iOS 13 with the cordova-plugin-camera. I am using the cordova-plugin-wkwebview, but no other plugins seem to shift the webview so I'm assuming it's either an issue with this plugin or how something this plugin is doing reacts with the wkwebview.

Command or Code

Launch the camera or image picker, then close it.

Environment, Platform, Device

IPhone X with iOS 13.1.

Version information

Cordova 9.0.0
cordova-plugin-camera 4.1.0

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

[android] StatusBarOverlaysWebView defaults to true not work {broken}

Bug Report

Problem

What is expected to happen?

The statusbar should overlay the webview.

  • According to the plugin docs:
    the preference StatusBarOverlaysWebView (boolean, defaults to true).

What does actually happen?

The status bar became in solid blank, and not overlay the webview.

  • the preference StatusBarOverlaysWebView defaults to true not working.

Information

Untitled-1

Maybe someone know how this issue can be solved !

Environment, Platform, Device

  • Any new android devices.

Version information

  • Phonegap/Cordova CLI 9.0.0 (Android 8.0.0)
  • cordova-plugin-statusbar master version.

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Plugin breaks with WKWebView Engine

As lon as I'm using the standard WebView, the Overlay=true/false switch and background colour works perfectly. But when I add the WKWebview Engine Plugin to my Cordova project, it seems to ignore the status bar plugin entirely.

What is expected to happen?

should apply overlay true/false and background-colour

What does actually happen?

ignores these settings completely, as if plugin isn't even installed

Version information

Cordova ios 5.1.1
cordova-plugin-device 2.0.3 "Device"
cordova-plugin-statusbar 2.4.3 "StatusBar"
cordova-plugin-whitelist 1.3.4 "Whitelist"
cordova-plugin-wkwebview-engine 1.2.1 "Cordova WKWebView Engine"
phonegap-plugin-speech-synthesis 0.1.1 "SpeechSynthesis"

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

SOLUTION:

I eventually solved this by uninstalling the WKWebView engine and using cordova-plugin-ionic-webview instead.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.