|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.system.CoverageInfo
public class CoverageInfo
Provides information on the type of coverage that is currently available to a BlackBerry
device over all supported Wireless Access Families (WAFs), as well as serial bypass,
and Bluetooth®. The CoverageStatusListener
listener interface receives notifications of changes
in this aggregate coverage status.
Before a device is considered to be in sufficient coverage for a connection type, the following two conditions must be met:
Note that being in coverage for a connection type is not a guarantee that such a connection attempt will succeed. For example, if the device is not properly provisioned for a connection type, then connection attempts of that type fail even though there might be sufficient coverage. Also, unresponsive destination servers can cause connection attempts to fail even though the device may have sufficient coverage for the connection is it attempting.
For more information on Bluetooth serial bypass, visit www.blackberry.com/go/developerkb and search for the keyword ServiceRouting API.
CoverageStatusListener
,
RadioInfo
Field Summary | ||
---|---|---|
static int |
COVERAGE_BIS_B
Flag indicating the device has sufficient coverage for HTTP over IPPP via Public MDS connection type. |
|
static int |
COVERAGE_DIRECT
Flag indicating the device has sufficient coverage for the following connection types: Direct HTTP / TCP via WiFi, wireless service provider IP gateway, or HTTP over WAP via WAP Gateway Direct User Datagram Protocol (UDP) via wireless service provider, ASP gateway or via WiFi |
|
static int |
COVERAGE_MDS
Flag indicating the device has sufficient coverage for HTTP over IPPP via BlackBerry Enterprise Server/BlackBerry MDS connection type. |
|
static int |
COVERAGE_NONE
Flag indicating the device does not have sufficient coverage for any connection types. |
Method Summary | ||
---|---|---|
static void |
addListener(Application app,
CoverageStatusListener listener)
Adds a listener for changes in coverage status. |
|
static void |
addListener(CoverageStatusListener listener)
Adds a listener for changes in coverage status. |
|
static int |
getCoverageStatus()
Retrieves the current coverage status over all supported WAFs as well as serial bypass/Bluetooth. |
|
static int |
getCoverageStatus(int wafs,
boolean considerSerialBypass)
Retrieves the current coverage status over the specified WAFs and/or serial bypass/Bluetooth. |
|
static boolean |
isCoverageSufficient(int coverageType)
Determines whether or not the device currently has the type of coverage specified by coverageType , over any available routes. |
|
static boolean |
isCoverageSufficient(int coverageType,
int wafs,
boolean considerSerialBypass)
Determines whether or not the device currently has the type of coverage specified by coverageType , over the provided WAFs and/or serial bypass/Bluetooth. |
|
static boolean |
isOutOfCoverage()
Determines whether or not the device is completely out of coverage over all available routes. |
|
static boolean |
isOutOfCoverage(int wafs,
boolean considerSerialBypass)
Determines whether or not the device is completely out of coverage over the provided WAFs and/or serial bypass/Bluetooth. |
|
static void |
removeListener(Application app,
CoverageStatusListener listener)
Removes listener from the provided application's list of
listeners. |
|
static void |
removeListener(CoverageStatusListener listener)
Removes listener from the calling application's list of
listeners. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int COVERAGE_NONE
public static final int COVERAGE_DIRECT
public static final int COVERAGE_MDS
public static final int COVERAGE_BIS_B
Method Detail |
---|
public static void addListener(CoverageStatusListener listener)
listener
, then this method does nothing.
listener
- Listener for changes in coverage status.
NullPointerException
- if listener
is null
.
IllegalStateException
- if this method is called when there is no
Application object in the calling process.public static void addListener(Application app, CoverageStatusListener listener)
listener
, then this method does nothing.
app
- The application whose event thread will process the notifications sent to listener
.listener
- Listener for changes in coverage status.
NullPointerException
- if app
or listener
is null
.public static void removeListener(CoverageStatusListener listener)
listener
from the calling application's list of
listeners. If listener
is null or is not on the calling
application's list of listeners, then this method does nothing.
listener
- Listener for changes in coverage status.
IllegalStateException
- If this method is called when there is no
Application object in the calling process.public static void removeListener(Application app, CoverageStatusListener listener)
listener
from the provided application's list of
listeners. If the listener is null or is not on the provided
application's list of listeners, then this method does nothing.
app
- The application whose event thread is to no longer process the notifications sent to listener
.listener
- Listener for changes in coverage status.
NullPointerException
- if app
is null
.public static int getCoverageStatus()
CoverageInfo.getCoverageStatus(int,boolean)
.
COVERAGE_*
flags.public static int getCoverageStatus(int wafs, boolean considerSerialBypass)
wafs
- A bitmask of RadioInfo.WAF_*
flags representing the WAFs that
should be considered when checking the current coverage status.considerSerialBypass
- If true
, the serial bypass/Bluetooth should
be considered when checking the current coverage status, if false
it should not.
COVERAGE_*
flags.public static boolean isCoverageSufficient(int coverageType)
coverageType
, over any available routes. To obtain the coverage
status over a restricted set of routes, use CoverageInfo.isCoverageSufficient(int,int,boolean)
.
If coverageType
is COVERAGE_NONE
, this method always
returns false
.
coverageType
- One of the COVERAGE_*
flags.
true
if the device has the type of coverage specified by coverageType
over some available route; false
otherwise.
IllegalArgumentException
- if coverageType
is not one of the COVERAGE_*
flags.public static boolean isCoverageSufficient(int coverageType, int wafs, boolean considerSerialBypass)
coverageType
, over the provided WAFs and/or serial bypass/Bluetooth.
If coverageType
is COVERAGE_NONE
, this method always
returns false
.
coverageType
- One of the COVERAGE_*
flags.wafs
- A bitmask of RadioInfo.WAF_*
flags representing the set of WAFs to
consider when determining coverage.considerSerialBypass
- If true
, the serial bypass/Bluetooth should
be considered when checking the current coverage status, if false
it should not.
true
if the device has the type of coverage specified by coverageType
over the specified WAFs; false
otherwise.
IllegalArgumentException
- if coverageType
is not one of the COVERAGE_*
flags.public static boolean isOutOfCoverage()
CoverageInfo.isOutOfCoverage(int,boolean)
.
true
if the device does not have sufficient coverage for any connection types
over any available routes; false
otherwise.public static boolean isOutOfCoverage(int wafs, boolean considerSerialBypass)
wafs
- Bitmask of RadioInfo.WAF_*
constants representing the set of WAFs
to consider for being out of coverage.considerSerialBypass
- If true
, consider serial bypass/Bluetooth for determining
if the device is out of coverage, if false
it should not.
true
if the device does not have sufficient coverage for any connection
types over the provided WAFs and serial bypass/Bluetooth; false
otherwise.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal