Accessibility

Mobile and Devices Developer Center

 

Creating your own custom device profile for Adobe Device Central CS3


Anant Parekh

Anant Parekh

Adobe

Created:
10 September 2007
User Level:
Beginner, Intermediate
Products:
Flash Lite

Device profiles in Adobe Device Central CS3 contain detailed information on a mobile device's technical specification, capabilities, and supported media types. Adobe Device Central provides device profiles for mobile devices available on the markets that are pre-installed with Flash Lite. Mobile developers and designers creating mobile content should target these devices. Adobe Device Central gives the ability to preview and test mobile content created (or authored) in Adobe Flash, Photoshop, Illustrator, Dreamweaver, Premiere Pro, or After Effects using the available devices.  Initially, Adobe Device Central supports previewing and testing mobile content only for devices that are enabled with Flash Lite. This document describes how you can create custom device profiles in anticipation of new mobile devices to be released and also for mobile devices which are not included in Adobe Device Central.

Device profiles in Adobe Device Central are defined using an XML document for each mobile device. Device profiles usually include a device skin, which replicates the physical appearance of the mobile device on the desktop screen and enables the ability to preview content in the context of the device. The recommended approach you should take when creating a custom device profile is to copy an existing device profile for a similar device and edit the necessary element tags. Obviously it is important to ensure the information included in the device profile correspond to the actual target device. Sometimes it could be difficult to find certain information, especially for a mobile device yet to be released on the market. Here I suggest that you wait for the regular updates of devices profiles that are made available through Adobe Device Central Online.

The following sections provide details of where to find existing XML documents for devices profiles on your computer, understand the specification of the XML file and how to modify specific element tags to create your own custom device profile. This document provides details on proprietary information, which you can use solely for your own purpose; however, no further support will be provided for custom device profiles created by individuals or third- parties.

Requirements

 1. Where to find device profiles on your computer

The device profiles are stored in the Devices folder where Adobe Device Central is installed. OnWindows XP, the default location is C:\Documents and Settings\username\Local Settings\ApplicationData\Adobe\AdobeDevice Central CS3\Devices\. On Windows Vista, the default location is C:\Users\username\AppData\Local\Adobe\Adobe Device Central CS3\Devices\. On Mac OS, the default location is: user folder/Library/Application Support/Adobe/Adobe Device Central CS3/Devices/.

Each device profile is stored as a XML document with a corresponding folder for a device skin containing XML and PNG files. Also, stored in the Device folder is an XML Schema Definition (XSD) document. The XSD file can be helpful to understand the XML structure and values range of different attributes.

2. Overview of XML document for device profile

This section provides an overview of the structure of XML file and description of some elements.

Structure of XML document

<?xml version="1.0" encoding="UTF-8" ?> 
<adp:deviceProfile ... >
     <coreData>
          :
     </coreData>
     <skinDesc ref="Manufacturer-Model_Skin_folder" /> 
          <propSets>
          <flash>
            <version name="Flash Lite" ... >
              <contentType name="browser">
                    :
                    <properties>
                    :
                    </properties> 
                    <fscommands2s>
                    :
                    </fscommands2s>
               </contentType>
               :
            </version>
         </flash>
         <video>
           <version name="Native" ... >
              <contentType name="standalonePlayer">
                    :
              </contentType>
              :
           </version>
         </video>
         <web>
           <version name="NetFront"... >
              <contentType name="browser">
                    :
              </contentType>
              :
           </version>
         </web>
         <bitmap>
           <version name="bitmap" >
              <contentType name="fullscreen">
                   :
              </contentType>
              :
           </version>
         </bitmap>
   </propSets>
</adp:deviceProfile>

Description of root elements

Element Description
<deviceProfile>  The root element for the information profile describing one device. Contains elements <coreData>, <skinDesc>, <propSets>.
<skinDesc> System defined reference to directory where the skin description files are located.
<propSets>   Contains media type elements <flash>, <video>, <web>, <bitmap>.
<Version> The media type version. Contains one or more elements <contentType>.
<contentType> Defines the particular content type supported by media.
<properties> Specific device properties in FL 1.x and 2.x. follow this element.
<fscommand2s> The FSCommand 2 that can be supported in FL 1.x and 2.x follow this element.

3. Modify screen size for certain content types

Certain content types might provide different screen size than the device's display size. You can modify the addressable screen size for content types. The element tag <screenSize> specifies the addressable screen size in pixels for content types. The element tag <display> gives the device's display size.

