Languages

Menu
Sites
Language
Interaction between two apps

Hi All,

 

I am aiming to have two apps (A & B) interacting, i.e. I would like to expose some interface from One app (A), so that I can use these interfaces from another App (B).

Does the tizen framework support this? If yes, can you share the material, links and examples of this.

I was referring Android, where in I see this is achieved thru "Intents" in android. 

Is the similar approach possible in Tizen. My target device is a Mobile device.

Thanks,

Ashwini

Responses

8 Replies
Shinjae Lee

Dear Ashwini,

 

In case of tizen, as far as I understood, app control is used for intents.

Mats Wichmann

It really depends on what you want to do.

Application control is a way to launch a given app based on particular criteria and there is ApplicationControlData and Data Control as ways to pass data between two apps. But that doesn't sound quite like what you're asking for, because it doesn't expose particular interfaces to call.

Could you be a little more explicit about your use case? (and do you care if it's web or native)?

 

AVSukhov

Hello,

You can use AppControl functionality:

https://developer.tizen.org/documentation/guides/web-application/tizen-features/application/application

Also you can use Data Control functionality:

https://developer.tizen.org/documentation/guides/web-application/tizen-features/application/data-control

Or Message Port functionality:

https://developer.tizen.org/documentation/guides/web-application/tizen-features/inputoutput/message-port

 

It all depends on your requirements.

Seoghyun Kang

Hello,

 

I'd like to write the sample code about the AppControl. It is very easy :)

 

[AppCallee]

You need to add the following code at the config.xml.

<tizen:app-control>
    <tizen:src name="index.html"/>
    <tizen:operation name="http://tizen.org/appcontrol/operation/appcall"/>
</tizen:app-control>

 

[AppCaller]

If you run the following javascript code, you can launch the AppCallee on the AppCaller.

appControl = new tizen.ApplicationControl(
    'http://tizen.org/appcontrol/operation/appcall',
    null,
    null,
    null);


tizen.application.launchAppControl(
    appControl,
    null,
    function() {
        // TODO : Success
    },
    function(e) {
        // TODO : Fail
    },
    function() {
          // TODO : Replyback
    }
);

 

Ashwini Kumar

HI All,

I am not aiming at launching another App from myApp. The app is a Native app.

I aim to call procedures in one App from myApp. This is on the lines of RPC(remote procedure call).

Somewhere I read about dbus, but couldn't find Tizen examples for that. Will DBUS be the right thing to use?

Thanx,

Ashwini

Marco Buettner

For communication between two apps you should use "MessagePort"

AVSukhov
Hello,

just fyi, more info about message port api:

Guide:

https://developer.tizen.org/dev-guide/2.3.0/org.tizen.web.apireference/html/device_api/mobile/tizen/messageport.html 

Tutorial:

https://developer.tizen.org/dev-guide/2.3.0/org.tizen.tutorials/html/web/tizen/input_output/message_port_tutorial_w.html

API Reference:

https://developer.tizen.org/dev-guide/2.3.0/org.tizen.web.apireference/html/device_api/mobile/tizen/messageport.html
Alex Dem

Hi,
fyi, and tutorial for native:

https://developer.tizen.org/dev-guide/native/2.3.0/org.tizen.mobile.native.appprogramming/html/tutorials/app_tutorial/message_port_tutorial.htm
Alexey.