|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object OEM com.motorola.oem.network.Network
public class Network
Provides control over the Network features.Most of the Network class service methods are
static
and may be used w/o creating an object.
Field Summary | |
---|---|
static int |
CLIP_SS_STATUS_ACTIVE_UNKNOWN
|
static int |
CLIP_SS_STATUS_CONFLICT
|
static int |
CLIP_SS_STATUS_ERROR
|
static int |
CLIP_SS_STATUS_NO_CONFLICT
|
static int |
CLIP_SS_STATUS_NOT_ACTIVE
|
static int |
CLIP_SS_STATUS_NOT_SUBSCRIBED
|
static int |
CLIP_SS_STATUS_UNKNOWN
|
static int |
CLIR_SUBSCRIP_ALLOW
|
static int |
CLIR_SUBSCRIP_ERROR
|
static int |
CLIR_SUBSCRIP_NOT_SPECIFIED
|
static int |
CLIR_SUBSCRIP_PERMANENT
|
static int |
CLIR_SUBSCRIP_RESTRICT
|
static int |
COVERAGE_EDGE
Packet Switch Coverage Status. |
static int |
COVERAGE_GPRS
Packet Switch Coverage Status. |
static int |
COVERAGE_NO_GPRS
Packet Switch Coverage Status. |
static int |
COVERAGE_UNDEFINED
Packet Switch Coverage Status. |
static int |
GPRS_STATE_NOT_REG_NOT_SEARCH
GPRS Network service is neither registered nor Searching for an operator. |
static int |
GPRS_STATE_NOT_REG_SEARCH
GPRS Network service is NOT registered, but is still searching for network. |
static int |
GPRS_STATE_REG_DENIED
GPRS Network service is NOT registered - Registration denied. |
static int |
GPRS_STATE_REG_HOME
GPRS Network service is registered to its home network. |
static int |
GPRS_STATE_REG_ROAM
GPRS Network service is registered, Roaming. |
static int |
GPRS_STATE_UNKNOWN
GPRS Network service availability is Unknown. |
static int |
GSM_STATE_NOT_REG_NOT_SEARCH
GSM Network service is neither registered nor Searching for a network. |
static int |
GSM_STATE_NOT_REG_SEARCH
GSM Network service is NOT registered, but is still searching for network. |
static int |
GSM_STATE_REG_DENIED
GSM Network service is NOT registered - Registration denied. |
static int |
GSM_STATE_REG_HOME
GSM Network service is registered to its home network. |
static int |
GSM_STATE_REG_ROAM
GSM Network service is registered, Roaming. |
static int |
GSM_STATE_UNKNOWN
GSM Network service availability is Unknown. |
Method Summary | |
---|---|
static void |
addOperatorNumericNameToPreferredList(java.lang.String numericName,
int insertIndex)
Add a new Network to the Preferred Operators' List |
static void |
deleteOperatorFromPreferredList(int deleteIndex)
Deletes a Network from the Preferred Operators' List |
java.lang.String[] |
getAvailableNetworks(int format)
Gets Available Networks. |
java.lang.String |
getCellID()
Gets the current network cell's ID. |
java.lang.String |
getCellLAC()
Gets the current network cell's Location Area Code. |
static int |
getGPRSRegState()
Gets the current GPRS service registration's state. |
static int |
getGSMRegState()
Get the current GSM service registration's state. |
static Network |
getInstance()
Returns a reference to the class's single instance. |
int |
getLineIdPresentationStatus()
Gets the Calling Line ID Presentation status(CLIP) from the network. |
int[] |
getLineIdRestrictionStatus()
Gets the Calling Line ID Restriction status(CLIR) from the network. |
static java.lang.String |
getNITZClock()
Gets Network's Clock - date, time and signed time zone. |
static java.lang.String |
getOperatorNameAlpha()
Gets the selected network operator name in alpha numeric format. |
static java.lang.String |
getOperatorNameNumeric()
Gets the selected network operator PLMN code. |
static int |
getPacketSwitchCoverage()
Gets Packet Switch Coverage status |
static java.lang.String[] |
getPreferredOperatorsListInAlphaNames()
Gets Networks Alpha names from Preferred Operators' list. |
static int |
getPreferredOperatorsListMaximalLimit()
Gets the maximum number of PLMNs in Preferred List can be stored in SIM. |
static int |
getSignalStrengthBER()
Gets the Bit Error Rate (BER) of the device. |
static int |
getSignalStrengthRSSI()
Gets the value for Received Signal Strength Indication (RSSI) from the device. |
static void |
manualOperatorSelect(java.lang.String operatorName,
int nameFormat)
Selects a new operator This is a Network request and needs no confirmation answer. |
NetworkUSSDResponseData |
sendUSSD(java.lang.String stringToSend)
Deprecated. replaced by NetworkUSSD.sendUSSD(String) . |
static void |
setLineIdRestriction(int n)
Sets the Calling Line ID Restriction status (Enable/Disable). |
void |
setNetworkCellInfoListener(NetworkCellInfoListener networkCellInfoListener)
Sets a listener for cell information changes. |
void |
setNetworkRegistrationListener(NetworkRegistrationListener networkRegistrationListener)
Sets a listener for GSM/GPRS network registration state changes. |
void |
setNetworkSignalListener(NetworkSignalListener networkSignalListener)
Sets a listener for signal strength level changes. |
void |
terminateUSSD()
Deprecated. replaced by NetworkUSSD.terminateUSSD() . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CLIP_SS_STATUS_NOT_SUBSCRIBED
public static final int CLIP_SS_STATUS_NOT_ACTIVE
public static final int CLIP_SS_STATUS_CONFLICT
public static final int CLIP_SS_STATUS_NO_CONFLICT
public static final int CLIP_SS_STATUS_ACTIVE_UNKNOWN
public static final int CLIP_SS_STATUS_UNKNOWN
public static final int CLIP_SS_STATUS_ERROR
public static final int CLIR_SUBSCRIP_NOT_SPECIFIED
public static final int CLIR_SUBSCRIP_PERMANENT
public static final int CLIR_SUBSCRIP_RESTRICT
public static final int CLIR_SUBSCRIP_ALLOW
public static final int CLIR_SUBSCRIP_ERROR
public static final int COVERAGE_NO_GPRS
public static final int COVERAGE_GPRS
public static final int COVERAGE_EDGE
public static final int COVERAGE_UNDEFINED
public static final int GSM_STATE_NOT_REG_NOT_SEARCH
public static final int GSM_STATE_REG_HOME
public static final int GSM_STATE_NOT_REG_SEARCH
public static final int GSM_STATE_REG_DENIED
public static final int GSM_STATE_UNKNOWN
public static final int GSM_STATE_REG_ROAM
public static final int GPRS_STATE_NOT_REG_NOT_SEARCH
public static final int GPRS_STATE_REG_HOME
public static final int GPRS_STATE_NOT_REG_SEARCH
public static final int GPRS_STATE_REG_DENIED
public static final int GPRS_STATE_UNKNOWN
public static final int GPRS_STATE_REG_ROAM
Method Detail |
---|
public static Network getInstance() throws NetworkException
NetworkException
- Failed to construct the Network object.public static int getGSMRegState()
GSM_STATE_NOT_REG_NOT_SEARCH
,
GSM_STATE_REG_HOME
,
GSM_STATE_NOT_REG_SEARCH
,
GSM_STATE_REG_DENIED
,
GSM_STATE_UNKNOWN
,
GSM_STATE_REG_ROAM
.public static int getGPRSRegState()
GPRS_STATE_NOT_REG_NOT_SEARCH
,
GPRS_STATE_REG_HOME
,
GPRS_STATE_NOT_REG_SEARCH
,
GPRS_STATE_REG_DENIED
,
GPRS_STATE_UNKNOWN
,
GPRS_STATE_REG_ROAM
.public java.lang.String getCellLAC()
public java.lang.String getCellID()
public static int getSignalStrengthRSSI()
[0 through 31] - Cover the range of -113 dbm (or less) to -51dbm (or greater)
public static int getSignalStrengthBER()
Channel bit error rate (in percent)
public static java.lang.String getOperatorNameAlpha() throws NetworkException
NetworkException
- Illegal operator name(error code NetworkException.ILLEGAL_OPEARTOR_NAME_ERROR
)public static java.lang.String getOperatorNameNumeric() throws NetworkException
NetworkException
- Illegal operator name (error code NetworkException.ILLEGAL_OPEARTOR_NAME_ERROR
)public int getLineIdPresentationStatus() throws NetworkException
CLIP_SS_STATUS_NOT_SUBSCRIBED
,
CLIP_SS_STATUS_NOT_ACTIVE
,
CLIP_SS_STATUS_CONFLICT
,
CLIP_SS_STATUS_NO_CONFLICT
,
CLIP_SS_STATUS_ACTIVE_UNKNOWN
,
CLIP_SS_STATUS_UNKNOWN
,
CLIP_SS_STATUS_ERROR
NetworkException
- Platform failure(error code NetworkException.UNABLE_REGISTER_CNF_EVENT_ERROR
)
NetworkException
- Platform failure(error code NetworkException.INVALID_ACQUIRE_HANDLER_ERROR
)
NetworkException
- Illegal CLIP SS Identifier(error code NetworkException.ILLEGAL_CLIP_SS_ID_ERROR
)
NetworkException
- No network service(error code NetworkException.CLIP_NO_NETWORK_ERROR
)
NetworkException
- Synchronization failurepublic int[] getLineIdRestrictionStatus() throws NetworkException
CLIR_SUBSCRIP_NOT_SPECIFIED
CLIR_SUBSCRIP_PERMANENT
CLIR_SUBSCRIP_RESTRICT
CLIR_SUBSCRIP_ALLOW
CLIR_SUBSCRIP_ERROR
NetworkException
- Platform failure(error code NetworkException.UNABLE_REGISTER_CNF_EVENT_ERROR
)
NetworkException
- Platform failure(error code NetworkException.INVALID_ACQUIRE_HANDLER_ERROR
)
NetworkException
- Illegal CLIR SS Identifier(error code NetworkException.ILLEGAL_CLIR_SS_ID_ERROR
)
NetworkException
- Synchronization failurepublic static void setLineIdRestriction(int n) throws NetworkException
n
- NetworkException
- Storing 'n' in memory has failed(error code NetworkException.CLIR_MEMORY_ERROR
)public static java.lang.String getNITZClock() throws NetworkException
NetworkException
- Clock is not defined(error code NetworkException.CLOCK_ERROR
)public static int getPreferredOperatorsListMaximalLimit() throws NetworkException
NetworkException
- Getting SIM Preferred Operators' list maximal limit failed(error code NetworkException.GET_PREFERRED_LIST_ERROR
)public static java.lang.String[] getPreferredOperatorsListInAlphaNames() throws NetworkException
NetworkException
- Getting SIM Preferred Operators' list failed(error code NetworkException.GET_PREFERRED_LIST_ERROR
)public static void addOperatorNumericNameToPreferredList(java.lang.String numericName, int insertIndex) throws NetworkException
numericName
- String value of new network in Numeric formatinsertIndex
- Index of the new operator in the list. (from 1 to number of operators, allowed by SIM)
NetworkException
- Adding to SIM Preferred Operators list syntax error(error code NetworkException.ADD_TO_PREFERRED_LIST_SYNTAX_ERROR
)
NetworkException
- Adding to SIM Preferred Operators list failed(error code NetworkException.ADD_TO_PREFERRED_LIST_FAIL_ERROR
)
NetworkException
- Adding to SIM Preferred Operators list - invalid index(error code NetworkException.ADD_TO_PREFERRED_LIST_INDEX_ERROR
)public static void deleteOperatorFromPreferredList(int deleteIndex) throws NetworkException
deleteIndex
- Index of the deleted operator in the list. (from 1 to number of operators, allowed by SIM)
NetworkException
- Deleting from SIM Preferred Operators list failed(error code NetworkException.DELETE_FROM_PREFERRED_LIST_FAIL_ERROR
)
NetworkException
- Deleting from SIM Preferred Operators list - invalid index(error code NetworkException.DELETE_FROM_PREFERRED_LIST_INDEX_ERROR
)public static void manualOperatorSelect(java.lang.String operatorName, int nameFormat) throws NetworkException
operatorName
- string numeric name of operator to be selectednameFormat
- 0 - alpha format, 1 - numeric format
NetworkException
- Call state is not IDLE(error code NetworkException.OP_SELECT_CALL_STATE_INVALID_ERROR
)
NetworkException
- No network service(error code NetworkException.OP_SELECT_NO_NETWORK_ERROR
)
NetworkException
- Invalid registation state(error code NetworkException.OP_SELECT_INVALID_REG_STATE_ERROR
)
NetworkException
- Wrong name of operator(error code NetworkException.OP_SELECT_INVALID_NAME_ERROR
)
NetworkException
- Wrong operator format(error code NetworkException.OP_SELECT_UNKNOWN_FORMAT_ERROR
)public java.lang.String[] getAvailableNetworks(int format) throws NetworkException
Important Note: This method will block the thread until it receives back a notification. If this method is called from inside a listener's implementation, it must be done in a separate thread.
format
- Presentation format of requested networks: 0 - Alpha, 1 - Numeric.
NetworkException
- Platform failure(error code NetworkException.UNABLE_REGISTER_CNF_EVENT_ERROR
)
NetworkException
- Platform failure(error code NetworkException.INVALID_ACQUIRE_HANDLER_ERROR
)
NetworkException
- Invalid registration state(error code NetworkException.GET_AVAIL_NET_INVALID_REG_STATE_ERROR
)
NetworkException
- Wrong opeartor format(error code NetworkException.GET_AVAIL_NET_WRONG_FORMAT_ERROR
)
NetworkException
- Network busy(error code NetworkException.GET_AVAIL_NET_BUSY_ERROR
)
NetworkException
- Synchronization failurepublic static int getPacketSwitchCoverage() throws NetworkException
COVERAGE_NO_GPRS
,
COVERAGE_GPRS
,
COVERAGE_EDGE
,
COVERAGE_UNDEFINED
NetworkException
- Undefined coverage(error code NetworkException.GET_PACKET_SWITCH_ERROR
)public NetworkUSSDResponseData sendUSSD(java.lang.String stringToSend) throws NetworkException
NetworkUSSD.sendUSSD(String)
.
Important Note: This method will block the thread until it receives back a notification.
If this method is called from inside a listener's implementation, it must be done in a separate thread.
It is prohibited to use this method and NetworkUSSD.sendUSSD(java.lang.String, byte)
method at the same time in the code.
stringToSend
- Sontains the USSD command sent to the network
NetworkUSSDResponseData
Contains relevant network response data
NetworkException
- Unable to register CLIR confirmation event(error code NetworkException.UNABLE_REGISTER_CNF_EVENT_ERROR
)
NetworkException
- Unable to acquire confirmation handler(error code NetworkException.INVALID_ACQUIRE_HANDLER_ERROR
)
NetworkException
- Request string syntax error(error code NetworkException.USSD_ERROR
)
NetworkException
- Synchronization failure
NetworkException
- Platform failure(error code NetworkException.UNABLE_REGISTER_CNF_EVENT_ERROR
)
NetworkException
- Platform failure(error code NetworkException.INVALID_ACQUIRE_HANDLER_ERROR
)
NetworkException
- Request string syntax error(error code NetworkException.USSD_ERROR
)
NetworkException
- Synchronization failurepublic void terminateUSSD()
NetworkUSSD.terminateUSSD()
.
public void setNetworkRegistrationListener(NetworkRegistrationListener networkRegistrationListener)
Sets a listener for GSM/GPRS network registration state changes.
NetworkRegistrationListener.onGSMRegStateChanged(int)
or
NetworkRegistrationListener.onGPRSRegStateChanged(int)
will be called upon a GSM/GPRS network registration state change accordingly.
public void setNetworkSignalListener(NetworkSignalListener networkSignalListener)
Sets a listener for signal strength level changes.
NetworkSignalListener.onSignalStrengthLevelChanged(int, int)
will be called upon a signal strength level change.
public void setNetworkCellInfoListener(NetworkCellInfoListener networkCellInfoListener)
Sets a listener for cell information changes.
NetworkCellInfoListener.onCellInfoChanged(int, int)
will be called upon a cell information change.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |