Skip to content

Instantly share code, notes, and snippets.

@SubhrajyotiSen
Created December 5, 2021 19:24
Show Gist options
  • Save SubhrajyotiSen/03793bb61a0d40a7463c077aa20ac9ef to your computer and use it in GitHub Desktop.
Save SubhrajyotiSen/03793bb61a0d40a7463c077aa20ac9ef to your computer and use it in GitHub Desktop.
val notificationManager = NotificationManagerCompat.from(context)
// internally it does the following
public static NotificationManagerCompat from(@NonNull Context context) {
return new NotificationManagerCompat(context);
}
private NotificationManagerCompat(Context context) {
mContext = context;
mNotificationManager = (NotificationManager) mContext.getSystemService(
Context.NOTIFICATION_SERVICE);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment