Knox Tizen Wearable SDK
Custom Settings Manager group

Settings Manager group provides APIs to manage system settings and management of device features. More...

Enumerations

Functions

knox_result_t knox_custom_set_bluetooth_state (knox_custom_bt_state_t value)
 API to turn Bluetooth on/off. More...
 
knox_result_t knox_custom_set_mobile_data_state (knox_custom_mobile_data_state_t value)
 API to turn mobile data on/off. More...
 
knox_result_t knox_custom_set_wifi_state (knox_custom_wifi_state_t value)
 API to turn Wi-Fi on/off. More...
 
knox_result_t knox_custom_set_data_roaming_state (knox_custom_data_roaming_state_t value)
 API to turn data roaming on/off. More...
 
knox_result_t knox_custom_set_settings_hidden_items (knox_custom_settings_hide_state_t state, knox_custom_setting_hidden_items_t elements)
 API to hide specific settings items on a Samsung Galaxy Watch device. More...
 
knox_result_t knox_custom_get_settings_hidden_items (int *hidden_items)
 API to retrieve a list specifying which settings items are hidden on a wearable device. More...
 
knox_result_t knox_custom_set_airplane_mode_state (knox_custom_data_airplane_mode_state_t value)
 API to turn airplane on/off. More...
 
knox_result_t knox_custom_set_watch_face (const char *clockpackagename_main, const char *clockpackagename_sub)
 API to set a specific package as a watch face. More...
 
knox_custom_data_tknox_custom_get_watch_face (void)
 API to get watchface package name. More...
 
knox_result_t knox_custom_set_powersaving_mode_state (knox_custom_powersaving_mode_state_t value)
 API to turn Power saving mode on/off on a device. More...
 
knox_result_t knox_custom_get_powersaving_mode_state (int *powersaving_mode_state)
 API to retrieve the state of Power saving mode. More...
 
knox_result_t knox_custom_set_debuginfo_state (knox_custom_data_debuginfo_state_t value)
 API to turn ON or OFF the DebugInfo setting on the device. More...
 
knox_result_t knox_custom_get_debuginfo_state (int *debuginfo_state)
 Get the DebugInfo state. More...
 
knox_result_t knox_custom_set_always_on_display_state (knox_custom_always_on_display_state_t value)
 API to turn Always On Display (AOD) ON or OFF on a device. More...
 
knox_result_t knox_custom_get_always_on_display_state (int *always_on_display_state)
 API to retrieve the state of Always On Display. More...
 
knox_result_t knox_custom_widget_board_add_widget (const char *widget_id)
 API to add a widget into the Home application widget board favorites list. For more about widgets, see Widgets. More...
 
knox_result_t knox_custom_widget_board_remove_widgets (void)
 API to clear the favorites list of Home application widget board. More...
 
knox_custom_data_tknox_custom_widget_board_get_widgets (void)
 API to get current list of Home application widget board favorites. More...
 

Detailed Description

Settings Manager group provides APIs to manage system settings and management of device features.

Custom Settings Manager group

This group provides APIs to configure and manage the device settings.

Required Header

#include <knox_custom.h>

Enumeration Type Documentation

AlwaysOnDisplay state type.

Since (Knox_wearable):
2.3.1
Since (Tizen):
4.0.0.4
See also
knox_custom_set_always_on_display_state, knox_custom_get_always_on_display_state
Enumerator
KNOX_CUSTOM_ALWAYS_ON_DISPLAY_STATE_ON 

Always on display state ON request

KNOX_CUSTOM_ALWAYS_ON_DISPLAY_STATE_OFF 

Always on display state OFF request

Definition at line 135 of file knox_custom_settings_manager.h.

Bluetooth state type.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2
See also
knox_custom_set_bluetooth_state
Enumerator
KNOX_CUSTOM_BT_ON 

Bluetooth ON request

KNOX_CUSTOM_BT_OFF 

Bluetooth OFF request

Definition at line 32 of file knox_custom_settings_manager.h.

Airplane mode state type.

