Tizen Native API
6.5
|
The Modem Information API provides functions to obtain information from the modem.
Required Header
#include <telephony.h>
Overview
The Telephony Modem Information API allows you to get modem information such as modem power status, but not to change the information.
Related Features
This API is related with the following feature:
- http://tizen.org/feature/network.telephony
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_modem_get_imei (telephony_h handle, char **imei) |
Gets the IMEI (International Mobile Station Equipment Identity) of a mobile phone. | |
int | telephony_modem_get_power_status (telephony_h handle, telephony_modem_power_status_e *status) |
Gets the power status of the modem. | |
int | telephony_modem_get_meid (telephony_h handle, char **meid) |
Gets the MEID (Mobile Equipment Identifier) of a mobile phone (for CDMA). |
Enumeration Type Documentation
Enumeration for Modem Power Status.
- Since :
- 3.0
Function Documentation
int telephony_modem_get_imei | ( | telephony_h | handle, |
char ** | imei | ||
) |
Gets the IMEI (International Mobile Station Equipment Identity) of a mobile phone.
- Warning:
- This is not for use by third-party applications.
The IMEI number is used by a GSM network to identify valid devices and therefore can be used for stopping a stolen phone from accessing that network.
- Since :
- 2.3.1
- Privilege Level:
- partner
- Privilege:
- http://tizen.org/privilege/securesysteminfo
- Remarks:
- You must release
imei
using free() on success case. - Since 5.5, this function requires partner level privilege.
- Before 5.5, this function required the http://tizen.org/privilege/telephony privilege. Since 5.5, it requires the http://tizen.org/privilege/securesysteminfo privilege.
- To avoid unexpected behavior of old version applications which have the http://tizen.org/privilege/telephony privilege, there is an exception in handling the 'permission denied' error.
- For an application with api-version 5.5 or higher, if the application doesn't have http://tizen.org/privilege/securesysteminfo privilege, this function returns TELEPHONY_ERROR_PERMISSION_DENIED.
- For an application with api-version lower than 5.5, if the application has http://tizen.org/privilege/telephony privilege, this function returns a pseudo value with TELEPHONY_ERROR_NONE instead of TELEPHONY_ERROR_PERMISSION_DENIED. The returned value is not reliable data, it can't confirm the device's identification.
- Parameters:
-
[in] handle The handle from telephony_init() [out] imei The International Mobile Station Equipment Identity
- 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_modem_get_meid | ( | telephony_h | handle, |
char ** | meid | ||
) |
Gets the MEID (Mobile Equipment Identifier) of a mobile phone (for CDMA).
- Warning:
- This is not for use by third-party applications.
- Since :
- 3.0
- Privilege Level:
- partner
- Privilege:
- http://tizen.org/privilege/securesysteminfo
- Remarks:
- You must release
meid
using free() on success case. - Since 5.5, this function requires partner level privilege.
- Before 5.5, this function required the http://tizen.org/privilege/telephony privilege. Since 5.5, it requires the http://tizen.org/privilege/securesysteminfo privilege.
- To avoid unexpected behavior of old version applications which have the http://tizen.org/privilege/telephony privilege, there is an exception in handling the 'permission denied' error.
- For an application with api-version 5.5 or higher, if the application doesn't have http://tizen.org/privilege/securesysteminfo privilege, this function returns TELEPHONY_ERROR_PERMISSION_DENIED.
- For an application with api-version lower than 5.5, if the application has http://tizen.org/privilege/telephony privilege, this function returns a pseudo value with TELEPHONY_ERROR_NONE instead of TELEPHONY_ERROR_PERMISSION_DENIED. The returned value is not reliable data, it can't confirm the device's identification.
- Parameters:
-
[in] handle The handle from telephony_init() [out] meid The Mobile Equipment Identifier
- 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_modem_get_power_status | ( | telephony_h | handle, |
telephony_modem_power_status_e * | status | ||
) |
Gets the power status of the modem.
- Since :
- 3.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/telephony
- Parameters:
-
[in] handle The handle from telephony_init() [out] status The Modem power status (0=on,1=off,2=reset,3=low)
- 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