12-29-2012 07:35 PM
I got a question about accessing content from the shared folder. I use the following code for background sound playback:
var audio = new Audio(filepath) audio.play()
This command works for: filepath set to 'audio/monkey.mp3', but does not work for 'file:///accounts/1000/shared/music/monkey.mp3' (or '/accounts/1000/shared/music/monkey.mp3'). I copied this file in this folder on my Dev Alpha (and additionally bundled it with my app). The directory was returned from "invokeFilePicker".
I need this functionality in order to let the user choose custom music from the device's library.
Using the remote debugger (aka web inspector) wasn't particularly helpful as both requests are shown as status "Success" in the "Network" tab.
Here are the possibly interesting lines from my config.xml, in case something is wrong with my permissions:
[...] <rim:permit>access_shared</rim:permit> [...] <access uri="*" subdomains="true"/> [...] <feature id="blackberry.io.file" /> <feature id="blackberry.utils" /> [...]
Do you have any ideas?
Solved! Go to Solution.
12-29-2012 07:45 PM
Note to self: do not post questions in the middle of the night after long working hours...
It really was an permissions issue, but I did forget to encapsulate my permissions like this:
<rim:permissions> <rim:permit>access_shared</rim:permit> </rim:permissions>
It works just fine now.