How to get adobe air.navigateToURL (urlReq) to set default browser

I am working with adobe air and I have this code.

var urlReq = new air.URLRequest('http://google.com'); 
air.navigateToURL(urlReq);

      

It works correctly in that it loads the page in the browser, but the problem is that the adobe air stays in front and the browser is not brought to the front ...

Perhaps this is because I am working at runtime and not in the corresponding application?

(just try this now)

+2


source to share


3 answers


air.navigateToURL(urlReq, "_blank");

      



does this do the trick? It works with my compiled apps ...

+1


source


Does this happen when your default browser is IE? What if your default browser is Firefox?



0


source


In a desktop app, this does the job:

var url:String = "http://google.com";
navigateToURL( new URLRequest(url) );

      

Never try to compile an application. StageWebView can help you, or you can try "url schemes". I know there is one for googlechrome:

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

      

0


source







All Articles