Haruki
03/01/2023, 2:32 AMlet socket = new WebSocket("<wss://javascript.info/article/websocket/demo/hello>");
to
[kotlin]
val socket = WebSocket("<wss://javascript.info/article/websocket/demo/hello>")
Is there a similar approach I can take to use the FCM JavaScript API in my project?
In other words, is it possible to code this in Kotlin?
import { initializeApp } from "firebase/app";
import { getMessaging } from "firebase/messaging";
// TODO: Replace the following with your app's Firebase project configuration
// See: <https://firebase.google.com/docs/web/learn-more#config-object>
const firebaseConfig = {
// ...
};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
// Initialize Firebase Cloud Messaging and get a reference to the service
const messaging = getMessaging(app);
Any guidance you can provide would be greatly appreciated. Thanks in advance for your help!