anonymous Log in
Search
Recents:
v3.0
sd
Error al enviar notificaciones
13/02/20 10:25

horacioc

Replies: 2

Buenos días estimados.
Estoy trabajndo con Genexus 16 U4 para android y tengo el siguiente
error al enviar una notificación desde una aplicación web a los
dispositivos móviles:
"Push Provider was not specified. Please set a Push Provider."
En el main de la aplicación sd (GAMSDLogin) tengo configurado:
-"Default Log Level = Debug"
-"Enable Notifications = True"
-"Registration Handler=NotificationsRegistrationHandler", Procedimiento
x defecto de Genexus, tb tengo creada una tabla "Device" para dicho
procedimiento donde registra cada vez q un usuario se conecta a la app
sd (Funciona sin inconvenientes)
-( "Android Sender Id" y "Android Sender API Key") Ambas propiedades me
las da Firebase
También tengo configurado en el generador java las propiedades
-"Notications Provider = OneSignal"
-("App ID" y "REST API ID") que me dió al cargar la app a OneSignal
Desde el proveedor OneSignal envío notificaciones sin problemas a todos
los dispositivos conectados.
En el web Panel tengo un evento con lo siguiente:
tengo mis dudas en &TheNotificationConfiguration.ApplicationId sí es la
que me da genexus en las propiedades del modelo
Variables:
//&TheNotification : Notification, GeneXus.Common.Notifications
//&TheNotificationDelivery: Delivery, GeneXus.Common.Notifications
//&TheNotificationConfiguration : Configuration,
GeneXus.Common.Notifications
Código del evento:
&TheNotification.Title.DefaultText = "GeneXus"
&TheNotification.Text.DefaultText  = "Notification Provider API"
&TheNotification.Actions.DefaultAction.Event.Name = "NotificationAction"
// Declared in the SD Main object
&TheNotification.Actions.DefaultAction.Event.Parameters.FromJson('[{"Name":"msg","Value":"Hello
dear user!"}]')
&TheNotificationDelivery.Expiration = 3000
&TheNotificationDelivery.Priority = PushNotificationPriority.Normal
 &TheNotificationConfiguration.ApplicationId =
!"65e93792-ae7d-47c7-93e9-4..."
 for each order DeviceType DeviceId //Tabla Device
       msg('deviceToken =' + DeviceToken)
       GeneXus.Common.Notifications.SendNotification(
          &TheNotificationConfiguration,
          DeviceToken, // Target device token
          &TheNotification,
          &TheNotificationDelivery,
          &OutMessages,
          &IsSuccessful
        )
        if &IsSuccessful = True
            msg('Enviado')
        else
            msg('No enviado ' + &OutMessages)
        endif
        For &Message in &OutMessages
            msg('Id ' + &Message.Id + ' _ ' + &Message.Type.ToString()
+ ' _ ' + &Message.Description)
        endfor
endfor
Desde ya muchas gracias.
--
*A/P Horacio Cabrera*
*Sistemas*
*Tel: (00598) 2408 31 30 *
*Magallanes 1412*
*Montevideo-Uruguay*
**
**
**
Replies

mcorso

13/02/20 10:52
oi se não estou engano no firebase do google vc tem que colocar tambem as credencias do onesignal (ou vice versa) Em qui., 13 de fev. de 2020 às 10:25, Horacio Cabrera < hcabrera@cambadu.com.uy> escreveu: > Buenos días estimados. > > Estoy trabajndo con Genexus 16 U4 para android y tengo el siguiente error > al enviar una notificación desde una aplicación web a los dispositivos > móviles: > > "Push Provider was not specified. Please set a Push Provider." > > En el main de la aplicación sd (GAMSDLogin) tengo configurado: > -"Default Log Level = Debug" > -"Enable Notifications = True" > -"Registration Handler=NotificationsRegistrationHandler", Procedimiento x > defecto de Genexus, tb tengo creada una tabla "Device" para dicho > procedimiento donde registra cada vez q un usuario se conecta a la app sd > (Funciona sin inconvenientes) > -( "Android Sender Id" y "Android Sender API Key") Ambas propiedades me > las da Firebase > > También tengo configurado en el generador java las propiedades > -"Notications Provider = OneSignal" > -("App ID" y "REST API ID") que me dió al cargar la app a OneSignal > > Desde el proveedor OneSignal envío notificaciones sin problemas a todos > los dispositivos conectados. > > En el web Panel tengo un evento con lo siguiente: > > tengo mis dudas en &TheNotificationConfiguration.ApplicationId sí es la > que me da genexus en las propiedades del modelo > > Variables: > > //&TheNotification : Notification, GeneXus.Common.Notifications > //&TheNotificationDelivery: Delivery, GeneXus.Common.Notifications > //&TheNotificationConfiguration : Configuration, > GeneXus.Common.Notifications > > > Código del evento: > > &TheNotification.Title.DefaultText = "GeneXus" > &TheNotification.Text.DefaultText = "Notification Provider API" > &TheNotification.Actions.DefaultAction.Event.Name = "NotificationAction" > // Declared in the SD Main object > &TheNotification.Actions.DefaultAction.Event.Parameters.FromJson('[{"Name":"msg","Value":"Hello > dear user!"}]') > > &TheNotificationDelivery.Expiration = 3000 > &TheNotificationDelivery.Priority = PushNotificationPriority.Normal > > &TheNotificationConfiguration.ApplicationId = > !"65e93792-ae7d-47c7-93e9-4..." > > > for each order DeviceType DeviceId //Tabla Device > msg('deviceToken =' + DeviceToken) > GeneXus.Common.Notifications.SendNotification( > &TheNotificationConfiguration, > DeviceToken, // Target device token > &TheNotification, > &TheNotificationDelivery, > &OutMessages, > &IsSuccessful > ) > if &IsSuccessful = True > msg('Enviado') > else > msg('No enviado ' + &OutMessages) > endif > > For &Message in &OutMessages > msg('Id ' + &Message.Id + ' _ ' + &Message.Type.ToString() + ' > _ ' + &Message.Description) > endfor > endfor > Desde ya muchas gracias. > > -- > > > *A/P Horacio Cabrera* > > *Sistemas* > > *Tel: (00598) 2408 31 30 * > > *Magallanes 1412* > > *Montevideo-Uruguay* > > > -- [image: Grupo ABL] *Marcos Fabricio Corso* Analista de Sistemas TI +55 (41) 3078-4747 ------------------------------ *Grupo ABL* - www.grupoabl.com.br Curitiba/PR - R. Augusto Stresser, 453, Alto da Glória

horacioc

13/02/20 11:05
Al configurar OneSignal me pidió los datos de firebase, los cuales fueron cargados correctamente. Saludos El 13/02/2020 a las 10:52 a. m., Marcos Fabricio Corso


Back to sd