Getting result from APP_CONTROL_OPERATION_CREATE_CONTENT

Getting result from APP_CONTROL_OPERATION_CREATE_CONTENT

BY 14 Jul 2015 Native Application Development

Hi

Im launching a camera  to take photo and use the saved photo. But i am not able to get the path of the saved image file from the app_control_reply_cb.

 

#define IMAGE_MIME_TYPE "image/*"

app_control_create(&app_control);
app_control_set_operation(app_control, APP_CONTROL_OPERATION_CREATE_CONTENT);
app_control_set_mime(app_control, IMAGE_MIME_TYPE);

if (app_control_send_launch_request(app_control, file_select_result_cb, NULL) == APP_CONTROL_ERROR_NONE)
{
       dlog_print(DLOG_DEBUG, LOG_TAG_FACEBOOK, "Succeeded to launch a viewer app.");
}

After taking the picture and saving it,  “file_select_result_cb”  is called.

        ret = app_control_get_extra_data(reply, APP_CONTROL_DATA_SELECTED, &value);
        if ( ret == APP_CONTROL_ERROR_NONE)
        {
            dlog_print(DLOG_DEBUG, LOG_TAG_FACEBOOK, "[app_control_result_cb] Succeeded: value(%s)", value);
        }

Here im getting the following error.

[app_control_extra_data_cb] Failed: key(http://tizen.org/appcontrol/data/selected), Error code: -126

Please help

 

Written by