Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

All Java ME Goodies Consolidated into One SDK : Page 4

The recently released early access edition of the new Java ME SDK (version 3.0) unites Java ME developer tools for CLDC, CDC, Blu-ray Disc Java, and LWUIT into a single SDK. Find out how it works.


advertisement

Device Database Search

Device fragmentation is not going away, but the Java ME SDK can answer questions such as "Will my app work on product X?" and "What devices support the following platform specifications?" The Device Database Search engine built into the Java ME SDK provides a quick-to-access, searchable repository of over 3,000 devices. The Device Database Search capability utilizes data and tools from the Wireless Universal Resource File.

The device data comes from a community-maintained XML file (wurfl.xml) that contains, as stated on the WURFL website, "info about all known Wireless devices on earth." A search engine on top of this file allows developers to quickly locate devices that meet specified criteria. To access and search the WURFL data, select Device Database Search from the Java ME SDK's Tools menu option (see Figure 12).

Figure 12. Start a Device Database Search: To search for mobile devices that might meet your application criteria, select the Device Database Search from the Tools menu of the SDK.

Figure 13. The Device List: To see all the devices listed in the WURFL database, uncheck the Use Filter option and click the Search button.



To see all the devices in the database, uncheck the "Use Filter" checkbox and click the Search button (see Figure 13).

Device characteristics such as device vendor, screen resolution, color depth, graphical image support (jpeg, gif, etc.), Wi-Fi support, and heap size, as well as support for the various Java ME configurations, profiles, and APIs, are available for each device. The filter allows you to search the device database for devices that meet specific parameters (such as device-supported APIs, vendor, screen resolution, and so on ). For example, if you need to know which devices support MIDP 2.0/CLDC 1.1, the Java ME 3D API, and also have screens that support at least 256,000 colors, simply use the filter, specify the filter properties as shown in Figure 14 and Figure 15 and click the Search button. The answer, by the way, is eight devices.


Figure 14. Filtering for Devices: Search for devices meeting certain parameters by checking the User Filter checkbox, adding search criteria and hitting the Search button.
 
Figure 15. Devices Matching the Search Criteria: Only devices matching the search criteria will be shown in the listing. A device can be selected from the results to get more details about the device.

Given the rate of change in the device industry, the device data in wurfl.xml will need to be updated periodically. According to the Najman, the Java ME SDK will come with an autoupdate feature, which is not yet in the early access version of the product. The autoupdate service will periodically publish the latest WURFL database and updates to the final release of the SDK.

LWUIT Support

The Lightweight User Interface Toolkit (LWUIT) is a UI library for creating richer and more portable Java ME user interfaces (see my previous DevX article for an introduction to LWUIT). As a recent add-on to the Java ME environment, you must manually incorporate the LWUIT libraries into most development environments.

The SDK 3.0 supports LWUIT out of the box. Simply right click on any project in the SDK's Projects view and request the project's properties. In the properties window, click on the Libraries & Resources option and add LWUIT to the project's libraries (see Figure 16 and Figure 17).


Figure 16. Making a Project LWUIT Ready: You can add the LWUIT library to a Java ME project and allow LWUIT to be used in the project.
 
Figure 17. Adding the LWUIT Library: Edit the properties of the project and add the LWUIT library via the Build, Library and Resources options.

In addition to the built-in LWUIT support, the SDK provides a LWUIT Resource Manager tool to create and edit resource bundles. To access the Resource Manager, select a LWUIT project in the Projects view of the SDK and then select LWUIT Resources from the Tools menu (see Figure 18 and Figure 19).


Figure 18. Editing LWUIT Resources: To create or modify LWUIT resource bundles, select LWUIT Resource from the Tools menu.
 
Figure 19. Creating or Modifying LWUIT Resource Bundles: Use the LWUIT Resource window to create and remove resource bundles as well as modify existing bundles.



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap