ProKiosk Manager group provides APIs to manage the device in Professional Kiosk (ProKiosk) mode.
More...
ProKiosk Manager group provides APIs to manage the device in Professional Kiosk (ProKiosk) mode.
Custom ProKiosk Manager group
This group provides APIs to enable/disable ProKiosk mode, configure applications for home activity, manage settings items and notifications.
Required Header
#include <knox_custom.h>
Enumerate hide or show the given notification elements.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2
- See also
- knox_custom_set_hide_notification_messages
Enumerator |
---|
KNOX_CUSTOM_HIDE_NOTIFICATIONS_ON |
To hide the given notification elements
|
KNOX_CUSTOM_HIDE_NOTIFICATIONS_OFF |
To show the given notification elements
|
Definition at line 59 of file knox_custom_prokiosk_manager.h.
Enumerate ProKiosk notification types.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2
- See also
- knox_custom_set_hide_notification_messages
Enumerator |
---|
KNOX_CUSTOM_NOTIFICATIONS_NONE |
Mask for showing all notifications
|
KNOX_CUSTOM_NOTIFICATIONS_BATTERY_LOW |
Mask for low battery
|
KNOX_CUSTOM_MOMENTBAR_STATE |
Mask for status bar notifications
|
KNOX_CUSTOM_NOTIFICATIONS_STATE |
Mask for notifications widget
|
KNOX_CUSTOM_NOTIFICATIONS_ALL |
Mask for hiding all notifications
|
Definition at line 34 of file knox_custom_prokiosk_manager.h.
Enumerate show or hide the prokiosk menu in device options.
- Since (Knox_wearable):
- 1.1.0
- Since (Tizen):
- 2.3.2.3
- See also
- knox_custom_set_prokiosk_exit_menu
Enumerator |
---|
KNOX_CUSTOM_PROKIOSK_EXIT_MENU_SHOW |
To show the ProKiosk exit menu in device options
|
KNOX_CUSTOM_PROKIOSK_EXIT_MENU_HIDE |
To hide the ProKiosk exit menu in device options
|
Definition at line 70 of file knox_custom_prokiosk_manager.h.
Enumerate ProKiosk settings items type, below Enum values provide bit value related to specific setting value.
- Since (Knox_wearable):
- 2.2.0
- Since (Tizen):
- 3.0.0.0
- See also
- knox_custom_set_settings_enabled_items
Enumerator |
---|
KNOX_CUSTOM_PROKIOSK_SETTINGS_BLUETOOTH |
Bluetooth
|
KNOX_CUSTOM_PROKIOSK_SETTINGS_WIFI |
Wi-Fi
|
KNOX_CUSTOM_PROKIOSK_SETTINGS_NFC |
NFC
|
KNOX_CUSTOM_PROKIOSK_SETTINGS_LOCATION |
Location
|
KNOX_CUSTOM_PROKIOSK_SETTINGS_ALL |
Bluetooth, Wi-Fi, NFC and Location
|
Definition at line 81 of file knox_custom_prokiosk_manager.h.
Enumerate enable or disable the given settings items.
- Since (Knox_wearable):
- 2.2.0
- Since (Tizen):
- 3.0.0.0
- See also
- knox_custom_set_settings_enabled_items
Enumerator |
---|
KNOX_CUSTOM_SETTINGS_SHOW_ON |
To enable the given settings items
|
KNOX_CUSTOM_SETTINGS_SHOW_OFF |
To disable the given settings items
|
Definition at line 95 of file knox_custom_prokiosk_manager.h.
API to get the package name for exiting the ProKiosk mode through UI.
- 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 get the package name that has been set for exiting ProKiosk mode through the UI.
const char * exit_ui = g_strdup((
char *)lp_data->
data);
printf("The exit-ui is %s", exit_ui);
knox_custom_free_custom_data();
} else {
printf("Error in getting the exit-ui);
}
- Returns
- string representation of exit-ui packagename on success, other values on fail.
- See also
- knox_custom_set_exit_ui
knox_result_t knox_custom_get_hide_notification_messages |
( |
int * |
hidden_items | ) |
|
API to get the status of the notifications and the moment bar.
- 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 get the status of the notifications and the moment bar to check if it's set to display or hide. Note: KNOX_CUSTOM_NOTIFICATIONS_BATTERY_LOW will be supported in later versions. Currently it's a place holder.
int hidden_items = 0;
}
} else {
printf("Error in getting Knox Custom hidenotification messages status");
}
- Parameters
-
[out] | hidden_items | The set of notifications hidden. |
- Return values
-
- Returns
- KNOX_RESULT_SUCCESS on success, other values on fail.
- See also
- knox_custom_set_hide_notification_messages
API to get the package name that is set for home activity.
- 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 get the package name set for home activity along with the clock package name.
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 homeactivity");
}
}
- Return values
-
- Returns
- String with first value as home package name and second value as clock package name separated by a comma in between, NULL on fail.
- See also
- knox_custom_set_home_activity
API to get the status of ProKiosk exit menu visibility in device options.
- 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 get the status of ProKiosk exit menu visibility in device options.
printf("ProKiosk exit menu is shown");
} else {
printf ("ProKiosk exit menu is hidden");
}
} else {
printf("Error in getting ProKiosk exit menu status");
}
- Parameters
-
[out] | state | KNOX_CUSTOM_PROKIOSK_EXIT_MENU_SHOW: ProKiosk exit menu is visible in device options. KNOX_CUSTOM_PROKIOSK_EXIT_MENU_HIDE: ProKiosk exit menu is hidden in device options. |
- Return values
-
- Returns
- KNOX_RESULT_SUCCESS on success, other values on fail.
- See also
- knox_custom_set_prokiosk_exit_menu
API to check if the state of ProKiosk mode is enabled or disabled.
- 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 get the value of ProKiosk state.
printf("ProKiosk mode is Enabled");
} else {
printf ("Porkiosk mode is disabled");
}
} else {
printf("Error in setting the ProKiosk mode");
}
- Parameters
-
[out] | state | KNOX_CUSTOM_PROKIOSK_ENABLE: ProKiosk is enabled KNOX_CUSTOM_PROKIOSK_DISABLE: ProKiosk is disabled |
- Return values
-
- Returns
- KNOX_CUSTOM_ENABLED if enabled, or KNOX_CUSTOM_DISABLED if disabled. An error code on failure
- See also
- knox_custom_set_prokiosk_state
API to get the display string set for exiting the ProKiosk mode.
- 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 get the display string set for exiting the ProKiosk mode.
char * prokiosk_string = g_strdup((
char *)lp_data->
data);
printf("The prokiosk string is %s",prokiosk_string);
knox_custom_free_custom_data();
} else {
printf("Error in getting ProKiosk string");
}
- Return values
-
- Returns
- string representation of ProKiosk string on success, other values on fail.
- See also
- knox_custom_set_prokiosk_string
knox_result_t knox_custom_get_settings_enabled_items |
( |
int * |
enabled_items | ) |
|
API to retrieve UI items enabled in the settings menu for user access.
- 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 settings enabled items.
int enabled_items = 0;
}
} else {
printf("Error in getting Knox Custom settings enabled items");
}
- Parameters
-
[out] | enabled_items | Set of setting elements that are enabled in ProKiosk mode. |
- Return values
-
- Returns
- KNOX_RESULT_SUCCESS on success, other values on fail.
- See also
- knox_custom_set_settings_enabled_items
API to set the application for exiting the ProKiosk mode through UI.
- 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 application for exiting ProKiosk mode through UI. Note: This application will be launched from the exit button (display string) which is displayed along with the power OFF option. To view the Power OFF options, long-press the physical menu key on the Galaxy Watch device.
printf(stderr, "Cannot set Exit-UI");
} else {
printf("Exit UI succesfully set");
}
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/knoxcustom.prokiosk
- Parameters
-
[in] | appid | The application to be launched to exit the ProKiosk mode through UI. |
- Return values
-
- Returns
- KNOX_RESULT_SUCCESS on success, other values on fail.
- See also
- knox_custom_get_exit_ui
API to set the status of the notifications and the moment bar to display or hide.
- 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 display or hide notifications and the moment bar. Note: KNOX_CUSTOM_NOTIFICATIONS_BATTERY_LOW will be supported in later versions, currently it's a place holder.
printf(stderr, "Cannot set the status of notification messages");
} else {
printf("Knox_custom Notification status is successfully set");
}
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/knoxcustom.prokiosk
- Parameters
-
[in] | state | KNOX_CUSTOM_HIDE_NOTIFICATIONS_ON: Hide the items KNOX_CUSTOM_HIDE_NOTIFICATIONS_OFF: Show the items |
[in] | hide_item | KNOX_CUSTOM_NOTIFICATIONS_NONE: Hide no notifications KNOX_CUSTOM_NOTIFICATIONS_BATTERY_LOW: Hide low battery notification KNOX_CUSTOM_MOMENTBAR_STATE: Hide moment bar notification KNOX_CUSTOM_NOTIFICATIONS_STATE: Hide notification widget KNOX_CUSTOM_NOTIFICATIONS_ALL: Hide Notifications and Momentbar |
- Return values
-
- Returns
- KNOX_RESULT_SUCCESS on success, other values on fail.
- See also
- knox_custom_get_hide_notification_messages
knox_result_t knox_custom_set_home_activity |
( |
const char * |
appid, |
|
|
const char * |
clockpackagename |
|
) |
| |
API to set a specific application as the launcher application in home activity.
- 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 a specific application as the launcher application in home activity.
- Warning
- The API requires both input parameters appid and clockpackagename to be specified. Otherwise, an KNOX_RESULT_INVALID_PARAM error will be returned.
1 knox_result_t setProkiosk = knox_custom_set_home_activity("com.samsung.weather", "com.samsung.watchface+com.samsung.watchface");
2 if (setProkiosk != KNOX_RESULT_SUCCESS) {
3 fprintf(stderr, "Cannot set HomeActivity");
5 printf("HomeActivity successfully set");
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/knoxcustom.prokiosk
- Parameters
-
[in] | appid | The application to set as home activity. |
[in] | clockpackagename | The package name to be set as clock activity (watch face). |
- Note
- clockpackagename param must be specified in main_package+sub_package format. Otherwise, an KNOX_RESULT_INVALID_PARAM error will be returned.
- Return values
-
- Returns
- KNOX_RESULT_SUCCESS on success, other values on fail.
- See also
- knox_custom_get_home_activity
API to hide the ProKiosk exit menu in device options.
- Since (Knox_wearable):
- 1.1.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/knox.custom
- Usage:
- By default the ProKiosk exit menu will be visible in device options. The admin can use this API to hide the ProKiosk exit menu from end users.
printf(stderr, "Error in hiding the prokiosk exit menu");
} else {
printf("Prokiosk exit menu hidden successfully");
}
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/knoxcustom.prokiosk
- Parameters
-
[in] | state | KNOX_CUSTOM_PROKIOSK_EXIT_MENU_SHOW: Show the ProKiosk exit menu in device options KNOX_CUSTOM_PROKIOSK_EXIT_MENU_HIDE: Hide the ProKiosk exit menu in device options |
- Return values
-
- Returns
- KNOX_RESULT_SUCCESS on success, other values on fail.
- See also
- knox_custom_get_prokiosk_exit_menu
knox_result_t knox_custom_set_prokiosk_passcode |
( |
const char * |
old_passcode, |
|
|
const char * |
new_passcode |
|
) |
| |
API to modify the ProKiosk passcode.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2
- Feature:
- http://developer.samsung.com/tizen/feature/knox.custom
- Note
- Since 4.0.0.4 and later, it is recommended to apply the policy once more.
- Usage:
- The admin can use this API to set a new passcode. The current passcode must be provided for security.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/knoxcustom.prokiosk
- Parameters
-
[in] | old_passcode | The current ProKiosk passcode. Passcode can't be empty. |
[in] | new_passcode | The new ProKiosk passcode. Passcode can't be empty. |
- Return values
-
- Returns
- KNOX_RESULT_SUCCESS on success, other values on fail.
- See also
- knox_custom_set_prokiosk_state
API to enable or disable ProKiosk mode with a passcode.
- 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 state of ProKiosk. After entering the correct passcode, ProKiosk can be enabled or disabled.
printf(stderr, "Cannot set ProKiosk new state");
} else {
printf("Knox_custom ProKiosk new state successfully set");
}
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/knoxcustom.prokiosk
- Parameters
-
[in] | new_state | KNOX_CUSTOM_PROKIOSK_ENABLE: Enable ProKiosk KNOX_CUSTOM_PROKIOSK_DISABLE: Disable ProKiosk |
[in] | passcode | The passcode to enable ProKiosk mode or to disable ProKiosk mode. Passcode can't be empty. |
- Return values
-
- Returns
- KNOX_RESULT_SUCCESS on success, other values on fail.
- See also
- knox_custom_get_prokiosk_state
knox_result_t knox_custom_set_prokiosk_string |
( |
const char * |
prokiosk_string | ) |
|
API to customize the strings displayed when exiting ProKiosk mode.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2
- Feature:
- http://developer.samsung.com/tizen/feature/knox.custom
- Usage:
- The default strings displayed is "ProKiosk mode". The admin can use this API to customize the strings displayed when exiting ProKiosk mode.
printf(stderr, "Cannot set ProKiosk string");
} else {
printf("Knox_custom ProKiosk string successfully set");
}
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/knoxcustom.prokiosk
- Parameters
-
[in] | prokiosk_string | The display string to be used for exiting the ProKiosk mode. |
- Return values
-
- Returns
- KNOX_RESULT_SUCCESS on success, other values on fail.
- See also
- knox_custom_get_prokiosk_string
API to enable/disable UI items in the settings menu for end user access.
- Since (Knox_wearable):
- 2.2.0
- Since (Tizen):
- 3.0.0.0
- Feature:
- http://developer.samsung.com/tizen/feature/knox.custom
- Usage:
- By default all setting items are disabled for the user in ProKiosk mode. The admin can use this API to enable/disable settings items, for end user access. Note: To access Settings menu during ProKiosk mode, call the Native API, https://developer.tizen.org/dev-guide/3.0.0/org.tizen.native.mobile.apireference/group_CAPI_APP_CONTROL_MODULE.html
printf(stderr, "Cannot set settings enabled items");
} else {
printf("the selected setting items are successfully enabled");
}
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/knoxcustom.prokiosk
- Parameters
-
[in] | state | KNOX_CUSTOM_SETTINGS_SHOW_ON: Enable UI items KNOX_CUSTOM_SETTINGS_SHOW_OFF: Disable UI items |
[in] | items | KNOX_CUSTOM_PROKIOSK_SETTINGS_BLUETOOTH: Bluetooth item enabled KNOX_CUSTOM_PROKIOSK_SETTINGS_WIFI: Wi-Fi item enabled KNOX_CUSTOM_PROKIOSK_SETTINGS_NFC: NFC item enabled KNOX_CUSTOM_PROKIOSK_SETTINGS_LOCATION: Location item enabled KNOX_CUSTOM_PROKIOSK_SETTINGS_ALL: All settings items enabled |
- Return values
-
- Returns
- KNOX_RESULT_SUCCESS on success, other values on fail.
- See also
- knox_custom_get_settings_enabled_items