Excluding Devices From Requested Display Resolution Mode

RequestedDisplayResolution tag in application descriptor allows the developer to choose between standard or high resolution on iOS devices with high resolution screen. High resolution screens were earlier only available in iPhone and iPod 4th Generation and above. Recently released models on iPad namely iPad 3rd & 4th Generation also boast of a high resolution screen with 2048×1536 resolution. Specifying a ‘high’ value in requestedDisplayResolution tag enables the retina mode in the all iOS devices having the high resolution screen. Prior to AIR 3.6, there was no way to enable or disable retina mode on some specific devices. There existed some workarounds but they came with some trade offs of not able to use the iOS 6 specific features.

A new attribute ‘excludeDevices’ has been added in AIR 3.6  in the requestedDisplayResolution tag in the application descriptor. Developers will now be able to explicitly disable the specified display resolution on one or more iOS devices using this attribute.

<requestedDisplayResolution excludeDevices="iPhone4,1">high</requestedDisplayResolution>

The value specified to this attribute is a space separated list of device model identifiers. The complete list of device model identifiers is given at the end of page. Developers can choose to either specify the complete list of devices model identifiers or provide a common prefix of a model identifier to be exlcluded from the specified resolution mode. An exact match of the specified device model identifier is done with the current device when complete device model identifier is specified as the value to excludeDevices attribute. Prefix matching is done when complete device model identifier is not provided. Thus, developers will have the choice to exclude

  • a particular device like only iPhone 5th Generation
  • multiple devices like iPhone 5thGeneration and iPod 5th Generation
  • a particular device model like iPad, iPhone or iPod.

Examples

1. The following example disables retina mode only on iPhone 5th Generation.

  <requestedDisplayResolution excludeDevices="iPhone5,1">high</requestedDisplayResolution>

 

2. The following examples disable the retina mode only on iPhone and iPod 5th Generation.

  <requestedDisplayResolution excludeDevices="iPhone4,1 iPod5,1">high</requestedDisplayResolution>

 

3. The following example disables retina mode on all iPads.

  <requestedDisplayResolution excludeDevices="iPad">high</requestedDisplayResolution>

 

4. The following example disables the retina mode only on iPad 3rd Generation and iPad 4th Generation.

  <requestedDisplayResolution excludeDevices="iPad3">high</requestedDisplayResolution>

 

5. The following example enables retina mode only on iPhone and iPods.

  <requestedDisplayResolution excludeDevices="iPod iPhone">standard</requestedDisplayResolution>

Device Model Identifiers List

Device Name

Device Model Identifier

“iPod4,1″

iPod Touch 4th Generation

“iPod5,1″

iPod Touch 5th Generation

“iPhone2,1″

iPhone 3GS

“iPhone3,1″

iPhone 4

“iPhone3,2″

iPhone 4 CDMA

“iPhone4,1″

iPhone 4S

“iPhone5,1″

iPhone 5

“iPad1,1″

iPad 1st Generation (Wifi)

“iPad2,1″

iPad 2nd Generation (Wifi)

“iPad2,2″

iPad 2nd Generation (GSM)

“iPad2,3″

iPad 2nd Generation(CDMAV)

“iPad2,4″

iPad 2nd Generation(CDMAS)

“iPad2,5″

iPad Mini (Wifi)

“iPad3,1″

iPad 3rd Generation (Wifi)

“iPad3,2″

iPad 3rd Generation (CDMA)

“iPad3,3″

iPad 3rd Generation (GSM)

“iPad3,4″

iPad 4th Generation (Wifi)

 

Please Note that

  • This attribute will be allowed only with the application descriptor namespace 3.6 and higher. AIR 3.6 is currently available only in the labs release. This labs release can be downloaded from here.
  • This attribute wont have any effect while running apps on AIR simulator. Simulator will only imitate the value mentioned in the application descriptor.
  • The device model identifiers can also be verified using System.Capabilities.os property.

 

3 Responses to Excluding Devices From Requested Display Resolution Mode

  1. Pingback: Excluding Devices From Requested Display Resolution Mode | TechnoVeille

  2. Colin Holgate says:

    Your closing tags need a slash. With at both ends of the line Flash publishing can’t parse the xml.

  3. Colin Holgate says:

    The comment system here doesn’t take tags in the text! I was referring to the requestedDisplayResolution at the end of those lines, they need a / in front of the word.