On Click Of Hardware Button Of Mobile Then It Should Exit From TIZEN Application
I have developed tizen application and i want to use hardware button,once user click on hardware button it should exit from application.I am developing TIZEN application.The hardwa
Solution 1:
There are two type of application is exist in TIZEN (2.3)
If you make web application,
document.addEventListener('tizenhwkey', function(e) {
if(e.keyName == "back") {
try {
tizen.application.getCurrentApplication().exit();
} catch (error) {
console.error("getCurrentApplication(): " + error.message);
}
}
});
but if you want native application, you can get back button event with EFL Extension API
#include <efl_extension.h>
static void
win_back_cb(void *data, Evas_Object *obj, void *event_info)
{
appdata_s *ad = data;
/* Let window go to hide state. */
elm_win_lower(win);
}
eext_object_event_callback_add(ad->win, EEXT_CALLBACK_BACK, win_back_cb, ad);
Post a Comment for "On Click Of Hardware Button Of Mobile Then It Should Exit From TIZEN Application"