Skip to main content
Devarai
Known Participant
December 1, 2011
Question

$40USD for userAgent string on Air for iOS

  • December 1, 2011
  • 2 replies
  • 2269 views

Hello,

I pay $40USD to someone who creates a native iOS extension for AIR mobile that gives me the device user agent string. (source code XCode 4.1 project + ANE file).

Thanks,

Henning

This topic has been closed for replies.

2 replies

Participant
December 19, 2014

var link:URLRequest = new URLRequest("http://www.adobe.com");

trace("USER AGENT IS ---- " + link.userAgent);

December 1, 2011

What are you looking for ? Is it the device (iPod, iPad, iPhone) your app is running on or something else ?

Devarai
DevaraiAuthor
Known Participant
December 1, 2011

The user agent is something like this: Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1C9 Safari/419.3

December 1, 2011

I dont think you need a Native Extension to do that.

Just load an html page in StageWebView, querry navigator.userAgent in javascript.

Since there is no way for direct communication between AS-JS, you can change the location of document through document.location and append Navigator.userAgent in the new url location.

To get it in AS, listen for LocationChanging event. In its handler, preventdefault it, and read the event.location property to get the userAgent string in AS.

this might help : http://sean.voisen.org/blog/2010/10/making-the-most-of-stagewebview/

Thanks,

Meet