You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Yazeed Fares (JIRA)" <ji...@apache.org> on 2016/06/11 10:27:20 UTC

[jira] [Commented] (CB-11410) navigator.camera.getPicture returns undefined instead of CameraPopoverHandle object

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

Yazeed Fares commented on CB-11410:
-----------------------------------

To solve the issue as a short term solution I add a new method to dismiss the popover on orientation change and I modified the displayPopover method by adding an event listener to it :

At the end of the  displayPopover method I added the following:

    [[NSNotificationCenter defaultCenter] 
       addObserver:self 
          selector:@selector(deviceOrientationDidChangeNotification:) 
              name:UIDeviceOrientationDidChangeNotification 
            object:nil];

then defined this method

- (void)deviceOrientationDidChangeNotification:(NSNotification*)notification {
    [[self pickerController] dismissViewControllerAnimated:YES completion:nil];
}

> navigator.camera.getPicture returns undefined instead of CameraPopoverHandle object
> -----------------------------------------------------------------------------------
>
>                 Key: CB-11410
>                 URL: https://issues.apache.org/jira/browse/CB-11410
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Docs, Plugin Camera
>    Affects Versions: Master
>         Environment: iOS
>            Reporter: Yazeed Fares
>
> The camera plugin documentation describes that you can control the camera popover when device orientation changes, I tried the example but is is not working, so I went to the code to see what is happening and noticed that the navigator.camera.getPicture function doesn't return anything because the lines that returns the CameraPopoverHandle object are commented out.
> So I uncommented them to test but the issue is still happening, there is something wrong in the native code.
> My test was on real iPad iOS 9.3.2 and  on iOS simulator with iOS 8.4



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org