Since (Knox_wearable):
1.1.0
Since (Tizen):
2.3.2.3
See also
knox_custom_set_airplane_mode_state
Enumerator
KNOX_CUSTOM_AIRPLANE_MODE_ON 

Airplane mode ON request

KNOX_CUSTOM_AIRPLANE_MODE_OFF 

Airplane mode OFF request

Definition at line 102 of file knox_custom_settings_manager.h.

DebugInfo state type.

Since (Knox_wearable):
2.2.0
Since (Tizen):
3.0.0.0
See also
knox_custom_set_debuginfo_state
Enumerator
KNOX_CUSTOM_DEBUGINFO_STATE_ON 

DebugInfo enable request

KNOX_CUSTOM_DEBUGINFO_STATE_OFF 

DebugInfo disable request

Definition at line 124 of file knox_custom_settings_manager.h.

Mobile data roaming state type.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2
See also
knox_custom_set_data_roaming_state
Enumerator
KNOX_CUSTOM_DATA_ROAMING_ON 

Mobile data roaming mode ON request

KNOX_CUSTOM_DATA_ROAMING_OFF 

Mobile Data roaming mode OFF request

Definition at line 77 of file knox_custom_settings_manager.h.

Mobile data state type.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2
See also
knox_custom_set_mobile_data_state
Enumerator
KNOX_CUSTOM_MOBILE_DATA_ON 

Mobile Data ON request

KNOX_CUSTOM_MOBILE_DATA_OFF 

Mobile Data OFF request

Definition at line 43 of file knox_custom_settings_manager.h.

PowerSaving mode state type.

Since (Knox_wearable):
2.2.0
Since (Tizen):
3.0.0.0
See also
knox_custom_set_powersaving_mode_state
Enumerator
KNOX_CUSTOM_POWERSAVING_MODE_ON 

Powersaving mode ON request

KNOX_CUSTOM_POWERSAVING_MODE_OFF 

Powersaving mode OFF request

Definition at line 113 of file knox_custom_settings_manager.h.

Settings hidden Item type.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2
See also
knox_custom_set_settings_hidden_items
Enumerator
KNOX_CUSTOM_SETTINGS_HIDE_DISPLAY 

Display

KNOX_CUSTOM_SETTINGS_HIDE_SOUND 

Sound

KNOX_CUSTOM_SETTINGS_HIDE_CONNECTION 

Connection

KNOX_CUSTOM_SETTINGS_HIDE_GEAR_INFO 

Galaxy Watch info

KNOX_CUSTOM_SETTINGS_HIDE_ALL 

Hide list of Settings hide

Definition at line 88 of file knox_custom_settings_manager.h.

Hide or unhide the given settings elements.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2
See also
knox_custom_set_settings_hidden_items
Enumerator
KNOX_CUSTOM_SETTINGS_HIDE_ON 

To hide the given settings elements

KNOX_CUSTOM_SETTINGS_HIDE_OFF 

To unhide the given settings elements

Definition at line 65 of file knox_custom_settings_manager.h.

Wi-Fi state type.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2
See also
knox_custom_set_wifi_state
Enumerator
KNOX_CUSTOM_WIFI_ON 

Wi-Fi ON request

KNOX_CUSTOM_WIFI_OFF 

Wi-Fi OFF request

Definition at line 54 of file knox_custom_settings_manager.h.

Function Documentation

knox_result_t knox_custom_get_always_on_display_state ( int *  always_on_display_state)

API to retrieve the state of Always On Display.

