Knox Tizen Wearable SDK
Custom System Manager group

System Manager group provides APIs to manage system functionality. More...

Enumerations

Functions

knox_result_t knox_custom_set_back_key_longpress (const char *appid)
 API to configure an application to launch when the physical back key is long-pressed. More...
 
knox_result_t knox_custom_set_enable_hid_state (void)
 API to set the Bluetooth HID state. More...
 
knox_result_t knox_custom_set_home_key_doublepress (const char *package_name, const char *app_id)
 API to configure an application to launch when the end user double presses the physical home key. More...
 
knox_custom_data_tknox_custom_get_home_key_doublepress (void)
 API to get the package name that is set for home key double-press. More...
 
knox_result_t knox_custom_set_boot_animation (const char *animation_path)
 API to configure boot animation on the device. More...
 
knox_result_t knox_custom_set_shutdown_animation (const char *animation_path)
 API to configure shutdown animation on the device. More...
 
knox_result_t knox_custom_clear_animation (knox_custom_clear_animation_mode mode)
 API to clear animation. More...
 
knox_result_t knox_custom_set_auto_call_answering_mode (knox_custom_auto_call_answering_mode mode)
 API to set the automatic call answering mode. More...
 
knox_result_t knox_custom_get_auto_call_answering_mode (knox_custom_auto_call_answering_mode *mode)
 API to get the status of automatic call answering mode. More...
 
knox_result_t knox_custom_set_auto_call_answering_number_whitelist (const char *numberlist, knox_custom_auto_call_answering_number_whitelist_mode mode)
 API to whitelist a number for automatic call answering. More...
 
knox_custom_data_tknox_custom_get_auto_call_answering_number_whitelist (void)
 API to get phone number whitelist for automatic call answering. More...
 
knox_result_t knox_custom_is_incoming_call_number_in_whitelist (const char *incoming_call_number, knox_custom_status_t *status)
 API to check if the incoming call number is whitelisted or not. More...
 
knox_result_t knox_custom_create_dump_state_log (void)
 API to create dump state log. More...
 
knox_result_t knox_custom_read_cool_down_mode (knox_custom_cool_down_mode *mode)
 API to get the current value of the device's cool down mode. More...
 

Detailed Description

System Manager group provides APIs to manage system functionality.

Custom System Manager group

This group provides APIs to modify system behaviours.

Required Header

#include <knox_custom.h>

Overview

Enumeration Type Documentation

Automatic call answering mode.

Since (Knox_wearable):
2.3.0
Since (Tizen):
4.0.0.0
See also
knox_custom_set_auto_call_answering_mode
Enumerator
KNOX_CUSTOM_AUTO_CALL_ANSWERING_MODE_OFF 

Auto call answering OFF mode

KNOX_CUSTOM_AUTO_CALL_ANSWERING_MODE_ON 

Auto call answering ON mode

Definition at line 68 of file knox_custom_system_manager.h.

Phone number whitelist mode for automatic call answering.

Since (Knox_wearable):
2.3.0
Since (Tizen):
4.0.0.0
See also
knox_custom_set_auto_call_answering_number_whitelist

Definition at line 79 of file knox_custom_system_manager.h.

Clear Animation mode.

Since (Knox_wearable):
2.2.0
Since (Tizen):
3.0.0.0
See also
knox_custom_clear_animation

Definition at line 91 of file knox_custom_system_manager.h.

Cool down mode.

Since (Knox_wearable):
2.3.1
Since (Tizen):
4.0.0.4
See also
knox_custom_read_cool_down_mode
Enumerator
KNOX_CUSTOM_COOL_DOWN_MODE_INIT 

Battery is overheated. Cool down mode initiated.

KNOX_CUSTOM_COOL_DOWN_MODE_RELEASE 

Battery no longer overheated. Leaving cool down mode.

KNOX_CUSTOM_COOL_DOWN_MODE_WARNING_ACTION 

A warning message is displayed to the user to warn them about device overheating.

KNOX_CUSTOM_COOL_DOWN_MODE_LIMIT_ACTION 

Only critical functions are supported while watch is cooling down.

KNOX_CUSTOM_COOL_DOWN_MODE_SHUTDOWN 

Battery is so overheated that watch needs to be turned off.

Definition at line 103 of file knox_custom_system_manager.h.