The below snippet from a XML file shows where to find the relevant element tags for a device profile.

<coreData>
     :
     <displays>
          <display name="Main" width="240" height="320" ... /> 
     </displays>
     :
</coreData>
<skinDesc ... >
<propSets>
     <flash>
          :
          <contentType name="browser">
               <screenSize width="240" height="266" />
               :
          </contentType>
          <contentType name="screenSaver">
                <screenSize width="240" height="320" />
               :
          </contentType>
          :
     </flash>
     <video>
          :
          <contentType name="standalonePlayer">
              <screenSize width="240" height="320" ... />
              :
          </contentType>
          :
     </video>
     <web>
          :
          <contentType name="browser">
              <screenSize width="240" height="266" ... />
                    :
          </contentType>
          :
      </web>
      <bitmap>
           :
           <contentType name="fullscreen">
                <screenSize width="240" height="320" />
                :
           </contentType>
           <contentType name="wallpaper">
                <screenSize width="240" height="266" ... />
                :
           </contentType>
                :
       </bitmap>
</propSets>

4. Modify FSCommands supported/not supported

You can modify FSCommands supported by Flash Lite content types. The element tag <fscommand> specifies support for FSCommand Launch. FSCommand 2 that can be supported in FL 1.x and 2.x follow element tag <fscommand2s>.  The element tag <fsCommand> indicates how frequently Flash Lite can process fscommand() or fscommand2() function calls. Refer to XML Schema Definition (XSD) document for attribute values. For a full list of FSCommands, see Flash Lite documentation.

The below snippet from a XML file shows where to find the relevant element tags for a device profile.

<coreData>
     :
     <displays>
         <display name="Main" width="240" height="320" ... /> 
     </displays>
         :
</coreData>
<skinDesc ... >
<propSets>
     <flash>
          :
          <contentType name="browser">
              <fscommand name="launch" value="No" />
              :
              <properties>
                  <fsCommand value="All" />
              :
              </properties>
              <fscommands2s>
                   <escape value="No" />
                   <fullscreen value="No" />
                   <getBatteryLevel value="Yes" />
              :
              </ fscommands2s>
              :
              </contentType>
              :
       </flash>
            :
  </propSets>

5. Modify device input types

You can modify device input types supported by Flash Lite content types. The element tag <mouseType> indicates what mouse events are supported by Flash Lite. The element tag <keySet> indicates what key events are supported by Flash Lite on the device. The element tag <navigationType> indicates the navigation mode supported by the platform. The element tag <setSoftKey> specifies FSCommand2 SetSoftKeys support. The element tag <keyRestrictions> specifies whether all URL request (for example, using the getURL() or loadVariables() methods) need to be triggered by a keypress or mouse action or not. Refer to XML Schema Definition (XSD) document for attribute values.

The below snippet from a XML file shows where to find the relevant element tags for a device profile.

<coreData>
     :
</coreData>
<skinDesc ... >
<propSets>
     <flash>
         :
         <contentType name="browser">
              <properties>
                   <mouseType value="None" />
                   <keySet value="Phone" />
                   <navigationType value="4WayWrapAround" /> 
                   <setSoftKeys value="Yes" />
                   <keyRestrictions value="Yes" />
                   :
              </properties>
              :
         </contentType>
         :
     </flash>
         :
</propSets>

6. Modify device integration

You can modify the device integration of Flash Lite content types with other device applications. The element tag <email> indicates whether the Flash Lite client can send e-mail messages using the GetURL() ActionScript command. The element tag <sms> indicates whether the Flash Lite client can send short message service (sms) using the GetURL() ActionScript command. The element tag <mms> indicates whether Flash Lite can send Multimedia Messaging Service (MMS) messages by using the GetURL() ActionScript command.

The below snippet from a XML file shows where to find the relevant element tags for a device profile.

<coreData>
     :
</coreData>
<skinDesc ... >
<propSets>
     <flash>
         :
         <contentType name="browser">
              <properties>
                   <email value="Yes" /> 
                   <sms value="Yes" /> 
                   <mms value="Yes" /> 
                   :
              </properties>
              :
         </contentType>
         :
      </flash>
          :
</propSets>

7. Modify file access

You can modify the behavior of certain file access ActionScript commands.  The element tag <loadMovie> indicates how frequently Flash Lite can process loadMovie() function calls. The element tag <loadVars> indicates how frequently Flash Lite can process loadVariables() function calls. The element tag <getUrl> indicates how frequently Flash Lite can process getURL() function calls. The element tag <xmlSocketSupport> indicates if XML socket is supported or not. Refer to XML Schema Definition (XSD) document for attribute values.

