public abstract class

FourGManager

extends Object
java.lang.Object
   ↳ com.htc.net.FourG.FourGManager
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

This class provides the primary API for managing all aspects of Wi-Fi connectivity. Get an instance of this class by calling Context.getSystemService(Context.WIFI_SERVICE). It deals with several categories of items:

  • The list of configured networks. The list can be viewed and updated, and attributes of individual entries can be modified.
  • The currently active Wi-Fi network, if any. Connectivity can be established or torn down, and dynamic information about the state of the network can be queried.
  • Results of access point scans, containing enough information to make decisions about what access point to connect to.
  • It defines the names of various Intent actions that are broadcast upon any sort of change in Wi-Fi state.
This is the API to use when performing Wi-Fi specific operations. To perform operations that pertain to network connectivity at an abstract level, use ConnectivityManager.

Summary

Nested Classes
class FourGManager.ConnectionStatistics This class provides access to connection related information related to the current overall performance data communications between the Mobile Station and the serving Base Station. 
class FourGManager.FourGLock When an application is holding this lock, the application is indicating to the 4G Manager that the 4G radio should stay enabled. 
class FourGManager.QosServiceFlowControl This class provides access to and control of the potential QoS service flows between the Mobile Station and the serving Base Station. 
class FourGManager.RadioInfoTemperature This class returns information about operating temperatures of the 4G radio  
enum FourGManager.RtdRequestedSpec Enum used with method startNeighborListScan( boolean wideScan , RtdRequestedSpec rtdSpec , Boolean dataSessionInterruptionAllowed  
Constants
String CINR_CHANGED_ACTION The CINR (signal strength) has changed.
int ERROR_ALREADY_CONNECTED Error code indicating that seen from call to getLastError() indicating that the MS is already connected to a serving BS, in situations where the calling application has called reconnect() or connectDefaultNetwork() when a active connection already is established.
int ERROR_AUTHENTICATING Error code indicating that there was a problem authenticating.
int ERROR_DEVICE_NOT_PROVISIONED Error code typically seen from call to getLastError() indicating that the dev ice has not been provisioned and 4G operation is not possible
int ERROR_DEVICE_PROVISIONING_DATA_ERROR Error code typically seen from call to getLastError() indicating that the dev ice has been provisioned but there is a detectable error in the provisioning data and thus 4G operation is not possible
int ERROR_INVALID_DEVICE_PROFILE Error code typically seen from call to getLastError() broadly indicating that the dev ice profile is invalid and 4G operation is not possible
int ERROR_NO_COVERAGE_AVAILABLE Error code typically seen from call to getLastError() indicating that no coverage is available to the MS.
int ERROR_OPERATION_ALREADY_IN_PROGRESS Error code typically seen from call to getLastError() indicating that the MS is already in progress executing a previously initiated function
int ERROR_OPERATION_NOT_ALLOWED Error code typically seen from call to getLastError() indicating that the User Equirpment implementation does not allow the particular operation at this application interface.
int ERROR_RADIO_OFF Error code typically seen from call to getLastError() indicating that the MS 4G radio is off, having been disabled in a control panel and/or by a physical switch
int ERROR_RADIO_POLICY_VIOLATION Error code typically seen from call to getLastError() indicating that the MS has detected a radio policy violation.
int ERROR_ROAMING_NOT_ALLOWED Error code typically seen from call to getLastError() indicating that roaming is not supported at this time.
int ERROR_SCAN_NOT_ALLOWED_NOW_NETWORK_IMPACTS Error code indicating that a scan was not begin as there is a (typically) transient condition in the network that would be problematic for network operations if a MS initialed scan was executed at this time
int ERROR_SCAN_NOT_ALLOWED_NOW_NETWORK_MGMT_PROHIBITED Error code indicating that the requested scan was not initiated as there is policy in place where the network, possibly via OMA-DM, prohibits the specific scan operation at this time.
int ERROR_SCAN_NOT_ALLOWED_NOW_UE_DATA_XFER_IMPACTS Error code indicating that a scan was not begun as the scan would disrupt on-going data transports.
String EXTRA_4G_CURRENT_SERVING_BS The lookup key for a FourGBaseStationInfo describing the now serving BS Station.
String EXTRA_4G_INFO The lookup key for the RAN-specific subclass of FourGInfo, describing the current User Equipment <-> base station connection, when a Intent is received.
String EXTRA_4G_PREVIOUS_SERVING_BS The lookup key for a FourGBaseStationInof describing the previous serving BS Station.
String EXTRA_4G_STATE The lookup key for an int that indicates the current 4G "enabled" state, describing if 4G is enabled, disabled, enabling, disabling, or unknown Retrieve it with getIntExtra(String, int).
String EXTRA_CURRENT_RADIO_TEMPERATURE The lookup key for the current radio temperature in Celsius.
String EXTRA_DOWNLINK_MODULATION The lookup key for a Four4BaseStateionInfo.eNET_4G_MODULATION
String EXTRA_DOWNLINK_THROUGHPUT The lookup key for an int representing downlink throughput in LINK_SPEED_UNITS
String EXTRA_HANDOVER_FAILURE_REASON The lookup key for a enum FourGInfo.LINK_STATE_REASON that indicates the reason why a BAse Station to Base Station handover failed.
String EXTRA_LINK_STATE_DETAIL The lookup key for a FourGInfo.LINK_STATE_DETAIL
String EXTRA_NETWORK_INFO The lookup key for a NetworkInfo object associated with the 4G network.
String EXTRA_NEW_4G_STATE The lookup key for a FourGSupplicantState describing the new state Retrieve with getParcelableExtra(String).
String EXTRA_NEW_CINR The lookup key for an int giving the new CINR in dB.
String EXTRA_NEW_RSSI The lookup key for an int giving the new RSSI in dBm.
String EXTRA_PREVIOUS_4G_STATE The lookup key for an int that indicates the previous 4G "enabled" state, describing if 4G is enabled, disabled, enabling, disabling, or unknown.
String EXTRA_SCAN_RESULT_BS_LIST The lookup key for the list of base station found after a scan has completed.
String EXTRA_SERVICE_FLOW The lookup key for the QosServiceFlowDescriptor
String EXTRA_SF_SCHEDULING_CLASS The lookup key for the new SF_SCHEDULING_CLASS
String EXTRA_SF_STATE The lookup key for the new SF_STATE
String EXTRA_SUPPLICANT_ERROR The lookup key for a FourGSupplicantState describing the supplicant error code if any.
String EXTRA_UPLINK_MODULATION The lookup key for a Four4BaseStateionInfo.eNET_4G_MODULATION
String EXTRA_UPLINK_THROUGHPUT The lookup key for an int representing uplink throughput in LINK_SPEED_UNITS
String KEY_CINR_CHANGED Key used for the Bundle extra holding a boolean indicating that the Intent is a CINR changed alert.
String KEY_CINR_DELTA_THRESHOLD Key used for the single Bundle extra, in an "CINR changed" alert Intent, to access a boolean which, if true, indicates that the Intent was fired based on the occurrence of an CINR change that exceeded the previous specified "CINR changed" by more that the minDelta threshold valuee.
String KEY_CINR_MAX_THRESHOLD Key used for the single Bundle extra, in an "CINR changed" alert Intent, to access an int which, if not equal to Integer.MAX_VALUE, indicates that the Intent was fired based on the occurrence of an CINR change, where, at some time during the alert minDelta peroid, the new CINR value was below the previously specifed "CINR maximum absolute" threshold value ceilingValue.
String KEY_CINR_MIN_THRESHOLD Key used for the single Bundle extra, in an "CINR changed" alert Intent, to access an int which, if not equal to Integer.MIN_VALUE, indicates that the Intent was fired based on the occurrence of an CINR change, where, at some time during the alert minDelta peroid, the new CINR value was below the previously specifed "CINR minimum absolute" threshold value floorValue.
String KEY_CINR_PERIODIC_ALERT Key used for the single Bundle extra, in an "CINR changed" alert Intent, to access a boolean which, if true, indicates that the Intent was fired based on the occurrence of an CINR change, and the previously specified minimum reporting time period has passed.
String KEY_NEW_CINR Key used for the single Bundle extra, in an "CINR changed" alert Intent, to access an int which is the new CINR value.
String KEY_NEW_RSSI Key used for the single Bundle extra, in an "RSSI changed" alert Intent, to access an int which is the new RSSI value.
String KEY_RSSI_CHANGED Key used for the Bundle extra holding a boolean indicating that the Intent is a RSSI changed alert.
String KEY_RSSI_DELTA_THRESHOLD Key used for the single Bundle extra, in an "RSSI changed" alert Intent, to access a boolean which, if true, indicates that the Intent was fired based on the occurrence of an RSSI change that exceeded the previous specified "RSSI changed" by more that the minDelta threshold valuee.
String KEY_RSSI_MAX_THRESHOLD Key used for the single Bundle extra, in an "RSSI changed" alert Intent, to access an int which, if not equal to Integer.MAX_VALUE, indicates that the Intent was fired based on the occurrence of an RSSI change, where, at some time during the alert minDelta peroid, the new RSSI value was below the previously specifed "RSSI maximum absolute" threshold value ceilingValue.
String KEY_RSSI_MIN_THRESHOLD Key used for the single Bundle extra, in an "RSSI changed" alert Intent, to access an int which, if not equal to Integer.MIN_VALUE, indicates that the Intent was fired based on the occurrence of an RSSI change, where, at some time during the alert minDelta peroid, the new RSSI value was below the previously specifed "RSSI minimum absolute" threshold value floorValue.
String KEY_RSSI_PERIODIC_ALERT Key used for the single Bundle extra, in an "RSSI changed" alert Intent, to access a boolean which, if true, indicates that the Intent was fired based on the occurrence of an RSSI change, and the previously specified minimum reporting time period has passed.
String LINK_MODULATION_CHANGED_ACTION Broadcast intent action indicating that the modulation on the 4G radio link state has changed.
String LINK_STATE_DETAIL_CHANGED_ACTION Broadcast intent action indicating that the state of 4G detailed link state has changed.
int LOG_DEBUG
int LOG_ERROR
int LOG_FATAL log Levels
int LOG_WARNING
String NETWORK_IDS_CHANGED_ACTION The network IDs of the configured networks could have changed.
String NETWORK_STATE_CHANGED_ACTION Broadcast intent action indicating that the state of 4G connectivity has changed.
String NET_4G_HANDOVER_COMPLETE_ACTION Broadcast intent action indicating that the 4G serving Base Station (BS) has changed.
String NET_4G_HANDOVER_FAILED_ACTION Broadcast intent action indicating that the handover between 4G serving Base Station has failed.
String NET_4G_RADIO_OVERHEAT_ACTION Broadcast intent action indicating that the 4G radio has overheated.
String NET_4G_STATE_CHANGED_ACTION Broadcast intent action indicating that the 4G "enabled" state (enabled, disabled, enabling, disabling, or unknown) has changed.
int NET_4G_STATE_DISABLED 4G is disabled
int NET_4G_STATE_DISABLING 4G is being disabled
int NET_4G_STATE_ENABLED 4G is enabled
int NET_4G_STATE_ENABLING 4G is being enabled
int NET_4G_STATE_UNKNOWN 4G is in an unknown state
String QOS_SERVICE_FLOW_MODIFIED_ACTION Broadcast intent action indicating that the state of 4G service flow has been modified by a change in serving BS, by the serving BS, etc.
String QOS_SERVICE_FLOW_STATE_CHANGE_ACTION Broadcast intent action indicating that the state of a 4G service flow has made a state transition.
String RSSI_CHANGED_ACTION The RSSI (signal strength) has changed.
String SCAN_RESULTS_AVAILABLE_ACTION A scan has completed, and result are available.
String SUPPLICANT_STATE_CHANGED_ACTION Broadcast intent action indicating that the state of establishing a connection to a Base Station has changed.
int maxCINR
int maxRSSI
int minCINR
int minRSSI defined for singal calculation
Fields
protected FourGInfo.LINK_STATE_REASON disconnectReason
protected boolean isRoaming
protected ThreadLocal<Integer> lastError
protected int logLevel
Public Constructors
FourGManager()
Public Methods
int addNetwork(FourGConfiguration config)
Add a network description to the set of configured networks.
static int calculateSignalLevel(int rssi, int cinr, int numLevels)
Calculates an ordinal number for signal level between 0 and numLevelsm mapping rssi in dBm, and/or cinr in dB, to a single dimensionless number.
static int calculateSignalLevel(int rssi, int numLevels)
Calculates an ordinal number for singal level between 0 and numLevels, mapping rssi, in dBm, to a single dimensionless number.
static int compareSignalLevel(int rssiA, int rssiB)
Compares two signal strengths.
int connectDefaultNetwork()
Connect to the current default ("home") network(s) using the default MS credentials.
static int copmareCinrLevel(int cinrA, int cinrB)
Compares two signal qualities.
FourGManager.ConnectionStatistics createConnectionStatistics()
Get the upload/download statistics object for the current connection session.
FourGManager.FourGLock createFourGLock(String tag)
Creates a new FourGManager.Lock.
abstract FourGManager.QosServiceFlowControl createQosServiceFlowControl()
Create a new QoS control object for the 4G radio subsystem.
boolean disableNetwork(int netId)
The specified network will not be candidate for MS association/connection.
boolean disconnect()
Disassociate from the connected network and go to disconnected state.
void enableLogLevel(int logLevel)
Enable logLevel in the Java/JNI and 'C' driver level.
boolean enableNetwork(int netId, boolean disableOthers)
Allow a previously configured network to be associated with.
int get4GState()
Returns the 4G enabled state, one of NET_4G_STATE_DISABLED, NET_4G_STATE_DISABLING, NET_4G_STATE_ENABLED, NET_4G_STATE_ENABLING, NET_4G_STATE_UNKNOWN
abstract List<FourGConfiguration> getAvailableNetworks()
Return the available networks to connect.
abstract List<FourGConfiguration> getConfiguredDefaultNetworks()
Return a list of only those networks configured in the supplicant via means outside of this API, e.g.
abstract List<FourGConfiguration> getConfiguredNetworks()
Return a list of al the networks configured in the supplicant.
abstract FourGInfo getConnectionInfo()
Get the information about the currently connected network and base station, if any.
DeviceInfo getDeviceInformation()
Get the information about the 4G radio device on the system.
DhcpInfo getDhcpInfo()
Return the DHCP-assigned addresses from the last successful DHCP request, if any.
FourGInfo.LINK_STATE_REASON getDisconnectReason()
Returns the last disconnect reason.
int getLastError()
Return the error code associated with the last operation.
FourGManager.RadioInfoTemperature getRadioInfoTemperature()
This method returns an object that encapsulates information aboud the radio attributes such as radio temp etc.
abstract List<FourGBaseStationInfo> getScanResults()
Return the list of base stations from either the latest API initiated network scan and as may have been gathered as the result of other implementation-interanl, network management operations.
int getScanResultsAge()
Returns number of milliseconds since the base station scan list available from getScanResults() was last compiled.
boolean is4GEnabled()
Return whether 4G is enabled or disabled.
boolean isRoamingEnabled()
Return whether network roaming is enabled or disable.
boolean reassociate()
Reconnect to the currently active network, even if we are already connected.
boolean reconnect()
Reconnect to the currently active network, even if we are currently disconnected.
void removeCinrAlert(PendingIntent intent)
Removes the CINR alert with the PendingIntent intent.
boolean removeNetwork(int netId)
Remove the specified network from the list of configured networks.
void removeRssiAlert(PendingIntent intent)
Removes the RSSI alert with the PendingIntent intent.
void requestCinrAlerts(int minTime, int minDelta, int floorValue, int ceilingValue, PendingIntent intent)
Registers the current activity to be notified periodically and/or when CINR has chagned enough to match the alert criteria as defined by the various parameters, with the spplied PendingIntent being broadcast with current CINR.
void requestRssiAlerts(int minTime, int minDelta, int floorValue, int ceilingValue, PendingIntent intent)
Registers the current activity to be notified periodically and/or when RSSI has chagned enough to match the alert criteria as defined by the various parameters, with the spplied PendingIntent being broadcast with current RSSI.
boolean saveConfiguration()
Tell the supplicant to persist the current list of configured networks, configured with this API.
boolean set4GEnabled(boolean enabled)
Turns the 4G radio on or off.
boolean setRoamingEnabled(boolean enabled)
Enables connection to roaming partner NSPs or disables such roaming.
int startNeighborListScan(boolean wideScan, FourGManager.RtdRequestedSpec rtdSpec, boolean dataSessionInterruptionAllowed)
Initiates various radio base station scanning modes.
boolean updateNetwork(FourGConfiguration config)
Update the network description of an existing configured network.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String CINR_CHANGED_ACTION

The CINR (signal strength) has changed. For 4G, it is likely that RSSI may also have changed.

Constant Value: "com.htc.net.FourG.CINR_CHANGED"

public static final int ERROR_ALREADY_CONNECTED

Error code indicating that seen from call to getLastError() indicating that the MS is already connected to a serving BS, in situations where the calling application has called reconnect() or connectDefaultNetwork() when a active connection already is established.

Constant Value: -5 (0xfffffffb)

public static final int ERROR_AUTHENTICATING

Error code indicating that there was a problem authenticating. For 4G networks, this is the error that represents any network authentication error. (4G implementation detail note: Same name and value as WifiManager)

Constant Value: -1 (0xffffffff)

public static final int ERROR_DEVICE_NOT_PROVISIONED

Error code typically seen from call to getLastError() indicating that the dev ice has not been provisioned and 4G operation is not possible

Constant Value: -8 (0xfffffff8)

public static final int ERROR_DEVICE_PROVISIONING_DATA_ERROR

Error code typically seen from call to getLastError() indicating that the dev ice has been provisioned but there is a detectable error in the provisioning data and thus 4G operation is not possible

Constant Value: -9 (0xfffffff7)

public static final int ERROR_INVALID_DEVICE_PROFILE

Error code typically seen from call to getLastError() broadly indicating that the dev ice profile is invalid and 4G operation is not possible

Constant Value: -10 (0xfffffff6)

public static final int ERROR_NO_COVERAGE_AVAILABLE

Error code typically seen from call to getLastError() indicating that no coverage is available to the MS.

Constant Value: -6 (0xfffffffa)

public static final int ERROR_OPERATION_ALREADY_IN_PROGRESS

Error code typically seen from call to getLastError() indicating that the MS is already in progress executing a previously initiated function

Constant Value: -11 (0xfffffff5)

public static final int ERROR_OPERATION_NOT_ALLOWED

Error code typically seen from call to getLastError() indicating that the User Equirpment implementation does not allow the particular operation at this application interface. For example, FourGManager.disconnect() may not be allowed base on carrier and/or implemenation specific radio policies defined and enforced outside of this API.

Constant Value: -12 (0xfffffff4)

public static final int ERROR_RADIO_OFF

Error code typically seen from call to getLastError() indicating that the MS 4G radio is off, having been disabled in a control panel and/or by a physical switch

Constant Value: -14 (0xfffffff2)

public static final int ERROR_RADIO_POLICY_VIOLATION

Error code typically seen from call to getLastError() indicating that the MS has detected a radio policy violation.

Constant Value: -13 (0xfffffff3)

public static final int ERROR_ROAMING_NOT_ALLOWED

Error code typically seen from call to getLastError() indicating that roaming is not supported at this time.

Constant Value: -7 (0xfffffff9)

public static final int ERROR_SCAN_NOT_ALLOWED_NOW_NETWORK_IMPACTS

Error code indicating that a scan was not begin as there is a (typically) transient condition in the network that would be problematic for network operations if a MS initialed scan was executed at this time

Constant Value: -3 (0xfffffffd)

public static final int ERROR_SCAN_NOT_ALLOWED_NOW_NETWORK_MGMT_PROHIBITED

Error code indicating that the requested scan was not initiated as there is policy in place where the network, possibly via OMA-DM, prohibits the specific scan operation at this time. This may or may not be a transient condition.

Constant Value: -4 (0xfffffffc)

public static final int ERROR_SCAN_NOT_ALLOWED_NOW_UE_DATA_XFER_IMPACTS

Error code indicating that a scan was not begun as the scan would disrupt on-going data transports.

Constant Value: -2 (0xfffffffe)

public static final String EXTRA_4G_CURRENT_SERVING_BS

The lookup key for a FourGBaseStationInfo describing the now serving BS Station.

Constant Value: "4g_current_serving_bs"

public static final String EXTRA_4G_INFO

The lookup key for the RAN-specific subclass of FourGInfo, describing the current User Equipment <-> base station connection, when a Intent is received. Retrieve it with (FourGInfo) Intent.getParcelableExtra(FourGManager.EXTRA_4G_INFO)

Constant Value: "4g_info"

public static final String EXTRA_4G_PREVIOUS_SERVING_BS

The lookup key for a FourGBaseStationInof describing the previous serving BS Station.

Constant Value: "4g_previous_serving_bs"

public static final String EXTRA_4G_STATE

The lookup key for an int that indicates the current 4G "enabled" state, describing if 4G is enabled, disabled, enabling, disabling, or unknown Retrieve it with getIntExtra(String, int).

Constant Value: "4g_state"

public static final String EXTRA_CURRENT_RADIO_TEMPERATURE

The lookup key for the current radio temperature in Celsius.

Constant Value: "current_radio_temperature"

public static final String EXTRA_DOWNLINK_MODULATION

The lookup key for a Four4BaseStateionInfo.eNET_4G_MODULATION

Constant Value: "downlink_modulation"

public static final String EXTRA_DOWNLINK_THROUGHPUT

The lookup key for an int representing downlink throughput in LINK_SPEED_UNITS

Constant Value: "downlink_throughput"

public static final String EXTRA_HANDOVER_FAILURE_REASON

The lookup key for a enum FourGInfo.LINK_STATE_REASON that indicates the reason why a BAse Station to Base Station handover failed. Retrieve it with {@link android.content.Intent#getSerializableExtra(String).

See Also
  • #FourGInfo.LINK_STATE_REASON
Constant Value: "handover_failure_reason"

public static final String EXTRA_LINK_STATE_DETAIL

The lookup key for a FourGInfo.LINK_STATE_DETAIL

Constant Value: "link_state_detail"

public static final String EXTRA_NETWORK_INFO

The lookup key for a NetworkInfo object associated with the 4G network. Retrieve with getParcelableExtra(String).

Constant Value: "network_info"

public static final String EXTRA_NEW_4G_STATE

The lookup key for a FourGSupplicantState describing the new state Retrieve with getParcelableExtra(String).

Constant Value: "new_4g_state"

public static final String EXTRA_NEW_CINR

The lookup key for an int giving the new CINR in dB.

Constant Value: "new_cinr"

public static final String EXTRA_NEW_RSSI

The lookup key for an int giving the new RSSI in dBm.

Constant Value: "new_rssi"

public static final String EXTRA_PREVIOUS_4G_STATE

The lookup key for an int that indicates the previous 4G "enabled" state, describing if 4G is enabled, disabled, enabling, disabling, or unknown. see EXTRA_4G_STATE. Retrieve it with getIntExtra(String, int).

Constant Value: "previous_4g_state"

public static final String EXTRA_SCAN_RESULT_BS_LIST

The lookup key for the list of base station found after a scan has completed.

Constant Value: "scan_result_bs_list"

public static final String EXTRA_SERVICE_FLOW

The lookup key for the QosServiceFlowDescriptor

Constant Value: "service_flow"

public static final String EXTRA_SF_SCHEDULING_CLASS

The lookup key for the new SF_SCHEDULING_CLASS

Constant Value: "sf_scheduling_class"

public static final String EXTRA_SF_STATE

The lookup key for the new SF_STATE

Constant Value: "sf_state"

public static final String EXTRA_SUPPLICANT_ERROR

The lookup key for a FourGSupplicantState describing the supplicant error code if any.

Constant Value: "supplicant_error"

public static final String EXTRA_UPLINK_MODULATION

The lookup key for a Four4BaseStateionInfo.eNET_4G_MODULATION

Constant Value: "uplink_modulation"

public static final String EXTRA_UPLINK_THROUGHPUT

The lookup key for an int representing uplink throughput in LINK_SPEED_UNITS

Constant Value: "uplink_throughput"

public static final String KEY_CINR_CHANGED

Key used for the Bundle extra holding a boolean indicating that the Intent is a CINR changed alert.

Constant Value: "com.htc.net.FourG.KEY_CINR_CHANGE"

public static final String KEY_CINR_DELTA_THRESHOLD

Key used for the single Bundle extra, in an "CINR changed" alert Intent, to access a boolean which, if true, indicates that the Intent was fired based on the occurrence of an CINR change that exceeded the previous specified "CINR changed" by more that the minDelta threshold valuee.

Constant Value: "com.htc.net.FourG.KEY_CINR_DELTA_THRESHOLD"

public static final String KEY_CINR_MAX_THRESHOLD

Key used for the single Bundle extra, in an "CINR changed" alert Intent, to access an int which, if not equal to Integer.MAX_VALUE, indicates that the Intent was fired based on the occurrence of an CINR change, where, at some time during the alert minDelta peroid, the new CINR value was below the previously specifed "CINR maximum absolute" threshold value ceilingValue. The highest CINR sensed during this minDelta period is latched in this int.

Constant Value: "com.htc.net.FourG.KEY_CINR_MAX_THRESHOLD"

public static final String KEY_CINR_MIN_THRESHOLD

Key used for the single Bundle extra, in an "CINR changed" alert Intent, to access an int which, if not equal to Integer.MIN_VALUE, indicates that the Intent was fired based on the occurrence of an CINR change, where, at some time during the alert minDelta peroid, the new CINR value was below the previously specifed "CINR minimum absolute" threshold value floorValue. The lowest CINR sensed during this minDelta period is latched in this int.

Constant Value: "com.htc.net.FourG.KEY_CINR_MIN_THRESHOLD"

public static final String KEY_CINR_PERIODIC_ALERT

Key used for the single Bundle extra, in an "CINR changed" alert Intent, to access a boolean which, if true, indicates that the Intent was fired based on the occurrence of an CINR change, and the previously specified minimum reporting time period has passed.

Constant Value: "com.htc.net.FourG.KEY_CINR_PERIODIC_ALERT"

public static final String KEY_NEW_CINR

Key used for the single Bundle extra, in an "CINR changed" alert Intent, to access an int which is the new CINR value. As a convenience to applications, this key is also present in RSSI chagnged alerts, as typically if RSSI has changed, CINR has also changed.

Constant Value: "com.htc.net.FourG.KEY_NEW_CINR"

public static final String KEY_NEW_RSSI

Key used for the single Bundle extra, in an "RSSI changed" alert Intent, to access an int which is the new RSSI value. As a convenience to applications, this key is also present in CINR chagnged alerts, as typically if CINR has changed, RSSI has also changed.

Constant Value: "com.htc.net.FourG.KEY_NEW_RSSI"

public static final String KEY_RSSI_CHANGED

Key used for the Bundle extra holding a boolean indicating that the Intent is a RSSI changed alert.

Constant Value: "com.htc.net.FourG.KEY_RSSI_CHANGE"

public static final String KEY_RSSI_DELTA_THRESHOLD

Key used for the single Bundle extra, in an "RSSI changed" alert Intent, to access a boolean which, if true, indicates that the Intent was fired based on the occurrence of an RSSI change that exceeded the previous specified "RSSI changed" by more that the minDelta threshold valuee.

Constant Value: "com.htc.net.FourG.KEY_RSSI_DELTA_THRESHOLD"

public static final String KEY_RSSI_MAX_THRESHOLD

Key used for the single Bundle extra, in an "RSSI changed" alert Intent, to access an int which, if not equal to Integer.MAX_VALUE, indicates that the Intent was fired based on the occurrence of an RSSI change, where, at some time during the alert minDelta peroid, the new RSSI value was below the previously specifed "RSSI maximum absolute" threshold value ceilingValue. The highest RSSI sensed during this minDelta period is latched in this int.

Constant Value: "com.htc.net.FourG.KEY_RSSI_MAX_THRESHOLD"

public static final String KEY_RSSI_MIN_THRESHOLD

Key used for the single Bundle extra, in an "RSSI changed" alert Intent, to access an int which, if not equal to Integer.MIN_VALUE, indicates that the Intent was fired based on the occurrence of an RSSI change, where, at some time during the alert minDelta peroid, the new RSSI value was below the previously specifed "RSSI minimum absolute" threshold value floorValue. The lowest RSSI sensed during this minDelta period is latched in this int.

Constant Value: "com.htc.net.FourG.KEY_RSSI_MIN_THRESHOLD"

public static final String KEY_RSSI_PERIODIC_ALERT

Key used for the single Bundle extra, in an "RSSI changed" alert Intent, to access a boolean which, if true, indicates that the Intent was fired based on the occurrence of an RSSI change, and the previously specified minimum reporting time period has passed.

Constant Value: "com.htc.net.FourG.KEY_RSSI_PERIODIC_ALERT"

public static final String LINK_MODULATION_CHANGED_ACTION

Broadcast intent action indicating that the modulation on the 4G radio link state has changed.

Constant Value: "com.htc.net.FourG.LINK_MODULATION_CHANGED"

public static final String LINK_STATE_DETAIL_CHANGED_ACTION

Broadcast intent action indicating that the state of 4G detailed link state has changed. An extra provides the new state as the enum LINK_STATE_DETAIL.

Constant Value: "com.htc.net.FourG.LINK_STATE_DETAIL_CHANGED"

public static final int LOG_DEBUG

Constant Value: 4 (0x00000004)

public static final int LOG_ERROR

Constant Value: 2 (0x00000002)

public static final int LOG_FATAL

log Levels

Constant Value: 1 (0x00000001)

public static final int LOG_WARNING

Constant Value: 3 (0x00000003)

public static final String NETWORK_IDS_CHANGED_ACTION

The network IDs of the configured networks could have changed.

Constant Value: "com.htc.net.FourG.NETWORK_IDS_CHANGED"

public static final String NETWORK_STATE_CHANGED_ACTION

Broadcast intent action indicating that the state of 4G connectivity has changed. One extra provides the new state in the form of a NetworkInfo object. If the new state is CONNECTED, a second extra provides information about the connected network by supplying a FourGInfo Object.

Constant Value: "com.htc.net.FourG.STATE_CHANGE"

public static final String NET_4G_HANDOVER_COMPLETE_ACTION

Broadcast intent action indicating that the 4G serving Base Station (BS) has changed. One extra provides information about the new BS; another about the previous BS, where the FourGBaseStationInfo instance for the previous serving station shall contain the last known values for BSID, frequencies (lat/lon), and RTD related data.

Constant Value: "com.htc.net.FourG.NET_4G_HANDOVER_COMPLETE"

public static final String NET_4G_HANDOVER_FAILED_ACTION

Broadcast intent action indicating that the handover between 4G serving Base Station has failed. One extra provides information about the failure cause; another about the previous FourGBaseStationInfo instance for the previous serving station shall contain the last known values for BSID, frequencies (lat/lon), and RTD related data.

See Also
Constant Value: "com.htc.net.FourG.NET_4G_HANDOVER_FAILED"

public static final String NET_4G_RADIO_OVERHEAT_ACTION

Broadcast intent action indicating that the 4G radio has overheated. Intent Extra data is an int representing the radio temperature.

Constant Value: "com.htc.net.FourG.NET_4G_RADIO_OVERHEAT"

public static final String NET_4G_STATE_CHANGED_ACTION

Broadcast intent action indicating that the 4G "enabled" state (enabled, disabled, enabling, disabling, or unknown) has changed. This provides functional parity with the WifManager Intent WIFI_STATE_CHANGED_ACTION. One extra provides the new state. Another extra provides the previous state, if available.

Constant Value: "com.htc.net.FourG.NET_4G_STATE_CHANGED"

public static final int NET_4G_STATE_DISABLED

4G is disabled

Constant Value: 1 (0x00000001)

public static final int NET_4G_STATE_DISABLING

4G is being disabled

Constant Value: 2 (0x00000002)

public static final int NET_4G_STATE_ENABLED

4G is enabled

Constant Value: 3 (0x00000003)

public static final int NET_4G_STATE_ENABLING

4G is being enabled

Constant Value: 4 (0x00000004)

public static final int NET_4G_STATE_UNKNOWN

4G is in an unknown state

Constant Value: 0 (0x00000000)

public static final String QOS_SERVICE_FLOW_MODIFIED_ACTION

Broadcast intent action indicating that the state of 4G service flow has been modified by a change in serving BS, by the serving BS, etc. This is never the result of an asynchronous method call.

See Also
Constant Value: "com.htc.net.FourG.QOS_SERVICE_FLOW_MODIFIED"

public static final String QOS_SERVICE_FLOW_STATE_CHANGE_ACTION

Broadcast intent action indicating that the state of a 4G service flow has made a state transition. Intent Extra data is the new SF_STATE value and the QosServiceFlowDescriptor representing the Service Flow that has had the state chagned.

See Also
Constant Value: "com.htc.net.FourG.QOS_SERVICE_FLOW_STATE_CHANGE"

public static final String RSSI_CHANGED_ACTION

The RSSI (signal strength) has changed. For 4G, it is likely that CINR may also have changed.

Constant Value: "com.htc.net.FourG.RSSI_CHANGED"

public static final String SCAN_RESULTS_AVAILABLE_ACTION

A scan has completed, and result are available. An extra provides information about the scan results, which is a #FourGBaseStationInfo object.

Constant Value: "com.htc.net.FourG.SCAN_RESULTS_AVAILABLE"

public static final String SUPPLICANT_STATE_CHANGED_ACTION

Broadcast intent action indicating that the state of establishing a connection to a Base Station has changed. Intent Extra data is the new Supplicant

See Also
  • EXTRA_NEW_4G_STATE
Constant Value: "com.htc.net.FourG.SUPPLICANT_STATE_CHANGED"

protected static final int maxCINR

Constant Value: 53 (0x00000035)

protected static final int maxRSSI

Constant Value: -40 (0xffffffd8)

protected static final int minCINR

Constant Value: -10 (0xfffffff6)

protected static final int minRSSI

defined for singal calculation

Constant Value: -123 (0xffffff85)

Fields

protected FourGInfo.LINK_STATE_REASON disconnectReason

protected boolean isRoaming

protected ThreadLocal<Integer> lastError

protected int logLevel

Public Constructors

public FourGManager ()

Public Methods

public int addNetwork (FourGConfiguration config)

Add a network description to the set of configured networks.

public static int calculateSignalLevel (int rssi, int cinr, int numLevels)

Calculates an ordinal number for signal level between 0 and numLevelsm mapping rssi in dBm, and/or cinr in dB, to a single dimensionless number.

public static int calculateSignalLevel (int rssi, int numLevels)

Calculates an ordinal number for singal level between 0 and numLevels, mapping rssi, in dBm, to a single dimensionless number.

public static int compareSignalLevel (int rssiA, int rssiB)

Compares two signal strengths. Returns < 0 if the first signal, rssi A, is weaker than the second signal, rssi B Retruns 0 if the two signals have the same strength. Returns > 0 if the rssi A is stronger than rssi B.

public int connectDefaultNetwork ()

Connect to the current default ("home") network(s) using the default MS credentials. If the connection process is successfully started, the method returns 0, or else an error code is returned.

public static int copmareCinrLevel (int cinrA, int cinrB)

Compares two signal qualities. Returns < 0 if the first signal, cinrA, is of lower quality than the second signal, cinrB Returns 0 if the two signals have the same quality. Returns > 0 if the cinrA is of better quality than cinrB.

public FourGManager.ConnectionStatistics createConnectionStatistics ()

Get the upload/download statistics object for the current connection session.

public FourGManager.FourGLock createFourGLock (String tag)

Creates a new FourGManager.Lock. Holding a Lock indicates to the underlying implementation that the 4G radio should not be turned off when there is no activity.

public abstract FourGManager.QosServiceFlowControl createQosServiceFlowControl ()

Create a new QoS control object for the 4G radio subsystem. This control object allows applications to submit QoS Service Flow descriptors (QosServiceFlowDescriptor) tp the implementation for realization service flows between the MS and BS on the 4G RAN.

public boolean disableNetwork (int netId)

The specified network will not be candidate for MS association/connection. Returns true if successful and false otherwise.

public boolean disconnect ()

Disassociate from the connected network and go to disconnected state. Returns true if successful and false otherwise.

public void enableLogLevel (int logLevel)

Enable logLevel in the Java/JNI and 'C' driver level. By default the log level is set 1 which is fatal error only. Log levels supported are: 1. Fatal - Default 2. Error 3. Warning 4. Debug

public boolean enableNetwork (int netId, boolean disableOthers)

Allow a previously configured network to be associated with. If disableOthers is true, then all other configured networks are dsiabled, and an attempt to connect to the selected network is initiated.

public int get4GState ()

Returns the 4G enabled state, one of NET_4G_STATE_DISABLED, NET_4G_STATE_DISABLING, NET_4G_STATE_ENABLED, NET_4G_STATE_ENABLING, NET_4G_STATE_UNKNOWN

public abstract List<FourGConfiguration> getAvailableNetworks ()

Return the available networks to connect. This is a list of all networks that are currently "seen" by the MS.

public abstract List<FourGConfiguration> getConfiguredDefaultNetworks ()

Return a list of only those networks configured in the supplicant via means outside of this API, e.g. OMA_DM, etc. This allows for the display and potential user experience to select and connect to the default or other pre-configured networks. The networkId data of these preconfigured networks and the networkId of any API configured networks are all part of a single number space. Not all fields of FourGConfiguration are returned, Only the following fields are filled in: networked status

public abstract List<FourGConfiguration> getConfiguredNetworks ()

Return a list of al the networks configured in the supplicant. Not all fields of FourGConfiguration are returned, Only the following fields are filled in: networked status

public abstract FourGInfo getConnectionInfo ()

Get the information about the currently connected network and base station, if any.

public DeviceInfo getDeviceInformation ()

Get the information about the 4G radio device on the system.

public DhcpInfo getDhcpInfo ()

Return the DHCP-assigned addresses from the last successful DHCP request, if any.

public FourGInfo.LINK_STATE_REASON getDisconnectReason ()

Returns the last disconnect reason.

public int getLastError ()

Return the error code associated with the last operation.

public FourGManager.RadioInfoTemperature getRadioInfoTemperature ()

This method returns an object that encapsulates information aboud the radio attributes such as radio temp etc.

public abstract List<FourGBaseStationInfo> getScanResults ()

Return the list of base stations from either the latest API initiated network scan and as may have been gathered as the result of other implementation-interanl, network management operations.

public int getScanResultsAge ()

Returns number of milliseconds since the base station scan list available from getScanResults() was last compiled. In certain situations, e.g. where no List has yet been compiled at device power-on, the value Integer.MAX_VALUE is returned.

public boolean is4GEnabled ()

Return whether 4G is enabled or disabled.

public boolean isRoamingEnabled ()

Return whether network roaming is enabled or disable.

public boolean reassociate ()

Reconnect to the currently active network, even if we are already connected.

public boolean reconnect ()

Reconnect to the currently active network, even if we are currently disconnected.

public void removeCinrAlert (PendingIntent intent)

Removes the CINR alert with the PendingIntent intent.

public boolean removeNetwork (int netId)

Remove the specified network from the list of configured networks.

public void removeRssiAlert (PendingIntent intent)

Removes the RSSI alert with the PendingIntent intent.

public void requestCinrAlerts (int minTime, int minDelta, int floorValue, int ceilingValue, PendingIntent intent)

Registers the current activity to be notified periodically and/or when CINR has chagned enough to match the alert criteria as defined by the various parameters, with the spplied PendingIntent being broadcast with current CINR.

public void requestRssiAlerts (int minTime, int minDelta, int floorValue, int ceilingValue, PendingIntent intent)

Registers the current activity to be notified periodically and/or when RSSI has chagned enough to match the alert criteria as defined by the various parameters, with the spplied PendingIntent being broadcast with current RSSI.

public boolean saveConfiguration ()

Tell the supplicant to persist the current list of configured networks, configured with this API.

public boolean set4GEnabled (boolean enabled)

Turns the 4G radio on or off.

public boolean setRoamingEnabled (boolean enabled)

Enables connection to roaming partner NSPs or disables such roaming.

public int startNeighborListScan (boolean wideScan, FourGManager.RtdRequestedSpec rtdSpec, boolean dataSessionInterruptionAllowed)

Initiates various radio base station scanning modes. Method invocation causes the User Equipment to scan for all viable base station on.

public boolean updateNetwork (FourGConfiguration config)

Update the network description of an existing configured network. The parameter config is the set of variables that describe the configuration, contained in a FourGConfiguration object. config may be sparse, so that only the items that are being changed are non-null. The networkId field must be set to the ID of the existing network being updated.