com.funambol.util
Class BlackberryUtils

java.lang.Object
  extended by com.funambol.util.BlackberryUtils

public class BlackberryUtils
extends java.lang.Object

This class is a wrapper for J2me Funambol Common API. It provides informations about Blackberry devices configurations and allow to access some system properties that are peculiar of Blackberry devices only. For this reason this class has only been implemented into the Blackberry devices platform dependent module.


Constructor Summary
BlackberryUtils()
           
 
Method Summary
static java.lang.String[] getAllActiveServiceBookAPNs()
          Retrieves only ACTIVE ServiceRecords (WAP2 type)from the native device's ServiceBook checking if their CID is WPTCP and UID
static java.lang.String getInternalDeviceStorePicturesdir()
          Get the path of the device's default Internal Memory Pictures directory
static java.lang.String getNetworkCoverageReport()
           
static java.lang.String getOSVersion()
           
static java.lang.String getSDCardPicturesdir()
          Get the path of the default SDCARD Pictures directory
static java.lang.String getServiceBookOptions()
          Get the options to use the list of APN included into the device ServiceBook
static java.lang.String getServiceBookWapTransportApn()
          Retrieves the WAP/WAP2 Transport APN from service book
static boolean isBISEmailAvailable()
           
static boolean isDataConnectionAvailable()
          Give global information about the data connection bearer activity
static boolean isSDCardInserted()
          Ask the system if the device has an SDCard inserted
static boolean isSimulator()
          Access the net.rim.device.api.system.DeviceInfo class in order to understand if the running system is a simulator or a real device.
protected static boolean isWapGprsDataBearerOffline()
           
static boolean isWapTransportServiceRecord(net.rim.device.api.servicebook.ServiceRecord sr)
          Validate the given ServiceRecord entry: in order to be validated it must be a WAP or WAP2 transport entry
protected static boolean isWifiActive()
          Give information about the presence of active wifi connections.
protected static boolean isWifiAvailable()
          Give the information about the presence o a wifi bearer on the device
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlackberryUtils

public BlackberryUtils()
Method Detail

isSimulator

public static boolean isSimulator()
Access the net.rim.device.api.system.DeviceInfo class in order to understand if the running system is a simulator or a real device.

Returns:
true if the current application is running on a Blackberry simulator, false otherwise

isWifiAvailable

protected static boolean isWifiAvailable()
Give the information about the presence o a wifi bearer on the device

Returns:
true if the wifi communication interface bearer is supported by the device, false otherwise

isWifiActive

protected static boolean isWifiActive()
Give information about the presence of active wifi connections.

Returns:
true if the device is connected to a wifi network with its wifi bearer, false otherwise

isWapGprsDataBearerOffline

protected static boolean isWapGprsDataBearerOffline()

getNetworkCoverageReport

public static java.lang.String getNetworkCoverageReport()

isWapTransportServiceRecord

public static boolean isWapTransportServiceRecord(net.rim.device.api.servicebook.ServiceRecord sr)
Validate the given ServiceRecord entry: in order to be validated it must be a WAP or WAP2 transport entry

Parameters:
sr - is the ServiceRecord to be checked
Returns:
true if

getServiceBookWapTransportApn

public static java.lang.String getServiceBookWapTransportApn()
Retrieves the WAP/WAP2 Transport APN from service book

Returns:
the Stirng formatted WAP/WAP2 Transport APN. This entry is unique for every ServiceBook.

getAllActiveServiceBookAPNs

public static java.lang.String[] getAllActiveServiceBookAPNs()
Retrieves only ACTIVE ServiceRecords (WAP2 type)from the native device's ServiceBook checking if their CID is WPTCP and UID

Returns:
String[] with the active APN found into the device's ServiceBook

getServiceBookOptions

public static java.lang.String getServiceBookOptions()
Get the options to use the list of APN included into the device ServiceBook

Returns:
a string that should be added to the url parameters

isDataConnectionAvailable

public static boolean isDataConnectionAvailable()
Give global information about the data connection bearer activity

Returns:
true if there is an active bearer including the check for WIFI and WAP/GPRS bearer

isSDCardInserted

public static boolean isSDCardInserted()
Ask the system if the device has an SDCard inserted

Returns:
boolean true if the SDCard is inserted, false otherwise

getSDCardPicturesdir

public static java.lang.String getSDCardPicturesdir()
Get the path of the default SDCARD Pictures directory

Returns:
String the path of the default pictures directory on the SDCard

getInternalDeviceStorePicturesdir

public static java.lang.String getInternalDeviceStorePicturesdir()
Get the path of the device's default Internal Memory Pictures directory

Returns:
String the path of the default pictures directory on the Internal device memory

getOSVersion

public static java.lang.String getOSVersion()

isBISEmailAvailable

public static boolean isBISEmailAvailable()


Copyright © 2001-2009 Funambol.