cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shazron Abdullah (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-5265) Status Bar Plugin/Camera Plugin. Taking a photo or choosing a photo from library makes the status bar style back to black.
Date Wed, 27 Nov 2013 19:50:36 GMT

    [ https://issues.apache.org/jira/browse/CB-5265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13834080#comment-13834080
] 

Shazron Abdullah commented on CB-5265:
--------------------------------------

I created a new project, added the statusbar and camera plugins, and toggled the Info.plist
*UIViewControllerBasedStatusBarAppearance* value - the statusbar is hidden when the camera
viewcontroller is shown, so *no repro* for me.

My steps:
{code}
$ cordova -v
3.2.0-0.1.0
$ cordova create CB-5265
Creating a new cordova project with name "HelloCordova" and id "io.cordova.hellocordova" at
location "/Users/shaz/Desktop/CB-5265"
Downloading cordova library for www...
Download complete
$ cd CB-5265/
$ cordova platform add ios
Downloading cordova library for ios...
Download complete
Checking iOS requirements...
Creating ios project...
Preparing ios project
$ cordova plugin add org.apache.cordova.camera
Fetching plugin from "org.apache.cordova.camera"...
Starting installation of "org.apache.cordova.camera" for ios
Preparing ios project
org.apache.cordova.camera installed on ios.
$ cordova plugin add org.apache.cordova.statusbar
Fetching plugin from "org.apache.cordova.statusbar"...
Starting installation of "org.apache.cordova.statusbar" for ios
Preparing ios project
org.apache.cordova.statusbar installed on ios.
$ open -a Xcode platforms/ios
{code}

In Xcode, I chose *Resources/HelloCordova-Info.plist*, right-click *"Open As -> Source
Code"* and added this in the dict:
{code}
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
{code}

In Xcode, I chose *config.xml*, and set the preference value for *StatusBarOverlaysWebView*
to *false*

In Xcode, I chose *www/js/index.js*, and added the code below in top of the *onDeviceReady*
function:
{code}
        navigator.camera.getPicture(onSuccess, onFail, { quality: 50,
                                    destinationType: Camera.DestinationType.FILE_URI });
        
        function onSuccess(imageURI) {
            var image = document.getElementById('myImage');
            image.src = imageURI;
        }
        
        function onFail(message) {
            alert('Failed because: ' + message);
        }
{code}

I then ran the app, which launches the Camera automatically - Camera view is shown, no statusbar.
(UIViewControllerBasedStatusBarAppearance is false).
I modified  *Resources/HelloCordova-Info.plist* and changed the *UIViewControllerBasedStatusBarAppearance*
value to *true*, ran the app again, Camera view automatically launches, no statusbar again.


> Status Bar Plugin/Camera Plugin. Taking a photo or choosing a photo from library makes
the status bar style back to black.
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CB-5265
>                 URL: https://issues.apache.org/jira/browse/CB-5265
>             Project: Apache Cordova
>          Issue Type: Bug
>    Affects Versions: 3.1.0
>         Environment: iOS 7
>            Reporter: Daniel Morgan
>              Labels: camera, ios7, statusbar
>
> We're using a black status bar and the StatusBarStyleLightContent to simulate the pre-iOS
7 status bar with the status bar plugin.  When a user takes a photo or choose from library
the status bar style goes back to black; making a black status bar  with black text. My quick
fix is to add in CDVCamera under navigationController:willShowViewController:animated to set
the status bar style back to white: [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];,
but of course this only works for me since I want the status bar style to be white everywhere
in my application.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message