Normalize Media recording in PhoneGap
-------------------------------------
Key: CB-99
URL: https://issues.apache.org/jira/browse/CB-99
Project: Apache Callback
Issue Type: Bug
Components: Android, iOS
Affects Versions: 1.1.0, 1.0.0, 0.9.6, 0.9.5
Reporter: Simon MacDonald
Assignee: Shazron Abdullah
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?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira