flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cristian Spiescu <cristian.spie...@gmail.com>
Subject Re: Determine at runtime if the application is running on mobile
Date Sat, 08 Jun 2013 11:09:38 GMT
Thanks Lee!

I will use this as well.

Cristian.

On 07.06.2013 21:36, Lee Burrows wrote:
> This is my mobile/web check:
>
> var playerType:String = Capabilities.playerType.toUpperCase();
> var version:String = Capabilities.version.substr(0, 3).toUpperCase();
>
> isMobile = (playerType=="DESKTOP" && (version=="IOS" || version=="AND" 
> || version=="QNX"));
> isWeb = (playerType=="ACTIVEX" || playerType=="PLUGIN");
>
> Not necessarily the most efficient, but it works.
>
>
>
> On 07/06/2013 20:32, Cristian Spiescu wrote:
>> Hello,
>>
>> I'd like to know at runtime, if the current application is running in 
>> web mode (in browser) or as mobile app.
>> Is there some kind of property that I can use?
>>
>> I have looked at Capabilities class, but I'm not sure it helps. I see 
>> that there is a "playerType" setting, but it doesn't seem to 
>> differentiate AIR from AIR on mobile.
>>
>> Thanks in advance,
>> Cristian.
>>
>
>


Mime
View raw message