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

ASF GitHub Bot commented on CB-9446:
------------------------------------

Github user charlesverge commented on the pull request:

    
https://github.com/apache/cordova-plugin-camera/pull/112#issuecomment-149220643
  
    @riknoll The code in #93 is missing a null pointer check
    But the differences for the code which retrieves the url is
    #112 
    +                Cursor cursor = 
cordova.getActivity().managedQuery(Uri.parse(uriString), proj, null, null, 
null);
    +                int column_index = cursor.getColumnIndexOrThrow(_DATA);
    +                cursor.moveToFirst();
    +                realPath = cursor.getString(column_index);
    
    #93
    +                   cursor = context.getContentResolver().query(uri, 
projection, selection, selectionArgs,
    +                                   null);
    +                   if (cursor != null && cursor.moveToFirst()) {
    +                           final int column_index = 
cursor.getColumnIndexOrThrow(column);
    +                           return cursor.getString(column_index);
    +                   }
    
    I don't have time scheduled atm to do device testing


> Samsung device returns null from Cursor in Camera getRealPath
> -------------------------------------------------------------
>
>                 Key: CB-9446
>                 URL: https://issues.apache.org/jira/browse/CB-9446
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android, Plugin Camera, Plugin Media Capture
>    Affects Versions: 1.2.1
>         Environment: Samsung 4.1.2 GT-N8010
>            Reporter: Charles Verge
>              Labels: samsung
>             Fix For: 1.2.1
>
>         Attachments: realpath.diff
>
>
> Using a Samsung Galaxy Note GT-N8010 with android 4.1.2 produces an exception 
> in the Exif class. This is due to a filePath being null on line 66 of 
> src/android/ExifHelper.java
> {code} new ExifInterface(filePath){code}
> This error has been introduced when the switch was made to using Cursors. 
> This error did not happen in with the camera plugin bundled with Phone Gap 
> 3.4.
> This has been duplicated by other developers independently 
> http://stackoverflow.com/questions/30616846/phonegap-app-crash-when-take-a-new-photo-with-camera-plugin



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

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

Reply via email to