NetLive icon indicating copy to clipboard operation
NetLive copied to clipboard

MyBroadcastReceiver NullPointerException

Open RoundSparrow opened this issue 8 years ago • 1 comments

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())

RoundSparrow avatar Mar 25 '16 13:03 RoundSparrow

@RoundSparrow Can you submit a PR for this?

octohub avatar Mar 25 '16 15:03 octohub