This is an extension for Blackberry WebWorks written in ActionScript. You can trigger a FileDialog for opening or saving files from JavaScript. This extension will work with Blackberry Playbook and (maybe) with Blackberry OS 10.
- Copy the whole tree of the project to "SDK-Directory"\ext\blackberry.devbar.dialog (i.g. D:\SDK\BlackBerry WebWorks SDK for TabletOS 2.2.0.5\bbwp\ext\blackberry.devbar.dialog)
- Append the corresponding feature id to the config.xml of your project
<feature id="blackberry.devbar.dialog" />
- Allow your application to access local filesystem
<rim:permissions>
...
<rim:permit>access_shared</rim:permit>
...
</rim:permissions>
- Trigger from code
blackberry.devbar.dialog.browseForOpen("Select Image", "Images", "*.jpg;*.png;*.bmp;*.gif", function (data) {
alert(data); // show url to file
});
Happy Coding!