On some BlackBerry® 7 devices, a magnetometer sensor is integrated into the device (currently, only devices with touch screens have this functionality). The magnetometer sensor detects magnetic fields along the three axes of a BlackBerry device. You can use the Magnetometer APIs that are provided in the net.rim.device.api.system package to create applications (for example, a stud finder or a compass) that detect the XYZ magnetic fields and the Earth's magnetic poles.
Retrieving the inclination or declination of a geomagnetic field
You can retrieve the inclination, declination, and several other estimates for a geomagnetic field by using the GeomagneticField class. The GeomagneticField is provided in the net.rim.device.api.location package.
The Compass application uses the Magnetometer APIs to provide the BlackBerry® device user with the direction of the BlackBerry device relative to Earth's magnetic poles. The Compass application integrates with BlackBerry® Maps and provides the user with the ability to specify a destination.
Unified search enhancements
A number of enhancements have been made to the Unified Search Service.
The SearchableContentTypeConstantsInfo class provides two methods that help to determine the type of content returned by the Unified Search Service in a search result. The getAllContentTypes() method returns a bitwise or combination of all the content type constants defined in the SearchableContentTypeConstants class. The getMediaContentTypes() method returns a bitwise or combination of all the media content types in SearchableContentTypeConstants.
Two new constants in SearchableContentTypeConstants can help you to identify media files. The CONTENT_TYPE_MEDIA_DOCUMENTS constant identifies document files. The CONTENT_TYPE_MEDIA_FILES_ALL identifies all media files (documents, music, ring tones, and so on).
You can compare the return values from these methods to the return values from Searchable.getType() to determine whether a search result contains a particular data type.
The SearchableDataObject class provides an implementation of the SearchableEntity interface. You can extend this class to override the methods that are relevant to your data. The SearchableDataObject class provides defaults for methods that you do not override.
The EntityBasedSearchableProvider class provides an implementation of the EntityBasedSearchable interface. You can add, remove, and update your data in the search index without interacting with the AppContentManager class.
The ExtendedSearchProvider class provides an implementation of the ExternalSearchProvider interface. You must override the search() method to connect to a search engine.
A new constructor for the SearchArguments class allows you to specify the search string only. The SearchArguments(String, String) constructor is deprecated.
Identifying media files
Two constants were added to the SearchableContentTypeConstants class to help identify media files. The CONTENT_TYPE_MEDIA_DOCUMENTS constant identifies document files. The CONTENT_TYPE_MEDIA_FILES_ALL identifies all media files (document, music, ring tone, and so on).
Data volume monitoring on CDMA devices
You can now use the RadioInfo.getNumberOfPacketsSent() and RadioInfo.getNumberOfPacketsRecieved() methods to retrieve the number of packets (IP bytes) sent or received on the transceiver for CDMA devices. Previously, you could only retrieve this information on GSM devices. You can use these methods to track how much data a device is sending and receiving over the network.
You can find the RadioInfo class in the net.rim.device.api.system package.