Skip to content Skip to sidebar Skip to footer

Notification From Intentservice - Nullpointerexception While Obtaining Context

I am unable to generate the notification (in the notification area) from an IntentService. I get a NullPointerException while obtaining NotificationManager. The problem is with Con

Solution 1:

Move your call to getSystemService out of the constructor and into onCreate.

The base Context in the ContextWrapper has not been set yet, which is causing the NullPointerException.

Post a Comment for "Notification From Intentservice - Nullpointerexception While Obtaining Context"