Example usage for android.service.notification NotificationListenerService getApplicationContext

List of usage examples for android.service.notification NotificationListenerService getApplicationContext

Introduction

In this page you can find the example usage for android.service.notification NotificationListenerService getApplicationContext.

Prototype

@Override
    public Context getApplicationContext() 

Source Link

Usage

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
}