アプリケーションを作成し、イベントを使用して Android 通知バーに通知を追加できました。次に、イベント時に通知バーからその通知を削除する方法のサンプルが必要です。
ベストアンサー1
このクイックコードを試すことができます
public static void cancelNotification(Context ctx, int notifyId) {
String ns = Context.NOTIFICATION_SERVICE;
NotificationManager nMgr = (NotificationManager) ctx.getSystemService(ns);
nMgr.cancel(notifyId);
}