Building Mobile Enterprise Applications : Using webMethods Mobile Designer : Adding Devices to a Mobile Application Project : Determining Device Settings by Running the Device Profiler
Determining Device Settings by Running the Device Profiler
 
Device Profiler Tests to Determine Device Settings
If you want your mobile application project to support a device for which Mobile Designer does not have a device profile, you can add a device profile. To do so, you must first determine the settings for the device. To determine the settings, use the Mobile Designer Device Profiler sample application and run it on the device.
After using the Device Profiler to determine the settings, execute the +Add-Update-Handset Ant target to add a device profile for a device. For more information about executing the +Add-Update-Handset Ant target, see Adding a Device Profile to the Device Databases.
The _DeviceProfiler_ project uses the Mobile Designer build process, but does not use the Mobile Designer run-time code.
Mobile Designer provides the source code and build process for the Device Profiler. However, you might need to modify and recompile the application to work on a specific device. For example, the Device Profiler contains tests to determine whether certain APIs and functions are present on a device. However, some devices perform a pre-installation check on the contents of an application bundle, and if the device check finds references to classes it does not implement, the device will not allow the installation of the application. The Device Profiler has parameters that you might need to alter to disable features that prevent the Device Profiler application from working on a given device.
To run the Device Profiler to determine settings for a device
1. If the Device Profiler project is not in Software AG Designer, import the project.
a. In Software AG Designer select File > Import> General > Existing Projects into Workspace, and then click Next.
b. In Import Projects, click Browse and select the project source directory of the project you want to clone.
The source code for the Device Profiler sample application is in the following directory:
Mobile Designer_directory /Samples/_DeviceProfiler_
c. Click OK, and then click Finish.
2. Update the Device Profiler code to provide a mobile phone number that the Device Profiler can use for testing SMS messaging capabilities. When you run the Device Profile, during the SMS Test, the Device Profiler attempts to send a text message to the mobile number you provide.
a. In the Project Explorer view, expand the following to access the TestWirelessMessaging class:
src > runtime-sms_test
b. In the runtime-sms_test folder, double-click TestWirelessMessaging.java to open it.
c. In the TestWirelessMessaging.java file, locate the following lines:
// TODO: FILL IN THIS PHONE NUMBER OF WHERE TO SEND THE SMS
public String phone_number = null;
d. Set a phone number for the phone_number String. For example:
// TODO: FILL IN THIS PHONE NUMBER OF WHERE TO SEND THE SMS
public String phone_number = "202-555-1234";
e. Save your changes.
3. Open the Device Profiler project’s build.xml file in the Ant view.
a. In the Project Explorer view, locate the Device Profiler project.
b. Expand the project and drag its build.xml file to the Ant view.
If the Ant view is not open, for instruction, see Displaying the Ant View.
4. In the Ant view, double-click +Multi-Build to launch the Multi Build dialog.
5. In the Multi Build dialog, select the DefaultDevice.
The Device Profiler project comes with this one device profile, DefaultDevice. The +Multi-Build Ant task cross compiles for the target platform, for example, Android or iOS, so that you can run the Device Profiler on the target device.
6. After building the Device Profiler, install and run it on the new target device.
You can alter the settings for any particular build. Additionally, several settings are available using the ++Activate-Handset or the +Multi-Build JPanel to enable or disable features of the test suite when these features cause installation problems.
If the device has problems displaying the screen at startup or on recovering from an interrupt, you might need to set the MD_BASE_CALL_SERVICEPAINTS parameter to false for the device and recompile.
The Device Profiler requires that you perform manual steps that require your input. Select the <SUMMARY> option on the main menu to get a list of all the settings that the device requires. On the main menu, the Device Profiler denotes completed tests using an asterisk (*).
For details on the Device Profiler tests you need to perform, see Device Profiler Tests to Determine Device Settings.
Copyright © 2007-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback