PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → NOTIFICATION PUSH ANDROID ..BADGE
NOTIFICATION PUSH ANDROID ..BADGE
Débuté par PILAR, 03 juin 2021 18:00 - 2 réponses
Posté le 03 juin 2021 - 18:00
Buenos dias,
Tengo una pregunta referente a .badge en las notification push en android.
Este es mi código:

maNotif est un Notification

maNotif.Message = sMessage
maNotif.Contenu = sContenu

////////////////////////////////////////////////////////////////
// Android

// Titre
maNotif.Titre = sTitre

// Son Android
maNotif.Son = "son_notif.mp3"

// Icône
maNotif.Icone = "" // mettre ici l'icône pour la notification

// Groupe des notifications
maNotif..Groupe = "Push"

// Texte déroulant
maNotif.TexteDéroulant = sTexteDeroulant

// Options
maNotif.Vibration = bVibration
maNotif.AffichageLED = bLED
maNotif.Supprimable = bSupprimable
maNotif.ActiveApplication = bApplicationActive

// badge
maNotif.Category.BadgeEnabled = True

maNotif..Badge = 1

Recibo la notificación pero el número no aparece en el icono.
No sé si alguien podría ayudarme.
Gracias
Membre enregistré
794 messages
Popularité : +40 (42 votes)
Posté le 14 juin 2021 - 22:15
Hola. ¿Que versión de Android tiene tu dispositivo? La ayuda dice que esa propiedad solo esta disponible a partir de Android 8.

Rubén
Posté le 15 juin 2021 - 08:25
Hola,
Gracias por tu respuesta.
En principio ya funciona, lo que pasaba es que tenía que ir a ajustes y encender la opción de mostrar las insignias.
Ahora mismo el problema es que me piden que no tengas que ir manualmente, que haya algún permiso o algo que haga que esto se active automáticamente.
He mirado la documentación de android y estoy buscando y no encuentro nada de eso :(