Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
0.9.5, 0.9.6, 1.0.0, 1.1.0
-
None
-
None
Description
I am trying to record audio in Android and iOS with the following
code:
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0,
onFileSystemSuccess, onError);
...
fileSystem.root.getFile(filename, function onSuccess(file)
,onError) //create a FileEntry (onFileSystemSuccess handler)
...
mediaObj = new Media(file, onSuccess, onError); //create MediaObject
(in onSuccess handler)
But it seems that there is a difference between Android and iOS. In
Android I need to pass file.name and in iOS file.fullPath.
So Android needs only the filename like "file.ext" and iOS needs a
path like "/var/mobile/Applications/...HEX-APPID.../Documents/
file.ext".
On the other hand, when I use a FileTransfer, I have to provide
file.toURI(), i.e. "file://localhost/var/mobile/Applications/...HEX-
APPID.../Documents/file.ext".
But in the documentation it is claimed that I need an "URI" for ALL
cases, so why do I need file.toURI(), file.name or file.fullPath
depending on OS and function? Am I missing something?
Attachments
Issue Links
- duplicates
-
CB-285 Add property returning root path of Important FileSystem Locations
-
- Closed
-