Communication between Service app (background without UI) and normal native app (with ui)

Communication between Service app (background without UI) and normal native app (with ui)

BY 14 Oct 2015 Native Application Development

How can I communicate between Service app (background without UI) and normal native app (with ui)?

I tried with message port.

I was able send message to service app but the service app didnt recieve the message.

Then I tried to send message to ui app  when starting the service app using a timer 1 sec interval. but after 10-15sec the service app stoped sending messages.

At starting of the service app it able to send msg and recive msg, same for ui app too.

but after 10-15 secs the service app neither recive msg nor send message.

 

Is there any other technique to communicate with service app and ui app?

Or did I missed something, thats why service app stoped responding after sometimes?

Thanks in advance.

Written by