Eitan Schwartz
Eitan Schwartz

Reputation: 463

What is the context being passed to a onBootComplete broadcast receiver?

I'm trying to access a method in a class other than that of my B.R. since it's a bootcomplete B.R. I can't override its constructor and pass arguments.

I was thinking of trying to go through the context since I can think of no other way, only problem is I can't find anywhere a mention of what is the context being passed to it.

Any help will be much appreciated.

Upvotes: 0

Views: 168

Answers (1)

Eitan Schwartz
Eitan Schwartz

Reputation: 463

Ok, I've managed to find out. If anyone ever needs this kind of info, the context being passed is 'android.app.ReceiverRestrictedContext'.

About accessing the other class i had to convert it to a singleton class.

Hope it might help someone someday..

Upvotes: 2

Related Questions