I am trying to write a tizen program which has to do the following
I do not find any sample code anywhere .. Did anyone already tried something like this?
In Tizen native you can implement this by following the process below:
evas_object_smart_callback_add(ad->button, "clicked", _btn_clicked, ad);
static void _btn_clicked(void *user_data, Evas_Object *obj, void *event_info)
{
app_control_h app_control = NULL;
app_control_create(&app_control);
app_control_set_app_id(app_control, "com.samsung.call");
app_control_add_extra_data(app_control, "number", THE_NUMBER_YOU_WANT_TO_CALL);
app_control_add_extra_data(app_control, "launch-type", "MO");
if(app_control_send_launch_request(app_control, NULL, NULL) == APP_CONTROL_ERROR_NONE)
{
dlog_print(DLOG_INFO, "test", "error");
}
app_control_destroy(app_control);
}
NOTE: Don't forget to add the lines below in the manifest file:
<privilege>http://tizen.org/privilege/call</privilege>
<privilege>http://tizen.org/privilege/appmanager.launch</privilege>
I've shown the implementation for simple click event. You can implement the call action for a long press event in a similar way. For the implementation of long press event follow this link.