Function Documentation

knox_result_t knox_custom_clear_animation ( knox_custom_clear_animation_mode  mode)

API to clear animation.

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 clear animation.
ret = knox_custom_clear_animation(KNOX_CUSTOM_CLEAR_BOOT_ANIMATION);
if (ret == KNOX_RESULT_SUCCESS) {
// success
} else {
// failed to set
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/knoxcustom.system
Parameters
[in]modeKNOX_CUSTOM_CLEAR_BOOT_ANIMATION: Clear boot animation KNOX_CUSTOM_CLEAR_SHUTDOWN_ANIMATION: Clear shutdown animation KNOX_CUSTOM_CLEAR_ALL_ANIMATION: Clear all animation
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, other values on fail.
See also
knox_custom_set_boot_animation, knox_custom_set_shutdown_animation
knox_result_t knox_custom_create_dump_state_log ( void  )

API to create dump state log.

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 generate a device's dump state log file to analyze problems on the device. This API can support both normal and ProKiosk mode. It does not support copying to a cloud or a specific local path.
if (ret == KNOX_RESULT_SUCCESS) {
// success
} else {
// failed to get logs
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/knoxcustom.system
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.
Returns
KNOX_RESULT_SUCCESS on success, other values on fail.
knox_result_t knox_custom_get_auto_call_answering_mode ( knox_custom_auto_call_answering_mode mode)

API to get the status of automatic call answering mode.

Since (Knox_wearable):
2.3.0
Since (Tizen):
4.0.0.0
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage:
The admin can use this API to get the status of automatic call answering.
if (ret == KNOX_RESULT_SUCCESS) {
printf("Auto call answering is off");
} else {
printf ("Auto call answering is on");
}
} else {
printf("Error in getting auto call answering status");
}
Parameters
[out]modeKNOX_CUSTOM_AUTO_CALL_ANSWERING_MODE_OFF: auto call answering mode is off KNOX_CUSTOM_AUTO_CALL_ANSWERING_MODE_ON: auto call answering mode is on
Return values
KNOX_RESULT_SUCCESSSuccessful
KNOX_RESULT_FAILGeneral failure
KNOX_RESULT_NOT_SUPPORTEDNot supported
KNOX_RESULT_INVALID_PARAMInvalid parameter
Returns
KNOX_CUSTOM_AUTO_CALL_ANSWERING_MODE_OFF if off, or KNOX_CUSTOM_AUTO_CALL_ANSWERING_MODE_ON if on. An error code on failure
See also
knox_custom_set_auto_call_answering_mode
knox_custom_data_t* knox_custom_get_auto_call_answering_number_whitelist ( void  )

API to get phone number whitelist for automatic call answering.

Since (Knox_wearable):
2.3.0
Since (Tizen):
4.0.0.0
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage:
The admin can use this API to get the phone number whitelist for automatic call answering.
if (_data != NULL) {
if (_data->ret == KNOX_RESULT_SUCCESS && _data->data != NULL) {
char *whitelist = (char *)_data->data;
// do operations on whitelist
}
knox_custom_free_custom_data(_data);
} else {
printf("Error getting the whitelist");
}
Return values
KNOX_RESULT_SUCCESSSuccessful
KNOX_RESULT_FAILGeneral failure
KNOX_RESULT_NOT_SUPPORTEDNot supported
KNOX_RESULT_INVALID_PARAMInvalid parameter
Returns
knox_custom_data_t->data contains string with auto call answering number whitelist, if knox_custom_data_t->ret = KNOX_RESULT_SUCCESS. Otherwise, knox_custom_data_t->data = NULL and knox_custom_data_t->ret is one of the error results.
See also
knox_custom_is_incoming_call_number_in_whitelist
knox_custom_data_t* knox_custom_get_home_key_doublepress ( void  )

API to get the package name that is set for home key double-press.

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 package name of the home key double-press.
knox_custom_data_t * lp_data = NULL;
if ((lp_data!= NULL) && (lp_data->ret == KNOX_RESULT_SUCCESS)) {
if (NULL != lp_data->data) {
packagename = g_strdup((char *)lp_data->data);
knox_custom_free_custom_data(lp_data);
}
} else {
printf("Error in getting the packagename");
}
Returns
String with first value as package name and second value as package id separated by '/' in between, NULL on failure.
See also
knox_custom_set_home_key_doublepress
knox_result_t knox_custom_is_incoming_call_number_in_whitelist ( const char *  incoming_call_number,
knox_custom_status_t status 
)

API to check if the incoming call number is whitelisted or not.

Since (Knox_wearable):
2.3.0
Since (Tizen):
4.0.0.0
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage:
The admin can use this API to check if the incoming call number is whitelisted or not.

When incoming_call_number or status param is NULL, KNOX_RESULT_INVALID_PARAM is returned.

if (ret == KNOX_RESULT_SUCCESS) {
if (status == KNOX_CUSTOM_TRUE) {
printf("Incoming call number is whitelisted");
} else {
printf ("Incoming call number is not whitelisted");
}
} else {
printf("Error in getting incoming call number whitelisted status");
}
Parameters
[in]incoming_call_numberincoming call number to be checked in whitelist
[out]statusKNOX_CUSTOM_TRUE: If number is whitelisted KNOX_CUSTOM_FALSE: If number is not whitelisted
Return values
KNOX_RESULT_SUCCESSSuccessful
KNOX_RESULT_FAILGeneral failure
KNOX_RESULT_NOT_SUPPORTEDNot supported
KNOX_RESULT_INVALID_PARAMInvalid parameter
Returns
KNOX_CUSTOM_TRUE if whitelisted, or KNOX_CUSTOM_FALSE if not whitelisted. An error code on failure.
See also
knox_custom_get_auto_call_answering_number_whitelist
knox_result_t knox_custom_read_cool_down_mode ( knox_custom_cool_down_mode mode)

API to get the current value of the device's cool down mode.

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 read the current value of the device's cool down mode by using this API to resolve and prevent battery drain issues.
if (ret == KNOX_RESULT_SUCCESS) {
printf("Cool down init");
} else if (mode == KNOX_CUSTOM_COOL_DOWN_MODE_RELEASE) {
printf("Cool down release");
printf ("Cool down warning action");
printf ("Cool down limit action");
printf ("Cool down shutdown");
} else {
printf ("Cool down error, no case!");
}
} else {
printf("Error in getting cool down mode");
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/knoxcustom.system
Parameters
[out]modeKNOX_CUSTOM_COOL_DOWN_MODE_INIT : Cool down init KNOX_CUSTOM_COOL_DOWN_MODE_RELEASE : Cool down release mode KNOX_CUSTOM_COOL_DOWN_MODE_WARNING_ACTION : Cool down warning action mode KNOX_CUSTOM_COOL_DOWN_MODE_LIMIT_ACTION : Cool down limit action mode KNOX_CUSTOM_COOL_DOWN_MODE_SHUTDOWN : Cool down shutdown 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.
Returns
KNOX_RESULT_SUCCESS on success, other values on fail.
knox_result_t knox_custom_set_auto_call_answering_mode ( knox_custom_auto_call_answering_mode  mode)

API to set the automatic call answering mode.

Since (Knox_wearable):
2.3.0
Since (Tizen):
4.0.0.0
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage:
The admin can use this API to configure automatic call answering.
Warning
If KNOX_CUSTOM_AUTO_CALL_ANSWERING_MODE_ON is set, all incoming calls will be rejected except only whitelisted numbers (added by knox_custom_set_auto_call_answering_number_whitelist). If there is no whitelisted number, all calls will be rejected.
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/knoxcustom.system
Parameters
[in]modeKNOX_CUSTOM_AUTO_CALL_ANSWERING_MODE_OFF auto call answering mode is OFF KNOX_CUSTOM_AUTO_CALL_ANSWERING_MODE_ON auto call answering mode is ON
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, other values on fail.
See also
knox_custom_get_auto_call_answering_mode
knox_result_t knox_custom_set_auto_call_answering_number_whitelist ( const char *  numberlist,
knox_custom_auto_call_answering_number_whitelist_mode  mode 
)

API to whitelist a number for automatic call answering.

Since (Knox_wearable):
2.3.0
Since (Tizen):
4.0.0.0
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage:
The string containing the list of numbers can contain up to 8192 chars (including comma delimiters). Every number can contain at most 64 digits. Otherwise, in both cases KNOX_RESULT_INVALID_PARAM is returned.

When using KNOX_CUSTOM_AUTO_CALL_ANSWERING_NUMBER_WHITELIST_ADD or KNOX_CUSTOM_AUTO_CALL_ANSWERING_NUMBER_WHITELIST_REMOVE mode, passing NULL numberlist param results in KNOX_RESULT_INVALID_PARAM. When using KNOX_CUSTOM_AUTO_CALL_ANSWERING_NUMBER_WHITELIST_REMOVE_ALL mode, numberlist argument is ignored (can be NULL).

Note
Since 4.0.0.4 and later, it is recommended to apply the policy once more.
knox_result_t ret = knox_custom_set_auto_call_answering_number_whitelist("111,112", KNOX_CUSTOM_AUTO_CALL_ANSWERING_NUMBER_WHITELIST_ADD);
if (ret == KNOX_RESULT_SUCCESS) {
// success
} else {
// failed to set
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/knoxcustom.system
Parameters
[in]numberlistauto call answering number
[in]modeKNOX_CUSTOM_AUTO_CALL_ANSWERING_NUMBER_WHITELIST_ADD Add auto call answering number KNOX_CUSTOM_AUTO_CALL_ANSWERING_NUMBER_WHITELIST_REMOVE Delete auto call answering number KNOX_CUSTOM_AUTO_CALL_ANSWERING_NUMBER_WHITELIST_REMOVE_ALL Delete all auto call answering number
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, other values on fail.
See also
knox_custom_get_auto_call_answering_number_whitelist
knox_custom_is_incoming_call_number_in_whitelist
knox_result_t knox_custom_set_back_key_longpress ( const char *  appid)

API to configure an application to launch when the physical back key is long-pressed.

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 configure the application to launch on the long-press of the physical back key.
if (ret == KNOX_RESULT_SUCCESS) {
// success
} else {
// failed to set
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/knoxcustom.system
Parameters
[in]appidApplication 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_PACKAGE_NOT_FOUNDThe application is not installed in the device.
Returns
KNOX_RESULT_SUCCESS on success, other values on fail.
knox_result_t knox_custom_set_boot_animation ( const char *  animation_path)

API to configure boot animation 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 use this API to configure the boot animation on the device.
ret = knox_custom_set_boot_animation(animation_path);
if (ret == KNOX_RESULT_SUCCESS) {
// success
} else {
// failed to set
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/knoxcustom.system
Parameters
[in]animation_pathPath where the animation file is present
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, other values on fail.
See also
knox_custom_clear_animation
knox_result_t knox_custom_set_enable_hid_state ( void  )

API to set the Bluetooth HID state.

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 set the Bluetooth HID state. If MDM Bluetooth disable policy is enforced, Knox Custom policy will not work since the MDM policy is considered higher priority.
Note
This feature is only applicable for specific barcode scanners which support HID. This feature has been verified on specific models (Koamtac KDC200, KDC270, KDC350 and Zebra RS6000 models). For other models, please verify this feature with your barcode scanner first.
if (ret == KNOX_RESULT_SUCCESS) {
// success
} else {
// failed to set
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/knoxcustom.system
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, other values on fail.
knox_result_t knox_custom_set_home_key_doublepress ( const char *  package_name,
const char *  app_id 
)

API to configure an application to launch when the end user double presses the physical home key.

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 configure the application to launch on the double-press of the physical home key.
ret = knox_custom_set_home_key_doublepress(package_name, app_id);
if (ret == KNOX_RESULT_SUCCESS) {
// success
} else {
// failed to set
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/knoxcustom.system
Parameters
[in]package_namepackage name
[in]app_idUID of the Application
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_PACKAGE_NOT_FOUNDThe application is not installed in the device.
Returns
KNOX_RESULT_SUCCESS on success, other values on fail.
See also
knox_custom_get_home_key_doublepress
knox_result_t knox_custom_set_shutdown_animation ( const char *  animation_path)

API to configure shutdown animation 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 use this API to configure the shutdown animation on the device.
ret = knox_custom_set_shutdown_animation(animation_path);
if (ret == KNOX_RESULT_SUCCESS) {
// success
} else {
// failed to set
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/knoxcustom.system
Parameters
[in]animation_pathPath where the animation file is present
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, other values on fail.
See also
knox_custom_clear_animation