getApplication in BroadcastReceiver in android

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

i am using thi link: http://www.devahead.com/blog/tag/application/

but getApplication not exits in BroadcastReceiver, How can i use it?

I need it becouse i want to share data between two BroadcastReceiver


你的BroadcastReceiver有一个onReceive(Context ctx, Intent intent)方法,它被调用来接收消息......你正在交付一个上下文。

链接地址: http://www.djcxy.com/p/11088.html

上一篇: 对于WORD,cmpxchg比BYTE快

下一篇: android中的BroadcastReceiver中的getApplication