Tizen Native API
|
Functions | |
int | telephony_sim_get_icc_id (telephony_h handle, char **icc_id) |
Gets the Integrated Circuit Card IDentification (ICC-ID). | |
int | telephony_sim_get_operator (telephony_h handle, char **sim_operator) |
Gets the SIM Operator (MCC [3 digits] + MNC [2~3 digits]). | |
int | telephony_sim_get_msin (telephony_h handle, char **msin) |
Gets the Mobile Subscription Identification Number (MSIN [9~10 digits]) of the SIM provider. | |
int | telephony_sim_get_spn (telephony_h handle, char **spn) |
Gets the Service Provider Name (SPN) of the SIM card. | |
int | telephony_sim_is_changed (telephony_h handle, bool *is_changed) |
Checks whether the current SIM card is different from the previous SIM card. | |
int | telephony_sim_get_state (telephony_h handle, telephony_sim_state_e *sim_state) |
Gets the state of the SIM. | |
int | telephony_sim_get_application_list (telephony_h handle, unsigned int *app_list) |
Gets the list of application on UICC. | |
int | telephony_sim_get_subscriber_number (telephony_h handle, char **subscriber_number) |
Gets the SIM card subscriber number. | |
int | telephony_sim_get_subscriber_id (telephony_h handle, char **subscriber_id) |
Gets the Subscriber ID. |
The SIM API provides functions to obtain information from the SIM card, as well as SIM status.
Required Header
#include <telephony.h>
Overview
The Telephony SIM API allows you to extract information stored on a SIM card, but not change the information.
Related Features
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 List.
Enumeration Type Documentation
Function Documentation
int telephony_sim_get_application_list | ( | telephony_h | handle, |
unsigned int * | app_list | ||
) |
Gets the list of application on UICC.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/telephony
- Parameters:
-
[in] handle The handle from telephony_init() [out] app_list The masking value for below values TELEPHONY_SIM_APP_TYPE_SIM 0x01 GSM Application TELEPHONY_SIM_APP_TYPE_USIM 0x02 USIM Application TELEPHONY_SIM_APP_TYPE_CSIM 0x04 CSIM Application TELEPHONY_SIM_APP_TYPE_ISIM 0x08 ISIM Application
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
TELEPHONY_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_sim_get_icc_id | ( | telephony_h | handle, |
char ** | icc_id | ||
) |
Gets the Integrated Circuit Card IDentification (ICC-ID).
The Integrated Circuit Card Identification number internationally identifies SIM cards.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/telephony
- Remarks:
- You must release
icc_id
using free().
- Parameters:
-
[in] handle The handle from telephony_init() [out] icc_id The Integrated Circuit Card Identification
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
TELEPHONY_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 TELEPHONY_ERROR_SIM_NOT_AVAILABLE SIM is not available
- Precondition:
- The SIM state must be TELEPHONY_SIM_STATE_AVAILABLE.
- See also:
- telephony_sim_get_state()
int telephony_sim_get_msin | ( | telephony_h | handle, |
char ** | msin | ||
) |
Gets the Mobile Subscription Identification Number (MSIN [9~10 digits]) of the SIM provider.
This function gets Mobile Subscription Identification Number embedded in the SIM card.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/telephony
- Remarks:
- You must release
msin
using free().
- Parameters:
-
[in] handle The handle from telephony_init() [out] msin The Mobile Subscription Identification Number
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
TELEPHONY_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 TELEPHONY_ERROR_SIM_NOT_AVAILABLE SIM is not available
- Precondition:
- The SIM state must be TELEPHONY_SIM_STATE_AVAILABLE.
- See also:
- telephony_sim_get_state()
int telephony_sim_get_operator | ( | telephony_h | handle, |
char ** | sim_operator | ||
) |
Gets the SIM Operator (MCC [3 digits] + MNC [2~3 digits]).
The Operator is embedded in the SIM card.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/telephony
- Remarks:
- You must release
sim_operator
using free().
- Parameters:
-
[in] handle The handle from telephony_init() [out] sim_operator The SIM Operator
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
TELEPHONY_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 TELEPHONY_ERROR_SIM_NOT_AVAILABLE SIM is not available
- Precondition:
- The SIM state must be TELEPHONY_SIM_STATE_AVAILABLE.
- See also:
- telephony_sim_get_state()
int telephony_sim_get_spn | ( | telephony_h | handle, |
char ** | spn | ||
) |
Gets the Service Provider Name (SPN) of the SIM card.
This function gets Service Provider Name embedded in the SIM card. If this value is not stored in SIM card, negative error returned and NULL
will be stored in spn
.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/telephony
- Remarks:
- You must release
spn
using free().
- Parameters:
-
[in] handle The handle from telephony_init() [out] spn The Service Provider Name
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
TELEPHONY_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 TELEPHONY_ERROR_SIM_NOT_AVAILABLE SIM is not available
- Precondition:
- The SIM state must be TELEPHONY_SIM_STATE_AVAILABLE.
- See also:
- telephony_sim_get_state()
int telephony_sim_get_state | ( | telephony_h | handle, |
telephony_sim_state_e * | sim_state | ||
) |
Gets the state of the SIM.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/telephony
- Parameters:
-
[in] handle The handle from telephony_init() [out] sim_state The current state of the SIM
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
TELEPHONY_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_sim_get_subscriber_id | ( | telephony_h | handle, |
char ** | subscriber_id | ||
) |
Gets the Subscriber ID.
This function gets subscriber ID encoded.
- Since :
- 2.4
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/telephony
- Remarks:
- You must release
subscriber_id
using free().
- Parameters:
-
[in] handle The handle from telephony_init() [out] subscriber_id The subscriber ID
- Return values:
-
TELEPHONY_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 TELEPHONY_ERROR_SIM_NOT_AVAILABLE SIM is not available
- Precondition:
- The SIM state must be TELEPHONY_SIM_STATE_AVAILABLE.
- See also:
- telephony_sim_get_state()
int telephony_sim_get_subscriber_number | ( | telephony_h | handle, |
char ** | subscriber_number | ||
) |
Gets the SIM card subscriber number.
This function gets subscriber number embedded in the SIM card. This value contains MSISDN related to the subscriber. If this value is not stored in SIM card, negative error returned and NULL
will be stored in subscriber_number
.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/telephony
- Remarks:
- You must release
subscriber_number
using free().
- Parameters:
-
[in] handle The handle from telephony_init() [out] subscriber_number The subscriber number in the SIM
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
TELEPHONY_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 TELEPHONY_ERROR_SIM_NOT_AVAILABLE SIM is not available
- Precondition:
- The SIM state must be TELEPHONY_SIM_STATE_AVAILABLE.
- See also:
- telephony_sim_get_state()
int telephony_sim_is_changed | ( | telephony_h | handle, |
bool * | is_changed | ||
) |
Checks whether the current SIM card is different from the previous SIM card.
- Since :
- 2.3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/telephony
- Parameters:
-
[in] handle The handle from telephony_init() [out] is_changed true
if the current SIM card is different from the previous SIM card, otherwisefalse
if the SIM card is not changed
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
TELEPHONY_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 TELEPHONY_ERROR_SIM_NOT_AVAILABLE SIM is not available
- Precondition:
- The SIM state must be TELEPHONY_SIM_STATE_AVAILABLE.
- See also:
- telephony_sim_get_state()