The below snippet from a XML file shows where to find the relevant element tags for a device profile.

<coreData>
     :
</coreData>
<skinDesc ... >
<propSets>
     <flash>
         :
          <contentType name="browser">
              <properties>
                   <loadMovie value="All" /> 
                   <loadVars value="All" /> 
                   <getUrl value="All" />
                   <xmlSocketSupport value="Yes" />
                   :
              </properties>
              :
           </contentType>
         :
  </flash>
       :
</propSets>

8. Modify text and font

You can modify the text and font behavior for the device. The element tag <playerRendersText> indicates if Flash Lite renders text natively or if the device renders all text. The element tag <inlineTextSupport> indicates if inline text is supported or not. The element tag <inputText> indicates if input text is supported or not. The element tag <textEncodingForm> specifies the text encoding used by the device. The element tag <useSingleFontFace> indicates if Flash Lite content will display in a single font face or not. The element tag <usePlayerEmbeddedVectorFont> indicates if Flash Lite supports embedded vector fonts or not.  Refer to XML Schema Definition (XSD) document for attribute values.

The below snippet from a XML file shows where to find the relevant element tags for a device profile.

<coreData>
     :
</coreData>
<skinDesc ... >
<propSets>
     <flash>
         :
         <contentType name="browser">
           <properties>
                <playerRendersText value="No" />
                <inlineTextSupport value="No" /> 
                <inputText value="Yes" /> 
                <textEncodingForm value="Native"/>
                <useSingleFontFace value="Yes" /> 
                <usePlayerEmbeddedVectorFont value="No" />
                :
           </properties>
           :
         </contentType>
         :
     </flash>
         :
</propSets>

9. Modify supported image/video formats

You can modify the image and video MIME types supported by particular content types. The element tag <supportedFormats> specifies the different supported MIME types. Refer to XML Schema Definition (XSD) document for attribute values.

The below snippet from a XML file shows where to find the relevant element tags for a device profile.

<coreData>
:
</coreData>
<skinDesc ... >
<propSets>
     <flash>
     :
     </flash>
     <video>
         :
         <contentType name="standalonePlayer">
             :
             <supportedFormats>
                  <format value="video/mp4" /> 
                  <format value="video/vnd.rn-realvideo" /> 
                  <format value="video/3gpp" />
             </supportedFormats>
          </contentType>
         :
      </video>
      <bitmap>
          :
          <contentType name="fullscreen">
              :
              <supportedFormats>
                   <format value="image/jpeg" /> 
                   <format value="image/gif" /> 
                   <format value="image/png" /> 
              </supportedFormats>
          </contentType>
          <contentType name="wallpaper">
               :
              <supportedFormats>
                   <format value="image/png" />
                   <format value="image/jpeg" /> 
                   <format value="image/bmp" /> 
                   <format value="image/gif" />
               </supportedFormats>
          </contentType>
         :
      </bitmap>
</propSets>

10. Modify the device performance in emulator

You can modify the device performance emulated by Flash Lite content types. The element tag <fpi> specifies a performance index for Flash Lite Content type. This value is used to calibrate the device performance in the emulator. The value is obtained by running a test application in the Flash Lite player running on the actual device.

Alternatively, you can use an arbitrary value for the performance index in order to calibrate the device in the emulator and then adjust the speed slider in the performance panel to match the execution speed of a SWF application running both on the emulator and actual device.

You can obtain the performance index by running a proprietary SWF test application on the actual device. The SWF application is stored in the Program folder where Adobe Device Central is installed. On Windows XP and Windows Vista, the default location is C:\Program Files\Adobe\Adobe Device Central CS3\Required\Performance. On Mac OS, the SWF application is stored inside the application and not accessible.

The below snippet from a XML file shows where to find the relevant element tags for a device profile.

<coreData>
     :
</coreData>
<skinDesc ... >
<propSets>
     <flash>
          :
          <contentType name="browser">
              :
              <fpi value="1789.45" />

              : <properties>
              :
              </properties>
              <fscommands2s>
              :
              </fscommands2s>
           </contentType>
           :
      </flash>
           :
</propSets>

About the author

Anant Parekh is a technical support engineer working for Adobe in the United Kingdom. He works with mobile device OEMs with their porting and device certification for Flash Lite and Flash SDK.