Last active
August 24, 2017 18:52
-
-
Save karthiks/d4239fc6aba6f0c58505ea2f3a7b4249 to your computer and use it in GitHub Desktop.
Create NotificationManager from SystemService
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NotificationUtils extends ContextWrapper { | |
private NotificationManager notificationManager; | |
public NotificationManager getNotificationManager() { | |
if (notificationManager == null) { | |
notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); | |
} | |
return notificationManager; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment