Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-14107

StatusBar Plugin does not work correctly on Samsung S9

    XMLWordPrintableJSON

    Details

      Description

      I have a cordova project and I installed the StatusBar plugin to color the status bar of the device in the Android platform. The plugin displays the correct status bar color if I run the project on an AVD (pic1), but when I run it on the device it does not appear to work.

      I also noticed that when I run the project on device with the plug in uninstalled the view takes up the entire screen, but if I run it with the plugin installed there is black space between the app view and the top and bottom of the phone's nav bar and status bar (pic2).

      Update:

      When turned to portrait mode, the coloured status bar appears, but incorrectly (pic3).

      Device: Samsung S9 running Android 8.0.0 (Oreo)
      Cordova version: 8.0.0
      StatusBar plugin version: 2.4.2
      Cordova whitelist plugin: 1.3.3

       

      Index.js code:

      var app = {
          initialize: function() { 
              document.addEventListener('deviceready', this.onDeviceReady.bind(this), false); 
          },
          onDeviceReady: function() { 
              this.receivedEvent('deviceready'); 
              StatusBar.backgroundColorByHexString("#CF4D4D"); 
          },
          receivedEvent: function(id) { } 
      }; 
      app.initialize();
      

        Attachments

        1. pic2.jpg
          45 kB
          Brian Grieco
        2. pic1.png
          96 kB
          Brian Grieco
        3. pic3.jpg
          203 kB
          Brian Grieco

          Activity

            People

            • Assignee:
              bowserj Joey Robert Bowser
              Reporter:
              brian.g.grieco@gmail.com Brian Grieco
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: