Question

simple question for Phonegap familiar folk dealing with Blackberry distribution for an app that was passed to me for porting. This is my first foray into Blackberry, so I'm currently feeling my way around.

I'm using BB10 Webworks Ver 2.x, which should be similar enough to Phonegap (3.0-3.4) that its pretty much a drop-in replacement.

I'm now wondering how to access any bundled assets in www/ in a bar file. Taking an audio file audiofile.mp3 in www/music as an example,

For android, we can access them with a URL as such:

file:///android_asset/www/music/audiofile.mp3

Because Blackberry is so similar to Android that a conversion service is available, there should have been a similar bundle location for Blackberry, but I am unable to find the correct path for files packed into the .bar.

I tried:

local:///www/music/audiofile.mp3 
local:///music/audiofile.mp3
file:///www/music/audiofile.mp3
file:///music/audiofile.mp3

And that those lead nowhere.

Much appreciated if there's any help on this.

PS: - I do not need write access. If there's a way to get at the data stream, then that's all I need. If I need to recode the javascript loader, so be it. - I'd like to use one of those APK to BAR converters, but I don't think that works. The directory is unfortunately hardcoded into this app by design, tho in a way that I should only need to change it in one place. So even in Blackberry it will look for android_assets, which shouldn't exist in a recompiled .bar.

Was it helpful?

Solution

=.=

Turns out that Blackberry wants to use webkit classes instead of Phonegap's internal File functions. These work quite differently, enough so that a chunk of the app has to be recoded and retested on Blackberry.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top