04-09-2012 05:14 PM - edited 04-09-2012 08:38 PM
My WebWorks app successfully creates and saves file test.html in shared folder "blackberry.io.dir.appDirs.shared.documents.path". If I try opening this file in the PB browser, like this
var filePath = blackberry.io.dir.appDirs.shared.documents.path + "/test.html";
var args = new blackberry.invoke.BrowserArguments(filePath);
then I get an an exception, with message: "undefined"; I guess the args object is not created. The browser is not launched.
On the other hand, if I launch the PB browser manually and browse to file test.html in folder "file:///accounts/1000/shared/", I can open it.
What am I missing? Thanks.
Solved! Go to Solution.
04-10-2012 11:07 PM - edited 04-11-2012 08:55 AM
More surprises every day... Apparently, the PB browser does not support protocol file:///; it expects a URL that begins with http:// or https://. But I managed to write my own code to open the .html file in the PB browser. Still, it's disapointing that one has to do this kind of "gymnastics" to enable basic features.