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

Loic SALOU commented on CB-12370:
---------------------------------

Hi, I'm afraid I still have the same issue. Context: Samsung Galaxy S7 / 
Android 7.0
I have received Android N 3 days ago and since then I have this exact issue 
with camera, was working perfectly on android 6 in my Ionic 2 app.
I'm using Cordova 6.5.0 and Cordova-camera-plugin 2.4.0, which are most recent 
versions.

Reproducing is quite easy: create an ionic2 app using CLI (eg. ionic start 
myAwesomeApp --v2) then in a page add some button to click on and call code 
like:

    Camera.getPicture(options).then((imageData) => {
      let base64Image = 'data:image/jpeg;base64,' + imageData;
      this.message='got image!';
    }, (err) => {
      this.message='error! '+err;
    });

Any clue to help ?

> cordova camera plugin crashing for android 7 while capturing image through 
> front cam or back cam
> ------------------------------------------------------------------------------------------------
>
>                 Key: CB-12370
>                 URL: https://issues.apache.org/jira/browse/CB-12370
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.3.0
>         Environment: android 7 
>            Reporter: ASHIK K M
>
> Reason for crashing shown while running in Android Studio :
> java.lang.RuntimeException: Failure delivering result 
> ResultInfo{who=@android:requestPermissions:, request=0, result=-1, 
> data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) 
> }} to activity 
> {com.ionicframework.graphlock548865/com.ionicframework.graphlock548865.MainActivity}:
>  android.os.FileUriExposedException: 
> file:///storage/emulated/0/Android/data/com.ionicframework.graphlock548865/cache/.Pic.jpg
>  exposed beyond app through ClipData.Item.getUri()
>                                                                               
>           at 
> android.app.ActivityThread.deliverResults(ActivityThread.java:4094)
>                                                                               
>           at 
> android.app.ActivityThread.handleSendResult(ActivityThread.java:4137)
>                                                                               
>           at android.app.ActivityThread.-wrap20(ActivityThread.java)
>                                                                               
>           at 
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1529)
>                                                                               
>           at android.os.Handler.dispatchMessage(Handler.java:102)
>                                                                               
>           at android.os.Looper.loop(Looper.java:154)
>                                                                               
>           at android.app.ActivityThread.main(ActivityThread.java:6123)
>                                                                               
>           at java.lang.reflect.Method.invoke(Native Method)
>                                                                               
>           at 
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
>                                                                               
>           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757)
>                                                                               
>        Caused by: android.os.FileUriExposedException: 
> file:///storage/emulated/0/Android/data/com.ionicframework.graphlock548865/cache/.Pic.jpg
>  exposed beyond app through ClipData.Item.getUri()



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to