tags:

views:

35

answers:

1

Hi, I have preperd a remote service, i would like to know if it's possible somehow via this service to call another activities? coz usually what ive seen so far, is how external apps calling the remote service and using it's methods, but i want vice versa.. that the remote service will call an external app's activity,

thanks,

moshik.

A: 

You can have an activity register a callback or listener object with the remote service, that the service can then use to call back into the activity. See here and here for sample projects.

CommonsWare
Ive checked your samples, and ive noticed u made a remote service, but i cant realy understand there, on which part you actully called another activies from that remote service..thanks
Moshik
Look at `IScriptResult` and how it is used on both the client and server side.
CommonsWare
I still couldnt find the line where you launch new activity from the service, mybe the sample is little bit complicated for someone who just started to work with remote services
Moshik
Please check that thread: http://stackoverflow.com/questions/2735927/running-activity-from-remote-service
Moshik
I do not launch an activity from a remote service. *You* should not launch an activity from a service except in very special circumstances. Your activity will interrupt the user in the middle of what they are doing (talking on the phone, writing a text message, playing a game, etc.).
CommonsWare