Как я могу обновить существующие уведомления в Android?Android

Форум для тех, кто программирует под Android
Ответить
Anonymous
 Как я могу обновить существующие уведомления в Android?

Сообщение Anonymous »

Я использую следующий код для отображения уведомления. После отображения уведомления я перехожу к действию, если нажимаю на уведомления.

Код: Выделить всё

void Notify(String notificationTitle, String notificationMessage){
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
Notification notification = new Notification(R.drawable.noti, notificationTitle,System.currentTimeMillis());

Intent notificationIntent = new Intent(this, SmsActivity.class);

notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP
| Intent.FLAG_ACTIVITY_SINGLE_TOP);

PendingIntent intent = PendingIntent.getActivity(this, 0,
notificationIntent, 0);

notification.setLatestEventInfo(this, notificationTitle,notificationMessage, intent);
notification.flags |= Notification.FLAG_AUTO_CANCEL;
notificationManager.notify(0, notification);
}
Теперь я хочу обновить текст уведомлений. Как я могу это сделать?

Подробнее здесь: https://stackoverflow.com/questions/325 ... in-android
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Android»