Tizen Native API
4.0
|
The Network Information API provides functions to obtain information about the current telephony service network.
#include <telephony.h>
The Telephony Network Information API allows you to access, but not change the information about the current cellular network and telephony service.
This API is related with the following feature:
It is recommended to design feature related codes in your application for reliability.
You can check if a device supports the related features for this API by using System Information, thereby controlling the procedure of your application.
To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
More details on featuring your application can be found from Feature Element.
Functions | |
int | telephony_network_get_lac (telephony_h handle, int *lac) |
Gets the LAC (Location Area Code) of the current location. | |
int | telephony_network_get_cell_id (telephony_h handle, int *cell_id) |
Gets the cell ID of the current location. | |
int | telephony_network_get_rssi (telephony_h handle, telephony_network_rssi_e *rssi) |
Gets the RSSI (Received Signal Strength Indicator). | |
int | telephony_network_get_roaming_status (telephony_h handle, bool *status) |
Gets the roaming state of the current registered network. | |
int | telephony_network_get_mcc (telephony_h handle, char **mcc) |
Gets the MCC (Mobile Country Code) of the current registered network. | |
int | telephony_network_get_mnc (telephony_h handle, char **mnc) |
Gets the MNC (Mobile Network Code) of the current registered network. | |
int | telephony_network_get_network_name (telephony_h handle, char **network_name) |
Gets the name of the current registered network. | |
int | telephony_network_get_type (telephony_h handle, telephony_network_type_e *network_type) |
Gets the network service type of the current registered network. | |
int | telephony_network_get_ps_type (telephony_h handle, telephony_network_ps_type_e *ps_type) |
Gets the packet service type of the current registered network. | |
int | telephony_network_get_network_name_option (telephony_h handle, telephony_network_name_option_e *network_name_option) |
Gets the network name option of the current registered network. | |
int | telephony_network_get_service_state (telephony_h handle, telephony_network_service_state_e *network_service_state) |
Gets the current network state of the telephony service. | |
int | telephony_network_get_default_data_subscription (telephony_h handle, telephony_network_default_data_subs_e *default_sub) |
Gets the current default subscription for data service (Packet Switched). | |
int | telephony_network_get_default_subscription (telephony_h handle, telephony_network_default_subs_e *default_sub) |
Gets the current default subscription for voice service (Circuit Switched). | |
int | telephony_network_get_selection_mode (telephony_h handle, telephony_network_selection_mode_e *mode) |
Gets the network selection mode. | |
int | telephony_network_get_tac (telephony_h handle, int *tac) |
Gets the TAC (Tracking Area Code) of the current location. | |
int | telephony_network_get_system_id (telephony_h handle, int *sid) |
Gets the system ID of the current location. | |
int | telephony_network_get_network_id (telephony_h handle, int *nid) |
Gets the network ID of the current location. | |
int | telephony_network_get_base_station_id (telephony_h handle, int *bs_id) |
Gets the base station ID of the current location. | |
int | telephony_network_get_base_station_latitude (telephony_h handle, int *bs_latitude) |
Gets the base station latitude of the current location. | |
int | telephony_network_get_base_station_longitude (telephony_h handle, int *bs_longitude) |
Gets the base station longitude of the current location. | |
int | telephony_network_get_signal_strength (telephony_h handle, int *dbm) |
Gets the received signal strength (dBm). |
Enumeration for Network Name Priority.
Enumeration for RSSI (Receive Signal Strength Indicator).
TELEPHONY_NETWORK_RSSI_6 indicates the highest strength.
Enumeration for Network Type.
int telephony_network_get_base_station_id | ( | telephony_h | handle, |
int * | bs_id | ||
) |
Gets the base station ID of the current location.
[in] | handle | The handle from telephony_init() |
[out] | bs_id | The base station ID, -1 if unknown |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_PERMISSION_DENIED | Permission denied |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |
int telephony_network_get_base_station_latitude | ( | telephony_h | handle, |
int * | bs_latitude | ||
) |
Gets the base station latitude of the current location.
[in] | handle | The handle from telephony_init() |
[out] | bs_latitude | The base station latitude, 0x7FFFFFFF if unknown |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_PERMISSION_DENIED | Permission denied |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |
int telephony_network_get_base_station_longitude | ( | telephony_h | handle, |
int * | bs_longitude | ||
) |
Gets the base station longitude of the current location.
[in] | handle | The handle from telephony_init() |
[out] | bs_longitude | The base station longitude, 0x7FFFFFFF if unknown |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_PERMISSION_DENIED | Permission denied |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |
int telephony_network_get_cell_id | ( | telephony_h | handle, |
int * | cell_id | ||
) |
Gets the cell ID of the current location.
[in] | handle | The handle from telephony_init() |
[out] | cell_id | The cell identification number, -1 if unknown |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_PERMISSION_DENIED | Permission denied |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |
int telephony_network_get_default_data_subscription | ( | telephony_h | handle, |
telephony_network_default_data_subs_e * | default_sub | ||
) |
Gets the current default subscription for data service (Packet Switched).
[in] | handle | The handle from telephony_init() |
[out] | default_sub | The current default data subscription |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_PERMISSION_DENIED | Permission denied |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |
int telephony_network_get_default_subscription | ( | telephony_h | handle, |
telephony_network_default_subs_e * | default_sub | ||
) |
Gets the current default subscription for voice service (Circuit Switched).
[in] | handle | The handle from telephony_init() |
[out] | default_sub | The current default voice subscription |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_PERMISSION_DENIED | Permission denied |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |
int telephony_network_get_lac | ( | telephony_h | handle, |
int * | lac | ||
) |
Gets the LAC (Location Area Code) of the current location.
[in] | handle | The handle from telephony_init() |
[out] | lac | The Location Area Code, -1 if unknown |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_PERMISSION_DENIED | Permission denied |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |
int telephony_network_get_mcc | ( | telephony_h | handle, |
char ** | mcc | ||
) |
Gets the MCC (Mobile Country Code) of the current registered network.
mcc
using free() on success case, empty string if unknown.[in] | handle | The handle from telephony_init() |
[out] | mcc | The Mobile Country Code (three digits) Mobile Country Code (MCC) identifies the country where the cell is being used |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_PERMISSION_DENIED | Permission denied |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |
int telephony_network_get_mnc | ( | telephony_h | handle, |
char ** | mnc | ||
) |
Gets the MNC (Mobile Network Code) of the current registered network.
mnc
using free() on success case, empty string if unknown.[in] | handle | The handle from telephony_init() |
[out] | mnc | The Mobile Network Code (three digits) The Mobile Network Code (MNC) identifies the mobile phone operator and network provider |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_PERMISSION_DENIED | Permission denied |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |
int telephony_network_get_network_id | ( | telephony_h | handle, |
int * | nid | ||
) |
Gets the network ID of the current location.
[in] | handle | The handle from telephony_init() |
[out] | nid | The network ID, -1 if unknown |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_PERMISSION_DENIED | Permission denied |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |
int telephony_network_get_network_name | ( | telephony_h | handle, |
char ** | network_name | ||
) |
Gets the name of the current registered network.
network_name
using free() on success case.[in] | handle | The handle from telephony_init() |
[out] | network_name | The name of the current registered network, empty string if unknown |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_PERMISSION_DENIED | Permission denied |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |
int telephony_network_get_network_name_option | ( | telephony_h | handle, |
telephony_network_name_option_e * | network_name_option | ||
) |
Gets the network name option of the current registered network.
[in] | handle | The handle from telephony_init() |
[out] | network_name_option | The network name display option |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_PERMISSION_DENIED | Permission denied |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |
int telephony_network_get_ps_type | ( | telephony_h | handle, |
telephony_network_ps_type_e * | ps_type | ||
) |
Gets the packet service type of the current registered network.
[in] | handle | The handle from telephony_init() |
[out] | ps_type | The type of packet service |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_PERMISSION_DENIED | Permission denied |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |
int telephony_network_get_roaming_status | ( | telephony_h | handle, |
bool * | status | ||
) |
Gets the roaming state of the current registered network.
[in] | handle | The handle from telephony_init() |
[out] | status | true if roaming, otherwise false if not roaming |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_PERMISSION_DENIED | Permission denied |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |
int telephony_network_get_rssi | ( | telephony_h | handle, |
telephony_network_rssi_e * | rssi | ||
) |
Gets the RSSI (Received Signal Strength Indicator).
[in] | handle | The handle from telephony_init() |
[out] | rssi | The Received Signal Strength Indicator Higher the received number, the stronger the signal strength |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_PERMISSION_DENIED | Permission denied |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |
int telephony_network_get_selection_mode | ( | telephony_h | handle, |
telephony_network_selection_mode_e * | mode | ||
) |
Gets the network selection mode.
[in] | handle | The handle from telephony_init() |
[out] | mode | The network selection mode |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_PERMISSION_DENIED | Permission denied |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |
int telephony_network_get_service_state | ( | telephony_h | handle, |
telephony_network_service_state_e * | network_service_state | ||
) |
Gets the current network state of the telephony service.
[in] | handle | The handle from telephony_init() |
[out] | network_service_state | The current network state |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_PERMISSION_DENIED | Permission denied |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |
int telephony_network_get_signal_strength | ( | telephony_h | handle, |
int * | dbm | ||
) |
Gets the received signal strength (dBm).
[in] | handle | The handle from telephony_init() |
[out] | dbm | The received signal strength in dBm, 0 if unknown The higher the received number, the stronger the signal |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_PERMISSION_DENIED | Permission denied |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |
int telephony_network_get_system_id | ( | telephony_h | handle, |
int * | sid | ||
) |
Gets the system ID of the current location.
[in] | handle | The handle from telephony_init() |
[out] | sid | The system ID, -1 if unknown |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_PERMISSION_DENIED | Permission denied |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |
int telephony_network_get_tac | ( | telephony_h | handle, |
int * | tac | ||
) |
Gets the TAC (Tracking Area Code) of the current location.
[in] | handle | The handle from telephony_init() |
[out] | tac | The Tracking Area Code, -1 if unknown |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_PERMISSION_DENIED | Permission denied |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |
int telephony_network_get_type | ( | telephony_h | handle, |
telephony_network_type_e * | network_type | ||
) |
Gets the network service type of the current registered network.
[in] | handle | The handle from telephony_init() |
[out] | network_type | The network service type |
0
on success, otherwise a negative error valueTELEPHONY_ERROR_NONE | Successful |
TELEPHONY_ERROR_INVALID_PARAMETER | Invalid parameter |
TELEPHONY_ERROR_PERMISSION_DENIED | Permission denied |
TELEPHONY_ERROR_NOT_SUPPORTED | Not supported |
TELEPHONY_ERROR_OPERATION_FAILED | Operation failed |