es.davy.ai

Preguntas y respuestas de programación confiables

¿Tienes una pregunta?

Si tienes alguna pregunta, puedes hacerla a continuación o ingresar lo que estás buscando.

Tag: FIREBASE-CLOUD-MESSAGING

Azure NotificationHub Android: onPushNotificationReceived no se llama cuando la aplicación de Android está en un estado de fondo/terminado.

Cuando la aplicación de Android está en estado de primer plano, se invoca el listener onPushNotificationReceived con los datos de la notificación. Cuando está en estado de segundo plano o terminado, se recibe la notificación pero el listener onPushNotificationReceived no se invoca automáticamente ni cuando toco la notificación. Estoy enviando . . . Read more

¿Convertir Messaging.messaging().fcmToken a string?

let token = Messaging.messaging().fcmToken let fixedUrl : String = String(“\(loadUrl)?os=I&fcm_token=\(token)&tval=tt\(appVer)”) let url : URL? = URL(string:fixedUrl) webView.load(URLRequest(url: url!)) este código produce un error si no permito el permiso de notificación push al iniciar la aplicación. ¿Cómo puedo expresar token = fcmToken? fcmToken : "" en Swift?

Firebase Cloud Messaging – Error al registrar el servicio en funcionamiento (…La evaluación del script del ServiceWorker ha fallado)

Estoy tratando de configurar notificaciones web con FCM y obtengo mensajes de error cuando intento registrar el service worker. Mi estructura es la siguiente: domain.com/notification/index.html domain.com/notification/test-worker.js Index.html: function registerServiceWorker() { console.log(‘start register’); return navigator.serviceWorker.register(‘/notification/test-worker.js’) .then(function(registration) { console.log(‘Service worker successfully registered.’); askPermission(); return registration; }) .catch(function(err) { console.error(‘Unable to register service . . . Read more