1 Reply Latest reply on Aug 10, 2011 11:33 AM by Adam Altman (Adobe)

    Change Settings on different device(s)


      Is it possible to detect whether or  not its an ipad or smartphone so that I can select a different stylesheet or do some amends?


        • 1. Re: Change Settings on different device(s)
          Adam Altman (Adobe) Adobe Employee

          Hi Si,


          As far as I know, you can't detect a specific device, but you can detect characteristics of the device like the OS or resolution. In CSS, for example, you can detect a high-resolution device and make your default font bigger with:


          @media (application-dpi: 320) AND (os-platform:"IOS"), (os-platform:"Android")




                    fontSize: 36;




          More details are in Adobe's CSS docs.


          In your AS code, you have acces to more characteristics. Check out flash.system.Capabilities. For resolution in Flex 4.5, look into the applicationDPI and runtimeDPI properties of spark.components.Application.



          Flex SDK developer