FunktionWie kann ich diese Benachrichtigung ignorierbare
private void startService() {
if (!onForeground) {
Log.d(Constants.TAG, "RecordService startService");
Intent intent = new Intent(this, MainActivity.class);
// intent.setAction(Intent.ACTION_VIEW);
// intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
PendingIntent pendingIntent = PendingIntent.getActivity(
getBaseContext(), 0, intent, 0);
Notification notification = new NotificationCompat.Builder(
getBaseContext())
.setContentTitle(
this.getString(R.string.notification_title))
.setTicker(this.getString(R.string.notification_ticker))
.setContentText(this.getString(R.string.notification_text))
.setSmallIcon(R.drawable.ic_launcher)
.setContentIntent(pendingIntent).setOngoing(false)
.getNotification();
notification.flags = Notification.FLAG_AUTO_CANCEL;
startForeground(1337, notification);
onForeground = false;
}
}
was soll ich, dass ich tun machen notifiction cancalable ist, wenn ich es von der Anmeldung entfernen möchten .. Ich bin so auf Android plz help me