Then you'd have to do two things:
- Make Receiver1 a static class: public *static *class Receiver1 extends
BroadcastReceiver
If not, instances of Receiver1 cannot be instantiated without an
enclosing BroadcastActivity instance.
- Change the name in your manifest to
Thanks for the reply. The 2 changes you mentioned made it work.
But the problem now I am facing is that, I cannot call a method which
belongs to the main class(BroadcastActivity ) from onReceive() since
the Receiver1 class is static. Is there any way to deal with this.
The reason I can not put
On Tue, Nov 8, 2011 at 2:45 PM, Priyank priyankvma...@gmail.com wrote:
Thanks for the reply. The 2 changes you mentioned made it work.
But the problem now I am facing is that, I cannot call a method which
belongs to the main class(BroadcastActivity ) from onReceive() since
the Receiver1 class
Hi,
I had tried initially by dynamically using registering the receivers
using the registerReceiver(). I get the callback when I the
application is in the foreground. The problem I faced was that, when I
exit the application, I never got a callback on the receiver when I
try to trigger it from my
4 matches
Mail list logo