Exception Handling for Privacy-sensitive APIs

When an application that uses privacy-sensitive APIs to access private user information is blocked by the user's privacy settings, the following exceptions are thrown:

The application must handle these exceptions properly to avoid unexpected malfunction. To help the user understand why a specific action is blocked, display the reason for an exception.

Tizen applications contain privacy-related privileges in the config.xml and manifest.xml files, and, as shown in the following figure, the users can enable or disable privacy services as required through the privacy setting menu (Settings > Privacy > [ApplicationName]) on the device menu.

Figure: Privacy settings menu

Privacy settings menu

In addition, the Tizen platform automatically shows the privacy setting pop-up when the application is first launched after its installation. The pop-up is based on privilege information as shown in the following figure, and it is either disabled or displayed differently depending on the target device.

Figure: Privacy pop-up

Privacy pop-up

The application has restricted access to the services disabled in the privacy settings, and must handle these unexpected restrictions properly.

The following table shows the privacy-related privileges.

Table: Privacy-related privileges

CategoryPrivilege
Accountshttp://tizen.org/privilege/account.read
http://tizen.org/privilege/account.write
Bluetoothhttp://tizen.org/privilege/bluetooth.admin
http://tizen.org/privilege/bluetooth.gap
http://tizen.org/privilege/bluetooth.health
http://tizen.org/privilege/bluetooth.opp
http://tizen.org/privilege/bluetooth.spp
http://tizen.org/privilege/bluetoothmanager
Calendarhttp://tizen.org/privilege/calendar.read
http://tizen.org/privilege/calendar.write
Call loghttp://tizen.org/privilege/callhistory.read
http://tizen.org/privilege/callhistory.write
Contactshttp://tizen.org/privilege/contact.read
http://tizen.org/privilege/contact.write
http://tizen.org/privilege/userprofile.read
http://tizen.org/privilege/userprofile.write
Locationhttp://tizen.org/privilege/location
Messaginghttp://tizen.org/privilege/messaging.read
http://tizen.org/privilege/messaging.write
NFChttp://tizen.org/privilege/nfc.admin
http://tizen.org/privilege/nfc.common
http://tizen.org/privilege/nfc.p2p
http://tizen.org/privilege/nfc.tag
Wi-Fi Direct™http://tizen.org/privilege/wifi.wifidirect.admin
http://tizen.org/privilege/wifi.wifidirect.read

Where to Go Next