Get an instance of it like the docs say:
NotificationManager nm = (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
Since you didn't post more code, it's hard to tell what you can use for context
. If you do have a Context
variable, use it. If your listener is contained in an Activity/Service do MyActivity.this
or MyService.this
instead of the context
variable that I used in my code snippet.