Since (Knox_wearable):
2.3.1
Since (Tizen):
4.0.0.4
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage
The admin can use this API to get the state of Always On Display.
int always_on_display_state;
int ret;
ret = knox_custom_get_always_on_display_state(&always_on_display_state);
if(ret == KNOX_RESULT_SUCCESS) {
if (always_on_display_state == KNOX_CUSTOM_ALWAYS_ON_DISPLAY_STATE_ON) {
// Always on display is ON
}
} else {
printf("Error in getting knox_custom Settings Hidden Items");
}
Parameters
[out]always_on_display_stateKNOX_CUSTOM_ALWAYS_ON_DISPLAY_STATE_ON: The state of Always On Display is ON KNOX_CUSTOM_ALWAYS_ON_DISPLAY_STATE_OFF: The state of Always On Display is OFF
Return values
KNOX_RESULT_SUCCESSSuccessful
KNOX_RESULT_FAILGeneral failure
KNOX_RESULT_NOT_SUPPORTEDNot supported
KNOX_RESULT_INVALID_PARAMInvalid parameter
KNOX_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function
Returns
value of display always on mode on success, an error code on error
See also
knox_custom_set_always_on_display_state
knox_result_t knox_custom_get_debuginfo_state ( int *  debuginfo_state)

Get the DebugInfo state.

Since (Knox_wearable):
2.2.0
Since (Tizen):
3.0.0.0
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage
The admin can get the debug info state.
int debuginfo_state;
int ret;
ret = knox_custom_get_debuginfo_state(&debuginfo_state);
if(ret == KNOX_RESULT_SUCCESS) {
if (debuginfo_state == KNOX_CUSTOM_DEBUGINFO_STATE_ON) {
// debug info state is ON
}
} else {
printf("Error in getting knox_custom Settings Hidden Items");
}
Parameters
[out]debuginfo_stateKNOX_CUSTOM_DEBUGINFO_STATE_ON: The state of Debuginfo mode is ON KNOX_CUSTOM_DEBUGINFO_STATE_OFF: The state of Debuginfo mode is OFF
Return values
KNOX_RESULT_SUCCESSSuccessful
KNOX_RESULT_FAILGeneral failure
KNOX_RESULT_NOT_SUPPORTEDNot supported
KNOX_RESULT_INVALID_PARAMInvalid parameter
KNOX_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function
Returns
value of debug info mode on success, an error code on error
See also
knox_custom_set_debuginfo_state
knox_result_t knox_custom_get_powersaving_mode_state ( int *  powersaving_mode_state)

API to retrieve the state of Power saving mode.

Since (Knox_wearable):
2.2.0
Since (Tizen):
3.0.0.0
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage
The admin can use this API to get the state of Power saving mode.
int powersaving_mode_state;
int ret;
ret = knox_custom_get_powersaving_mode_state(&powersaving_mode_state);
if(ret == KNOX_RESULT_SUCCESS) {
if (powersaving_mode_state == KNOX_CUSTOM_POWERSAVING_MODE_ON) {
// powersaving mode is ON
}
} else {
printf("Error in getting knox_custom Settings Hidden Items");
}
Parameters
[out]powersaving_mode_stateKNOX_CUSTOM_POWERSAVING_MODE_ON: The state of Power saving mode is ON KNOX_CUSTOM_POWERSAVING_MODE_OFF: The state of Power saving mode is OFF
Return values
KNOX_RESULT_SUCCESSSuccessful
KNOX_RESULT_FAILGeneral failure
KNOX_RESULT_NOT_SUPPORTEDNot supported
KNOX_RESULT_INVALID_PARAMInvalid parameter
KNOX_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function
Returns
value of powersaving mode on success, an error code on error
See also
knox_custom_set_powersaving_mode_state
knox_result_t knox_custom_get_settings_hidden_items ( int *  hidden_items)

API to retrieve a list specifying which settings items are hidden on a wearable device.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage
The admin can obtain information, on behalf of the end user, about which specific Knox Custom Settings items are hidden.
int hidden_items;
int ret;
if(ret == KNOX_RESULT_SUCCESS) {
if (setting_items & KNOX_CUSTOM_SETTINGS_HIDE_DISPLAY) {
//Display is hidden
}
} else {
printf("Error in getting knox_custom Settings Hidden Items");
}
Parameters
[out]hidden_itemsSet of setting elements that are hidden
Return values
KNOX_RESULT_SUCCESSSuccessful
KNOX_RESULT_FAILGeneral failure
KNOX_RESULT_NOT_SUPPORTEDNot supported
KNOX_RESULT_INVALID_PARAMInvalid parameter
Returns
KNOX_RESULT_SUCCESS on success, an error code on error
Permission:
Usage of this API is restricted to registered clients only.
See also
knox_custom_set_settings_hidden_items
knox_custom_data_t* knox_custom_get_watch_face ( void  )

