Newer
Older
package com.notificationFramework.notification;
import android.app.NotificationManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import com.notificationFramework.sedentary.frontEnd.R;
/**
* Created by pharmacy on 25/06/2018.
*/
public class FeedbackNotificationCanceller extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
try {
nm.cancelAll();
} catch(NullPointerException e){
Log.i("NOTIFICATION", "NOTIFICATION WAS CLICKED ON");
}
}
}