Subscription preference

Notification emails are sent to your Samsung account email address.

* Email : anonymous@samsung.com

  

Close

How can I know operation, mime, URI of built-in apps, to launch them via app control?

Forums View
Started by Developer dbwlgh628 , 4550 Seed Jan 16, 2018 15:44 Replies : 6 View : 597 Likes : 1
Hi.

I tried to get the result from a built-in app, which has app ID "com.samsung.watchface-add-shortcut". This is the built-in app to select and make the short-cut for other apps.

However, I couldn't get the useful data from it. Here is my code.

------------------------

static bool
_app_control_extra_data_cb(app_control_h app_control, const char *key, void *user_data)
{
   /* Do something, but IT NEVER CALLED!!! */

   return true;
}

static void
app_control_result(app_control_h request, app_control_h reply, app_control_result_e result, void *user_data)
{
   if (result == APP_CONTROL_RESULT_SUCCEEDED) {
      ret = app_control_foreach_extra_data(request, _app_control_extra_data_cb, 0);
   }
}

static void
launch_app(){
   app_control_h app_control;
   app_control_create(&app_control);
   app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT);
   app_control_set_mime(app_control, "*/*");
   app_control_set_app_id(app_control, "com.samsung.watchface-add-shortcut");
   int ret = app_control_send_launch_request(app_control, app_control_result, NULL);
   app_control_destroy(app_control);
}

------------------------



As you can see, the built-in app "com.samsung.watchface-add-shortcut" is successfully launched via function "launch_app()", and callback function "app_control_result()" is called.

However, launched app brings no extra data or user data when users select the app on the list. As a result, the function "_app_control_extra_data_cb()" never called.

3rd party developers can not know specific app control property such as operation, mime, URI, etc., to call this built-in application via app control.

Can I get these information? Or, is the app inaccessible to 3rd party developers? If so, it is very regrettable because this built-in app is very useful for developers.

Thanks regards!
dbwlgh628 choose iqbal.sublime ’s reply as the Best Answer. iqbal.sublime earned +250 SEED. Jan 17, 2018 16:29
Post Reply
Board View
Samsung Developer iqbal.sublime , 36630 Seed Jan 17, 2018 05:40 Post #1 0
hi, If the app doesn't return any value, how can you get data? May be that app is not returning any data. 
Post Reply
Board View
Developer dbwlgh628 , 4550 Seed Jan 17, 2018 05:45 Post #2 0


This content has been quoted from iqbal.sublime’s thought.

hi, If the app doesn’t return any value, how can you get data? May be that app is not returning any data. 


Hi. In my guess, this app must retrun data. Otherwise, caller apps(Shortcut widget, Watchface, etc.) of this callee app can not make a shortcut which is based on the returned app data(app ID, icon path, etc.). So i can certain that it returns selected app data.
Post Reply
Board View
Samsung Developer iqbal.sublime , 36630 Seed Jan 17, 2018 05:58 Post #3 0


This content has been quoted from dbwlgh628’s thought.

 



This content has been quoted from iqbal.sublime’s thought. 

hi, If the app doesn’t return any value, how can you get data? May be that app is not returning any data. 


Hi. In my guess, this app must retrun data. Otherwise, caller apps(Shortcut widget, Watchface, etc.) of this callee app can not make a shortcut which is based on the returned app data(app ID, icon path, etc.). So i can certain that it returns selected app data.

 

App ID and Icon Path is static.. And without app id how can that app call this app... 
Post Reply
Board View
Developer dbwlgh628 , 4550 Seed Jan 17, 2018 07:02 Post #4 1


This content has been quoted from iqbal.sublime’s thought.

 



This content has been quoted from dbwlgh628’s thought.

 



This content has been quoted from iqbal.sublime’s thought. 

hi, If the app doesn’t return any value, how can you get data? May be that app is not returning any data. 


Hi. In my guess, this app must retrun data. Otherwise, caller apps(Shortcut widget, Watchface, etc.) of this callee app can not make a shortcut which is based on the returned app data(app ID, icon path, etc.). So i can certain that it returns selected app data.

 

App ID and Icon Path is static.. And without app id how can that app call this app... 

 

What I want to know is way to get the data from "com.samsung.watchface-add-shortcut" :)

I expected that "com.samsung.watchface-add-shortcut" returns app ID, app icon, and other information to make shortcut for selected app.

In my guess, the type of these returned values can be extra data or user data, but I can not get the extra data, and user data was null.

So I concluded that the launch options(operation, name,) of this app control is wrong, but I couldn't figure out the information about launch options to get the information from "com.samsung.watchface-add-shortcut'.

Post Reply
Board View
Samsung Developer iqbal.sublime , 36630 Seed Jan 17, 2018 10:51 Post #5 0


This content has been quoted from dbwlgh628’s thought.

 



This content has been quoted from iqbal.sublime’s thought. 

 



This content has been quoted from dbwlgh628’s thought. 

 



This content has been quoted from iqbal.sublime’s thought.  

hi, If the app doesn’t return any value, how can you get data? May be that app is not returning any data. 


Hi. In my guess, this app must retrun data. Otherwise, caller apps(Shortcut widget, Watchface, etc.) of this callee app can not make a shortcut which is based on the returned app data(app ID, icon path, etc.). So i can certain that it returns selected app data. 

 

App ID and Icon Path is static.. And without app id how can that app call this app...  

 

What I want to know is way to get the data from "com.samsung.watchface-add-shortcut" :)

I expected that "com.samsung.watchface-add-shortcut" returns app ID, app icon, and other information to make shortcut for selected app.

In my guess, the type of these returned values can be extra data or user data, but I can not get the extra data, and user data was null.

So I concluded that the launch options(operation, name,) of this app control is wrong, but I couldn’t figure out the information about launch options to get the information from "com.samsung.watchface-add-shortcut’.

 

You may try appControlReplyCB to get the data. 
follow the section Launching Applications with the Application Control from here  developer.tizen.org/development/guides/web-application/application-management/application-information-and-controls/application-controls#handle
Post Reply
Board View
Newbie alexblack , 470 Seed Jan 29, 2018 11:29 Post #6 0
Guys thanks for answers
What do you think about Netflix app?

Netflix is one of the most popular and widely used apps for those, who are the greatest fans of the movies. Thanks to the popularity of that application, lots of beginning programmers and designers found out, that such a business plan might be pretty interesting and promising. I found good article here https://artjoker.net/blog/how-to-develop-an-app-like-netflix/
Post Reply