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 the Receiver1 class in a different java file
is that there are many UI changes I do when I receive the broadcast.

Thanks again.
Priyank

On Nov 8, 1:52 pm, Streets Of Boston <flyingdutc...@gmail.com> wrote:
> 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 com.broadcast.BroadcastActivity*$*
>    Receiver1
>
> I would put Receiver1 in its own java file, though... then you won't have
> to worry about the bullet-points mentioned above.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to