I want my AppWidget (homescreen widget) to communicate with a Service
, when the user presses a Button
on it. That Service
needs to be permanently running as long as the appWidget lives. As far as I know the only way to react on a widget's onClick
event is to send PendingIntents
via broadcasts. Currently I'm receiving these at my MainActivity
, which forwards it to the running Service
.
So actually I'm using my MainActivity
as some kind of proxy for my widget's incoming events. Is this the right way? I would prefer to communicate with my Service
directly - is this possible?