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

How to Detect if an Application is Running on a BlackBerry PlayBook Tablet or Simulator

by Administrator on ‎03-17-2011 10:36 AM (3,747 Views)

It is possible for an application to determine if it is running on a real BlackBerry® PlayBook™ tablet or in the BlackBerry® Tablet Simulator.  The following code example demonstrates how to detect this.

 

 

 

if (Capabilities.manufacturer.indexOf('VMware') == -1)
{
//It is a BlackBerry PlayBook Tablet.
}
else
{
//It is a BlackBerry PlayBook Simulator.
}
Contributors
Comments
by Developer on ‎04-20-2011 07:13 PM

It should  be noted that the above example requires an import statement including the flash.system.Capabilities library as so:

 

 

import flash.system.Capabilities;

 

Users Online
Currently online: 4 members 1,188 guests
Please welcome our newest community members: