简体   繁体   English

如何使用Kiosk模式创建Tizen可穿戴本机应用程序

[英]How to create Tizen wearable native App with Kiosk Mode

I'm trying to build Tizen wearable native app with Kiosk mode. 我正在尝试使用Kiosk模式构建Tizen可穿戴原生应用。 Like getting admin access. 喜欢获得管理员权限。

So far i found this KNOX SDK for Tizen native app. 到目前为止,我发现了这个针对Tizen原生应用的KNOX SDK But i can't found any documentation related to importing that library and can't find any samples. 但我找不到任何与导入该库相关的文档,也找不到任何样本。

Is there any other way to override hardware keys. 有没有其他方法来覆盖硬件密钥。

I don't know about KIOSK MODE. 我不知道KIOSK MODE。

But I will write about hardware key override. 但我会写一下硬件密钥覆盖。 First of all, you can find about hardware key grab in link https://developer.tizen.org/development/ui-practices/native-application/efl/hardware-input-handling/grabbing-hardware-key-events 首先,您可以在链接https://developer.tizen.org/development/ui-practices/native-application/efl/hardware-input-handling/grabbing-hardware-key-events中找到有关硬件密钥抓取的信息。

You can find hardware key name as below code. 您可以在以下代码中找到硬件密钥名称。 and all hardware key name is listed below link. 并且所有硬件密钥名称都列在下面的链接中。

https://developer.tizen.org/development/ui-practices/native-application/efl/hardware-input-handling/grabbing-hardware-key-events#keystring https://developer.tizen.org/development/ui-practices/native-application/efl/hardware-input-handling/grabbing-hardware-key-events#keystring

    #incldue <Ecore.h>
    #include <efl_extention.h>

    static void
    create_base_gui(appdata_s *ad)
    {
        :
        //  evas_object_smart_callback_add(ad->win, "delete,request", win_delete_request_cb, NULL);
        //  eext_object_event_callback_add(ad->win, EEXT_CALLBACK_BACK, win_back_cb, ad);
         eext_win_keygrab_set(ad->win, "XF86Home");
        :
    }
    static Eina_Bool
    _key_down_cb (void *data, int type, void *ev)
    {
        Ecore_Event_Key *event = ev;

        dlog_print(DLOG_ERROR, LOG_TAG, "key is %s", event->key);

       // Let the event continue to other callbacks which have not been called yet
       return ECORE_CALLBACK_DONE;
    }

    static bool
    app_create(void *data)
    {
        appdata_s *ad = data;

        create_base_gui(ad);
       :
        ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _key_down_cb, NULL);

    }

This sample code based on BasicUi online example code in SDK. 此示例代码基于SDK中的BasicUi在线示例代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM