Languages

Menu
Sites
Language
Not able to launch music application for picking music files.

Hi,

I am trying to port my app from Tizen 2.3 to 2.4. I am trying to launch music application to import some mp3 files but it is throwing the error "APP_CONTROL_ERROR_APP_NOT_FOUND". Below is the code snippet.

    int ret = APP_CONTROL_ERROR_NONE;
	app_control_h svc_handle = NULL;

	ret = app_control_create(&svc_handle);
	if (ret != APP_CONTROL_ERROR_NONE)
			dlog_print(DLOG_ERROR, LOG_TAG, "app_control_create Error ret value = %d", ret);

	ret = app_control_set_operation(svc_handle, APP_CONTROL_OPERATION_PICK);
	if (ret != APP_CONTROL_ERROR_NONE)
			dlog_print(DLOG_ERROR, LOG_TAG, "app_control_set_operation Error ret value = %d", ret);

	ret = app_control_set_mime(svc_handle, "audio/*");
	if (ret != APP_CONTROL_ERROR_NONE)
			dlog_print(DLOG_ERROR, LOG_TAG, "app_control_set_mime Error ret value = %d", ret);

	ret = app_control_add_extra_data(svc_handle, APP_CONTROL_DATA_SELECTION_MODE, "multiple");
	if (ret != APP_CONTROL_ERROR_NONE)
			dlog_print(DLOG_ERROR, LOG_TAG, "app_control_add_extra_data Error ret value = %d", ret);

	app_control_set_launch_mode(svc_handle, APP_CONTROL_LAUNCH_MODE_GROUP);

	char max_count[10] = { 0, };
	snprintf(max_count, sizeof(max_count), "%d", 100);

	ret = app_control_add_extra_data(svc_handle, "max-count", max_count); /* At a time only 100 images can be attached */
	if (ret != APP_CONTROL_ERROR_NONE)
			dlog_print(DLOG_ERROR, LOG_TAG, "app_control_add_extra_data Error ret value = %d", ret);

	ret = app_control_send_launch_request(svc_handle, _launch_music_app_result_cb, ad);
	if (ret != APP_CONTROL_ERROR_NONE)
			dlog_print(DLOG_ERROR, LOG_TAG, "app_control_send_launch_request Error ret value = %d", ret);

 

I have tried commenting out app_control_set_launch_mode, app_control_add_extra_data apis but still its not working. When i change the mime type from "audio/*" to "image/*" It launches image viewer.

Note: The above code was working in 2.3 with mime type "audio/mpeg"

Responses

1 Replies
Alex Dem

Hi,
I have checked on Z3 too. Looks like it does not work with "audio\*" just. I think this is error. Other mime types works well ( "*/*" even).
Alexey.