Building a Web Browser App for Blackberry Playbook Simulator

November 17, 2010

The blackberry playbook simulator doesn't yet include the web browser application, but I found it pretty easy to write my own using the qnx.media.QNXStageWebView class and calling the loadUrl method. This class also has a loadString(code, mimeType) and executeJavaScript method that looks interesting.

So - yesterday I was speaking with Brian Rinaldi. And he mentioned that he saw oddness using app:// syntax under Android. THat may be at play here.

Instead of using app://, you could use FIle.applicationDirectory.nativePath. That should give you a pointer to the directory - and then you just append the file name.

That's not _exactly_ the syntax, but you get the idea I hope.

On 11/30/2010 at 2:04:51 PM UTC Pete Freitag wrote:

10

Thanks for the useful discussion and comments Louis and Ray. I was interested in doing the same thing (to see if I could port a jQuery Mobile app), which is why I tried to figure out how to embed the browser in the first place. I also tried the app:// url without luck. I'll give the File.applicationDirectory.nativePath option a try when I get a chance.

On 12/08/2010 at 2:15:05 PM UTC Louis wrote:

11

Thanks Pete. nativePath does the trick

New topic: Has anyone successfully signed a PlayBook bar file with existing BlackBerry keys (from phone app development?) The java code signing GUI doesn't like bar files, and I just don't understand the command line syntax!

On 12/18/2010 at 1:55:33 PM UTC Basti wrote:

12

Hi! Thanks for this great piece of code. It compiles well and starts up on my emulator but won't show anything but a blank, white page (which is scrollable, according to the chessboard-pattern). I tried everything: HTTP webpages, local files and even "about:test". Any ideas?

On 01/14/2011 at 6:59:21 PM UTC CS wrote:

13

Hi Pete. I run into the same white page that Basti does. Did something change in the SDK that broke the Browser App code?

On 01/19/2011 at 5:12:13 AM UTC pyth wrote:

14

i'm also having the same problem as the two posters before me. could it be because of the beta 3 version? @pete: which version did you use?

On 01/19/2011 at 11:33:15 AM UTC Pete Freitag wrote:

15

Hi Guys, yes this was with the first beta, so things must have changed since then. I'm not sure when I'll get a chance to try this again, but if anyone can find a workaround feel free to post it here.