List of usage examples for android.service.notification NotificationListenerService getApplicationContext
@Override
public Context getApplicationContext()
From source file:com.achep.acdisplay.notifications.NotificationListenerJellyBeanMR2.java
@Override public void onNotificationPosted(@NonNull NotificationListenerService service, @NonNull StatusBarNotification sbn) { if (mInitialized || !postActiveNotifications(service)) { Context context = service.getApplicationContext(); NotificationPresenter np = NotificationPresenter.getInstance(); np.postNotificationFromMain(context, OpenNotification.newInstance(sbn), 0); }//from w ww.ja v a 2 s . c o m }