Share data between local service and the hosting activity
Posted
by Moshik
on Stack Overflow
See other posts from Stack Overflow
or by Moshik
Published on 2010-05-04T07:12:01Z
Indexed on
2010/05/04
7:18 UTC
Read the original article
Hit count: 165
android
|android-sdk
Hi,
i need to share data between a local service and his hosting activity, i`am using sendBroadcast in order to send data to the hosting activity from the service, but if i want to send data back to the service from the hosting activity?
so i though to create static method on the service, and call from the activity, and through it send the parameter, but then i cant do operations like toast inside that static method(which is inside the service)..
coz you cant use "myclass.this" inside a static method, i guess there r more limits..
mybe another solution? mybe there is a proper way for this task?
thanks,
moshik.
© Stack Overflow or respective owner