cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaoner <...@git.apache.org>
Subject [GitHub] cordova-plugin-camera pull request: CB-10270 android: Added back s...
Date Tue, 09 Feb 2016 09:06:24 GMT
Github user shaoner commented on the pull request:

    https://github.com/apache/cordova-plugin-camera/pull/160#issuecomment-181769966
  
    @riknoll yes, actually if you don't set correctOrientation to true, getRealPath is never
called, it returns the uri instead (I don't see why) so this is not empty:
    ```java
                 if (this.targetHeight == -1 && this.targetWidth == -1 &&
                         (destType == FILE_URI || destType == NATIVE_URI) && !this.correctOrientation)
{
                     this.callbackContext.success(uri.toString());
    ```
    
    However, I think we have two issues here:
    1. getRealPath should be called even with correctOrientation set to false
    2. `FileHelper.getRealPathFromURI_API19` throws an exception, returning an empty path
in some cases:
       - happens with my galaxy S4 device (android v5.0.1) and I guess it cannot be reproduced
with a S4 emulator unless the same rom is used 
       - does not happen with a nexus S emulator (android v5.1.1)
    
    ( this seems to be the case for LG G3 as well, http://stackoverflow.com/questions/2789276/android-get-real-path-by-uri-getpath/33074944#33074944
)
    
    For now, I've got it working by returning `getRealPathFromURI_BelowAPI11` if the path
is empty.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message