API to get watchface package name.

Since (Knox_wearable):
2.2.0
Since (Tizen):
3.0.0.0
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage:
The admin can use this API to get the watchface package name.
knox_custom_data_t * lp_data = NULL;
if((lp_data != NULL) && (lp_data->ret == KNOX_RESULT_SUCCESS)) {
if (NULL != lp_data->data) {
watchface = g_strdup((char *)lp_data->data);
knox_custom_free_custom_data(lp_data);
}
} else {
printf("Error in getting the watchface package name");
}
Returns
String with first value as watchface main key and second value as watchface sub key separated by a comma in between, NULL on fail.
See also
knox_custom_set_watch_face
knox_result_t knox_custom_set_airplane_mode_state ( knox_custom_data_airplane_mode_state_t  value)

API to turn airplane on/off.

Since (Knox_wearable):
1.1.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage
The admin can use this API to turn the airplane mode on/off on behalf of the end user.
if (ret == KNOX_RESULT_SUCCESS) {
// success
} else {
// Failed to set airplane mode state
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/knoxcustom.setting
Parameters
[in]valueKNOX_CUSTOM_AIRPLANE_MODE_ON: Turn ON the airplane mode. KNOX_CUSTOM_AIRPLANE_MODE_OFF: Turn OFF the airplane mode.
Return values
KNOX_RESULT_SUCCESSSuccessful
KNOX_RESULT_FAILGeneral failure
KNOX_RESULT_NOT_SUPPORTEDNot supported if the device does not support knox.custom feature, or if the device is not in Without Phone Connection(WPC) mode.
KNOX_RESULT_INVALID_PARAMInvalid parameter
KNOX_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Returns
KNOX_RESULT_SUCCESS on success, an error code on error
Permission:
Usage of this API is restricted to registered clients only.
knox_result_t knox_custom_set_always_on_display_state ( knox_custom_always_on_display_state_t  value)

API to turn Always On Display (AOD) ON or OFF on a device.

Since (Knox_wearable):
2.3.1
Since (Tizen):
4.0.0.4
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage
The admin can turn the Always On Display (AOD) mode ON or OFF on behalf of the end user. Turn off to prolong battery life and turn on at times when a display is needed to complete a critical task.
if (ret == KNOX_RESULT_SUCCESS) {
// success
} else {
// failed to set Always on display state
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/knoxcustom.setting
Parameters
[in]valueKNOX_CUSTOM_ALWAYS_ON_DISPLAY_STATE_ON: Turn on the Always On Display KNOX_CUSTOM_ALWAYS_ON_DISPLAY_STATE_OFF: Turn off the Always On Display.
Return values
KNOX_RESULT_SUCCESSSuccessful
KNOX_RESULT_FAILGeneral failure
KNOX_RESULT_NOT_SUPPORTEDNot supported
KNOX_RESULT_INVALID_PARAMInvalid parameter
KNOX_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
KNOX_RESULT_POLICY_RESTRICTEDRestriction by device policy.
Returns
KNOX_RESULT_SUCCESS on success, an error code on error
Permission:
Usage of this API is restricted to registered clients only.
See also
knox_custom_get_always_on_display_state
knox_result_t knox_custom_set_bluetooth_state ( knox_custom_bt_state_t  value)

API to turn Bluetooth on/off.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage
The admin can turn Bluetooth on/off a device on behalf of the end user.
if (ret == KNOX_RESULT_SUCCESS) {
// success
} else {
// failed to set Bluetooth state
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/knoxcustom.setting
Parameters
[in]valueKNOX_CUSTOM_BT_ON: Turn ON the Bluetooth. KNOX_CUSTOM_BT_OFF: Turn OFF the Bluetooth.
Return values
KNOX_RESULT_SUCCESSSuccessful
KNOX_RESULT_FAILGeneral failure
KNOX_RESULT_NOT_SUPPORTEDNot supported
KNOX_RESULT_NOW_IN_PROGRESSBluetooth adapter busy (enabling/disabling in progress)
KNOX_RESULT_INVALID_PARAMInvalid parameter
KNOX_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Returns
KNOX_RESULT_SUCCESS on success, an error code on error
Permission:
Usage of this API is restricted to registered clients only.
knox_result_t knox_custom_set_data_roaming_state ( knox_custom_data_roaming_state_t  value)

API to turn data roaming on/off.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage
The admin can turn data roaming on/off on behalf of the end user.
if (ret == KNOX_RESULT_SUCCESS) {
// success
} else {
// Failed to set data roaming state
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/knoxcustom.setting
Parameters
[in]valueKNOX_CUSTOM_DATA_ROAMING_ON: Turn data roaming on. KNOX_CUSTOM_DATA_ROAMING_OFF: Turn data data roaming off.
Return values
KNOX_RESULT_SUCCESSSuccessful
KNOX_RESULT_FAILGeneral failure
KNOX_RESULT_NOT_SUPPORTEDNot supported
KNOX_RESULT_INVALID_PARAMInvalid parameter
KNOX_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Returns
KNOX_RESULT_SUCCESS on success, an error code on error
Permission:
Usage of this API is restricted to registered clients only.
knox_result_t knox_custom_set_debuginfo_state ( knox_custom_data_debuginfo_state_t  value)

API to turn ON or OFF the DebugInfo setting on the device.

Since (Knox_wearable):
2.2.0
Since (Tizen):
3.0.0.0
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage
The admin can turn ON or OFF the DebugInfo setting on the device, without any user interaction.
if (ret == KNOX_RESULT_SUCCESS) {
// success
} else {
// failed to set DebugInfo state
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/knoxcustom.setting
Parameters
[in]valueKNOX_CUSTOM_DEBUGINFO_STATE_ON: Turn ON the DebugInfo state. KNOX_CUSTOM_DEBUGINFO_STATE_OFF: Turn OFF the DebugInfo state.
Return values
KNOX_RESULT_SUCCESSSuccessful
KNOX_RESULT_FAILGeneral failure
KNOX_RESULT_NOT_SUPPORTEDNot supported
KNOX_RESULT_INVALID_PARAMInvalid parameter
KNOX_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function
KNOX_RESULT_POLICY_RESTRICTEDRestriction by device policy.
Returns
KNOX_RESULT_SUCCESS on success, an error code on error
Permission:
Usage of this API is restricted to registered clients only.
See also
knox_custom_get_debuginfo_state
knox_result_t knox_custom_set_mobile_data_state ( knox_custom_mobile_data_state_t  value)

API to turn mobile data on/off.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage
The admin can turn mobile data on/off on behalf of the end user.
if (ret == KNOX_RESULT_SUCCESS) {
// success
} else {
// failed to set mobile data state
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/knoxcustom.setting
Parameters
[in]valueKNOX_CUSTOM_MOBILE_DATA_ON: Turn mobile data on. KNOX_CUSTOM_MOBILE_DATA_OFF: Turn mobile data off.
Return values
KNOX_RESULT_SUCCESSSuccessful
KNOX_RESULT_FAILGeneral failure
KNOX_RESULT_NOT_SUPPORTEDNot supported
KNOX_RESULT_INVALID_PARAMInvalid parameter
KNOX_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Returns
KNOX_RESULT_SUCCESS on success, an error code on error
Permission:
Usage of this API is restricted to registered clients only.
knox_result_t knox_custom_set_powersaving_mode_state ( knox_custom_powersaving_mode_state_t  value)

API to turn Power saving mode on/off on a device.

Since (Knox_wearable):
2.2.0
Since (Tizen):
3.0.0.0
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage
The admin can turn Power saving mode on/off on behalf of the end user.
if (ret == KNOX_RESULT_SUCCESS) {
// success
} else {
// failed to set Powersaving mode state
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/knoxcustom.setting
Parameters
[in]valueKNOX_CUSTOM_POWERSAVING_MODE_ON: Turn on the Power saving mode. KNOX_CUSTOM_POWERSAVING_MODE_OFF: Turn off the Power saving mode.
Return values
KNOX_RESULT_SUCCESSSuccessful
KNOX_RESULT_FAILGeneral failure
KNOX_RESULT_NOT_SUPPORTEDNot supported
KNOX_RESULT_INVALID_PARAMInvalid parameter
KNOX_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
KNOX_RESULT_POLICY_RESTRICTEDRestriction by device policy.
Returns
KNOX_RESULT_SUCCESS on success, an error code on error
Permission:
Usage of this API is restricted to registered clients only.
See also
knox_custom_get_powersaving_mode_state
knox_result_t knox_custom_set_settings_hidden_items ( knox_custom_settings_hide_state_t  state,
knox_custom_setting_hidden_items_t  elements 
)

API to hide specific settings items on a Samsung Galaxy Watch device.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage
The admin can use this API to hide specific Knox Custom settings items on behalf of the end user, such as display, sound, connections, and Galaxy Watch info.
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/knoxcustom.setting
Parameters
[in]stateThe state parameter is used to hide or unhide the given elements
[in]elementsThe elements field will specify the items from the below group to hide in settings KNOX_CUSTOM_SETTINGS_HIDE_DISPLAY: Hide Display Settings KNOX_CUSTOM_SETTINGS_HIDE_SOUND: Hide Sound Settings KNOX_CUSTOM_SETTINGS_HIDE_CONNECTION: Hide Connection Settings KNOX_CUSTOM_SETTINGS_HIDE_GEAR_INFO: Hide Galaxy Watch Info KNOX_CUSTOM_SETTINGS_HIDE_ALL: Hide all the above elments
Permission:
Usage of this API is restricted to registered clients only.
Return values
KNOX_RESULT_SUCCESSSuccessful
KNOX_RESULT_FAILGeneral failure
KNOX_RESULT_NOT_SUPPORTEDNot supported
KNOX_RESULT_INVALID_PARAMInvalid parameter
KNOX_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Returns
KNOX_RESULT_SUCCESS on success, an error code on error
See also
knox_custom_get_settings_hidden_items
knox_result_t knox_custom_set_watch_face ( const char *  clockpackagename_main,
const char *  clockpackagename_sub 
)

API to set a specific package as a watch face.

Since (Knox_wearable):
2.2.0
Since (Tizen):
3.0.0.0
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage:
The admin can use this API to set a specific package as a watch face.
1 knox_result_t setWatchface = knox_custom_set_watch_face(clockpackagename_main, clockpackagename_sub);
2 if (setWatchface != KNOX_RESULT_SUCCESS) {
3  fprintf(stderr, "Cannot set HomeActivity");
4 } else {
5  printf("Knox_custom setWatchface is successfully set");
6 }
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/knoxcustom.prokiosk
Parameters
[in]clockpackagename_mainThe mainkey name to set as watchface.
[in]clockpackagename_subThe subkey name to set as watchface.
Return values
KNOX_RESULT_SUCCESSSuccessful
KNOX_RESULT_FAILGeneral failure
KNOX_RESULT_NOT_SUPPORTEDNot supported
KNOX_RESULT_INVALID_PARAMInvalid parameters
KNOX_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
KNOX_RESULT_POLICY_RESTRICTEDRestriction by device policy.
Returns
KNOX_RESULT_SUCCESS on success, other values on fail.
Permission:
Usage of this API is restricted to registered clients only.
See also
knox_custom_get_watch_face
knox_result_t knox_custom_set_wifi_state ( knox_custom_wifi_state_t  value)

API to turn Wi-Fi on/off.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage
The admin can turn Wi-Fi on/off on behalf of the end user.
if (ret == KNOX_RESULT_SUCCESS) {
// success
} else {
// failed to set Wi-Fi state
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/knoxcustom.setting
Parameters
[in]valueKNOX_CUSTOM_WIFI_ON: Turn on Wi-Fi. KNOX_CUSTOM_WIFI_OFF: Turn off Wi-Fi.
Return values
KNOX_RESULT_SUCCESSSuccessful
KNOX_RESULT_FAILGeneral failure
KNOX_RESULT_NOT_SUPPORTEDNot supported
KNOX_RESULT_INVALID_PARAMInvalid parameter
KNOX_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Returns
KNOX_RESULT_SUCCESS on success, an error code on error
Permission:
Usage of this API is restricted to registered clients only.
knox_result_t knox_custom_widget_board_add_widget ( const char *  widget_id)

API to add a widget into the Home application widget board favorites list. For more about widgets, see Widgets.

Since (Knox_wearable):
2.4.0
Since (Tizen):
4.0.0.6
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage
The admin can add a widget into Home application widget board favorites list.
ret = knox_custom_widget_board_add_widget("Zyj5WRVa13.DynamicSample.widget002");
if (ret == KNOX_RESULT_SUCCESS) {
// success
} else {
// failed to add widget to the list
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/knoxcustom.setting
Parameters
[in]widget_idSystem level unique widget id
Return values
KNOX_RESULT_SUCCESSSuccessful
KNOX_RESULT_FAILGeneral failure
KNOX_RESULT_NOT_SUPPORTEDNot supported
KNOX_RESULT_INVALID_PARAMInvalid parameter
KNOX_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
KNOX_RESULT_POLICY_RESTRICTEDRestriction by device policy.
KNOX_RESULT_WIDGET_OVER_MAX_COUNTwidget board favorites list is full
KNOX_RESULT_WIDGET_ALREADY_ADDEDwidget has been added to the board already
Returns
KNOX_RESULT_SUCCESS on success, an error code on error
Permission:
Usage of this API is restricted to registered clients only.
See also
knox_custom_widget_board_get_widgets, knox_custom_widget_board_remove_widgets
knox_custom_data_t* knox_custom_widget_board_get_widgets ( void  )

API to get current list of Home application widget board favorites.

Since (Knox_wearable):
2.4.0
Since (Tizen):
4.0.0.6
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage
The admin can use this API in order to get current list of Home application widget board favorites
if(lp_data && lp_data->ret == KNOX_RESULT_SUCCESS) {
// success
GList *list = (GList *)lp_data->data;
if(list) {
GList *current = g_list_first(list);
while(current && current->data) {
printf("widget_id : %s", current->data);
current = g_list_next(current);
}
} else {
// widget board favorites list is empty.
}
} else {
// fail
}
Return values
KNOX_RESULT_SUCCESSSuccessful
KNOX_RESULT_FAILGeneral failure
KNOX_RESULT_NOT_SUPPORTEDNot supported
Returns
knox_custom_data_t: A list of the widget IDs and a return error code
See also
knox_custom_widget_board_add_widget, knox_custom_widget_board_remove_widgets
knox_result_t knox_custom_widget_board_remove_widgets ( void  )

API to clear the favorites list of Home application widget board.

Since (Knox_wearable):
2.4.0
Since (Tizen):
4.0.0.6
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage
The admin can clear Home application widget board favorites list
if (ret == KNOX_RESULT_SUCCESS) {
// success
} else {
// failed to clear the list
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/knoxcustom.setting
Return values
KNOX_RESULT_SUCCESSSuccessful
KNOX_RESULT_FAILGeneral failure
KNOX_RESULT_NOT_SUPPORTEDNot supported
KNOX_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function
KNOX_RESULT_POLICY_RESTRICTEDRestriction by device policy
Returns
KNOX_RESULT_SUCCESS on success, an error code on error
See also
knox_custom_widget_board_get_widgets, knox_custom_widget_board_add_widget