GetApplication in BroadcastReceiver in android

I want to use app = (MyApplication)getApplication(); at BroadcastReceiver

I use this link: http://www.devahead.com/blog/tag/application/

but getApplication does not go into BroadcastReceiver, how can I use it?

I need this because I want to exchange data between two BroadcastReceiver

+7
source share
1 answer

Your BroadcastReceiver has an onReceive(Context ctx, Intent intent) method onReceive(Context ctx, Intent intent) , which is called to receive the message ... you manually pass the context.

+3
source

All Articles