Back to top

Register a customization app

For the Knox Custom client app to set or apply policies on the Gear device, you must first register the app.

To register the client app, call knox_custom_register_client (const char *pkg_name) API method.

int ret = KNOX_RESULT_SUCCESS;
ret = knox_custom_register_client("com.samsung.knox_custom_test_tool");

Once the app is registered, call knox_custom_get_service (void) or the knox_custom_get_service_ext (const char *pkg_name) to verify if the app is registered, and also to get the service from the Knox Custom server daemon.

int ret = knox_custom_get_service_ext("com.samsung.knox_custom_test_tool");
if (ret == KNOX_RESULT_SUCCESS) {
  call Knox Custom APIs
}
knox_custom_release_service();

To de-register

Call the knox_custom_deregister_client (const char *pkg_name) API method to de-register the client app.

The policies set by the client app will remain as is even if the app is de-registered that is, there will be no change in the state of Gear device.

On this page

Is this page helpful?