When you called notify on the notification manager you gave it an id - that is the unique id you can use to access it later (this is from the notification manager:
Java
notificationManagerCompat.notify(id, nohtif.build()); // build
To cancel, you would call:
notificationManagerCompat.cancel(1); //dismiss
if you are use BroadcastReceive