As I do for when I play the notification instead of launching an activity I launch an alert dialog with the numbers?
private void showNotification( RealmResults<Note> notes, String key )
{
//asignar inbox style notification
NotificationCompat.InboxStyle inboxStyle = new NotificationCompat.InboxStyle();
inboxStyle.setBigContentTitle("Resultado de la búsqueda");
for (Note note : notes) {
inboxStyle.addLine(note.getDescription() + " - " + note.getEntity());
}
Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
//construir la notificicion
NotificationCompat.Builder builder = new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_find_notification)
.setContentTitle("Util-UCF búsqueda")
.setContentText("Resultados de la búsqueda hecha con clave " + key)
.setStyle(inboxStyle)
.setSound(defaultSoundUri)
.setVibrate(new long[] {100, 250, 100, 500})
.setTicker("Búsqueda");
//Obtener una instancia del servicio NotificationManager
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
//para poner la notificacion el la barra de notificaciones
notificationManager.notify(REQUEST_CODE, builder.build());
}
Thanks for any help