Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

New Developer
Posts: 31
Registered: ‎04-21-2011
My Device: Playbook
My Carrier: N/A

Accessing blackberry.* javascript APIs from GWT

I'm wondering if anyone has successfully managed to call back into the Playbook blackberry.* APIs from a GWT application?


I have included a snippet below that shows my problem. I'm not surprised that the blackberry API can't be found in GWT development mode, but when I deploy it to the Playbook in the simulator I still get the error:


"error registering handlers: com.google.gwt.core.client.JavaScriptException: (ReferenceError): Can't find variable: blackberry"


Does anyone know how to correctly refer to the blackberry variable from within GWT so we can access platform-specific APIs?



private void registerHandlers() {
 	try {
 	} catch (Exception e) {
 		Window.alert("error registering handlers: " + e);

private native void regSwipeDown() /*-{



public void onSwipeDown() {
 	System.out.println("swipe down");
 	Window.alert("swipe down");




Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Accessing blackberry.* javascript APIs from GWT

hey rtholmes,

this sounds like a WebWorks related question -- your best bet for fast and accurate solutions is gonna be to visit and ask in this forum:


good luck!
J. Rab (Blog) (Twitter)
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman