B4J Question Calling Firebase messaging service through Webview

jkhazraji

Active Member
Licensed User
Longtime User
Can anybody call firebase messaging service by loading the html file containing the service in a webview to get the token?
 

MarcoRome

Expert
Licensed User
Longtime User
Firebase messaging only for Android/iOS/javascript.
But anyway you maybe can try this way (javascript + webview )


Look this example:
 
Upvote 0

jkhazraji

Active Member
Licensed User
Longtime User
Firebase messaging only for Android/iOS/javascript.
But anyway you maybe can try this way (javascript + webview )



Look this example:
Thanks for your reply @MarcoRome
I tried the Firebase Messaging example by using an emulator, but disappointed by the following error in Log:

Uncaught FirebaseError: Messaging: This browser doesn't support the API's required to use the firebase SDK. (messaging/unsupported-browser). in https://www.gstatic.com/firebasejs/7.16.1/firebase-app.js (Line: 1)
Uncaught (in promise) TypeError: Failed to register a ServiceWorker: ServiceWorker script evaluation failed in https://....../...../fcm.html (Line: 0)

Although I used a hosted site with an SSL certificate:
Any workaround?
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…