Open miamon opened 13 years ago
On the example located here http://www.blackberry.com/developers/docs/webworks/api/blackberry.media.microphone.html are using blackberry.io.dir.appDirs.shared.music.path, and blackberry.io.dir.appDirs are only available in PlayBook api.
I think it's better to specify this on the example, and coment other code for Smartphone, something like:
var fileName = document.getElementById('filename').value;
//For BlackBerry PlayBook // NOTE: access to shared folder requires "access_shared" permission on config.xml var filePath =blackberry.io.dir.appDirs.shared.music.path + fileName;
//For Smartphone BlackBerry var filePath = 'file:///SDCard/' + fileName;
//For BlackBerry PlayBook and Smartphone BlackBerry mic.record(filePath, testSuccess, testError);
Or better yet use http://www.blackberry.com/developers/docs/webworks/api/blackberry.system.html#.model to decide which file path to use
On the example located here http://www.blackberry.com/developers/docs/webworks/api/blackberry.media.microphone.html are using blackberry.io.dir.appDirs.shared.music.path, and blackberry.io.dir.appDirs are only available in PlayBook api.
I think it's better to specify this on the example, and coment other code for Smartphone, something like:
var fileName = document.getElementById('filename').value;
//For BlackBerry PlayBook // NOTE: access to shared folder requires "access_shared" permission on config.xml var filePath =blackberry.io.dir.appDirs.shared.music.path + fileName;
//For Smartphone BlackBerry var filePath = 'file:///SDCard/' + fileName;
//For BlackBerry PlayBook and Smartphone BlackBerry mic.record(filePath, testSuccess, testError);