Welcome!

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

Reply
Developer
Posts: 656
Registered: ‎02-03-2010
My Device: Z10 LE
My Carrier: Rogers

navigateToURL working in Ripple but not on PlayBook 2.1

Just trying to launch App World to a specific app but navigateToURL isn't working on PlayBook 2.1.  The button click does launch the browser in Ripple simulator.  Anyone else have any issues with this.  Not sure if I am missing something in config.xml.

 

Thanks in advance.


Steven Kader at JaredCo
   Follow me on Twitter    |     Mipixi.com :  Web App for Photo Sharing
Developer
Posts: 172
Registered: ‎01-17-2011
My Device: 9500 series
My Carrier: Airtel

Re: navigateToURL working in Ripple but not on PlayBook 2.1

I use this code & it works fine on me.

Check if you are missing something

navigateToURL(new URLRequest("http://www.google.com/"),"_self");

 

Contributor
Posts: 39
Registered: ‎06-13-2011
My Device: playbook, torch 9810 and Alpha device!
My Carrier: digi

Re: navigateToURL working in Ripple but not on PlayBook 2.1

Yep. If you're pointing to an app inside the app world try 

 

navigateToURL(new URLRequest("appworld://content/125201"));

 

and substitute the numbers with your app's link which can be found on the desktop app world site.

Developer
Posts: 656
Registered: ‎02-03-2010
My Device: Z10 LE
My Carrier: Rogers

Re: navigateToURL working in Ripple but not on PlayBook 2.1

Thanks for the help....tried both ways and it works in Ripple but not on the PlayBook.  Here is my code...perhaps I have it wrong :

 

 

/*
			PRIVATE METHODS
		*/
		//Thumb click handler
		private function clickHandler(e:MouseEvent):void{
			
			
			 if(e.currentTarget == btnMainMenu)
				dispatchEvent(new ScreenEvent(ScreenEvent.MAIN_MENU_CLICKED));
			else
			
			 if(e.currentTarget == btnUpgrade){
				// navigateToURL(new URLRequest("http://www.google.com/"),"_self");
				 navigateToURL(new    URLRequest("http://appworld.blackberry.com/webstore/content/119225"),"_self");
				
				
			 }
				
			else
			
			
			
			dispatchEvent(new ScreenEvent(ScreenEvent.LEVEL_SELECTED, {selectedIndex:thumbHolder.getChildIndex(DisplayObject(e.currentTarget))}));
		}

 


Steven Kader at JaredCo
   Follow me on Twitter    |     Mipixi.com :  Web App for Photo Sharing
Developer
Posts: 508
Registered: ‎01-19-2011
My Device: My Trusty Red Plane
My Carrier: Outer Space

Re: navigateToURL working in Ripple but not on PlayBook 2.1

hm.. actually looks correct, alhough I would always use

navigateToURL(new URLRequest("appworld://content/37066"));

 for appworld and

navigateToURL(new URLRequest("http://google.com/"));

 for other links (note: I don't use "self").

 

You could also try to separate your clickHandlers. Just make it two different ones, like this

private function mainMenuClickHandler(e:MouseEvent):void{
	dispatchEvent(new ScreenEvent(ScreenEvent.MAIN_MENU_CLICKED));
}

private function upgradeClickHandler(e:MouseEvent):void{
	navigateToURL(new URLRequest("http://www.google.com/"));
}
			
private function otherClickHandler(e:MouseEvent):void{			
			dispatchEvent(new ScreenEvent(ScreenEvent.LEVEL_SELECTED, {selectedIndex:thumbHolder.getChildIndex(DisplayObject(e.currentTarget))}));
}

 

maybe it works (better)?

-----------------------------------------------------------------------
I'm a bird from outer space. But I'm not flappy o.o