Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Archived:Scope of Device Central

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

We do not recommend Flash Lite development on current Nokia devices, and all Flash Lite articles on this wiki have been archived. Flash Lite has been removed from all Nokia Asha and recent Series 40 devices and has limited support on Symbian. Specific information for Nokia Belle is available in Flash Lite on Nokia Browser for Symbian. Specific information for OLD Series 40 and Symbian devices is available in the Flash Lite Developers Library.

Article Metadata
Created: manikantan (03 Mar 2009)
Last edited: hamishwillee (13 May 2013)

The following article shows how to effectively use Adobe CS4 Device Central to test the execution of your application on the handset.

Introduction to Device Central

Adobe CS4 Device Central includes various features to emulate the performance of your application. You can test the application in various modes of Contrast / Brightness. You can experiment and observe how differently it would work under cases of BEING CHARGED, or LOW NETWORK CONNECTIVITY. In addition you can alter the Volume Level, Signal Level, Back light,. You can also learn from device Central the amount of Memory consumed by the application. Adobe Device Central also helps in learning about the profile of a handset. For example, if you wish to know the screen size or OS or Platform or Networks support ( EGDE, GPRS, GSM 850, GSM 900 etc) or the availability level of a FSCommand on the device. These are very few ways to use the Adobe Device Central effectively.

More details of the CS 4 features are available at the adobe site CS 4 Features

Automated Testing

One of the most important and outstanding feature in CS4 is the Automated Testing feature. You can create/edit Automation scripts that will help you study the behavior of your SWF file. The simplest way to accomplish this, is by 1. Opening the SWF, you wish to test, in Device Central.

2. Now select the target device( from the list of device sets - on the left)

3. Now as your application begins execution, press the RECORD button on the AUTOMATED TESTING panel towards the right.

4. Device Central begins tracking each key press, each change( like change of battery level or volume) and records it.

5. Once you have finished your first phase ( or the complete execution cycle), you can press the STOP button on the same panel.

6. Now, you can rename the script generated as per your convenience.

7. In order to perform Batch testing of your application, Multi-select ( using Control in Windows ) the devices from the Handset list and click on RUN button from AUTOMATED TESTING panel. You will now observe that testing has begun.

8. Once the test has been performed iteratively on each selected device, you will confront a log with a screen shot on each device. These logs contain the information generated in Output Panel, produced on individual execution. This will be useful to check if any discrepancies or aberration in behavior had occurred during execution.

Understanding the TestScript

In order to effectively use the test script, insight into the code is mandatory. The overall script is classified into three sections -

1. function init() - This is called during the initialization phase and can be used to set parameters or configuration settings like volume or back light or gamma levels.

2. function idle() - This is called as many times and also called whenever possible.

3. function execute Update() - This is where all events are registered or coded. When you wish to emulate a key press or test the behavior after pressing a key the same needs to be written inside this function.

  • Because the TestScript is not Actionscript i am directly pasting the code here and hence Syntax coloring is absent.
                case 1: emulator.fullscreen = true; break;		 // time: 22
case 49: emulator.device.leftSoftKey( "down" ); break; // time: 4518
case 50: emulator.device.leftSoftKey( "up" ); break; // time: 4564
case 76: emulator.device.selectKey( "down" ); break; // time: 6982
case 77: emulator.device.selectKey( "up" ); break; // time: 7087
case 131: emulator.flash.volume = 98; break; // time: 12670
case 169: emulator.device.key( "0" , "down" ); break; // time: 16860
case 170: emulator.device.key( "0" , "up" ); break; // time: 16914

The following is an extract of the executeUpdate() function of a test script. As you can perceive, emulator.fullscreen forces the application to run in Fullscreen mode.The lines emulator.device.leftSoftkey('down") or ("up") are executed when you generate a LEFTSOFTKEY press. One for the press(or DOWN) and other for its release or UP state. The selectKey in the code maps to the ENTER key or the center key in the navigation control keys.The next line of the script corresponds to change in volume level to 98 and the last two lines to a keypress of the key 0 on the handset's keypad. You can also observe that timestamps are also present in the code. When you are writing the testscript on your own, the CHECK SYNTAX option will certainly help.

This page was last modified on 13 May 2013, at 23:48.
53 page views in the last 30 days.