Skip to content

MyBroadcastReceiver NullPointerException #2

@RoundSparrow

Description

@RoundSparrow

At least on one of my test devices, I saw a null pointer in logcat.

I think it's safer to use the context that comes into the Receiver class instead....

 SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(context.getApplicationContext())

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions