Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the context passed by android in the onReceive() of BroadcastReceiver

Tags:

android

When I instantiate a BroadcastReceiver and when onReceive() is get called by android framework, what is the context passed to the onReceive() method? Is that an activity context? of an application context?

Thank you.

like image 788
michael Avatar asked Feb 01 '12 18:02

michael


1 Answers

It Is An Application Context.

public abstract void onReceive (Context context, Intent intent)
like image 128
coder_For_Life22 Avatar answered Sep 21 '22 14:09

coder_For_Life22