Call an activity method from a BroadcastReceiver. Is it possible?

I'm stuck developing an app because I need to call a method of my activity when a BroadcastReceiver is triggered. I want the BroadcastReceiver to detect when a network connection goes down and call a method of my activity which I've already written.

I've been searching and I found that more people had asked this before but nobody got an answer about how to do it.

I think that maybe android's API doesn't allow it. If it's impossible to call a method of my activity from the BroadcastReceiver are there other ways to do this?

Thanks.

6
задан Jimix 24 February 2011 в 11:50
поделиться