[ 
https://issues.apache.org/jira/browse/CB-7765?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Perry updated CB-7765:
----------------------------
    Description: When using the media-capture 
([email protected]) captureImage, getTempDirectoryPath 
calls cordova.getActivity().getCacheDir() (instead of checking for SD card 
first) which returns /data/data/com.packagename/cache but this path does not 
exist. The code then calls File.mkdirs to create the path which calls 
mkdirErrno which calls Libcore.os.mkdir(path, S_IRWXU) and that is throwing an 
exception that is caught and the method silently returns false. The exception 
has an errno = 17. The end result is captureImage calls the error callback with 
CAPTURE_INTERNAL_ERR.  This issue appears to be in the latest version of the 
media-capture plugin as well.  (was: When using the media-capture, 
getTempDirectoryPath calls cordova.getActivity().getCacheDir() when there is no 
SD card which returns /data/data/com.packagename/cache but this path does not 
exist. The code then calls File.mkdirs to create the path which calls 
mkdirErrno which calls Libcore.os.mkdir(path, S_IRWXU) and that is throwing an 
exception that is caught and the method silently returns false. The exception 
has an errno = 17. The end result is captureImage calls the error callback with 
CAPTURE_INTERNAL_ERR.)

> navigator.device.capture.captureImage Throws CAPTURE_INTERNAL_ERR, Cannot 
> Create Cache Folder, Galaxy S5
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CB-7765
>                 URL: https://issues.apache.org/jira/browse/CB-7765
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android, Plugin Media Capture
>    Affects Versions: 3.5.0
>         Environment: Galaxy S5
>            Reporter: David Perry
>
> When using the media-capture ([email protected]) 
> captureImage, getTempDirectoryPath calls cordova.getActivity().getCacheDir() 
> (instead of checking for SD card first) which returns 
> /data/data/com.packagename/cache but this path does not exist. The code then 
> calls File.mkdirs to create the path which calls mkdirErrno which calls 
> Libcore.os.mkdir(path, S_IRWXU) and that is throwing an exception that is 
> caught and the method silently returns false. The exception has an errno = 
> 17. The end result is captureImage calls the error callback with 
> CAPTURE_INTERNAL_ERR.  This issue appears to be in the latest version of the 
> media-capture plugin as well.



--
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