const message = {
token: "apk_token",
notification: {
// body: "This is an FCM notification that displays an image!",
title: "FCM Notification",
},
android: {
collapseKey: "123",
priority: "normal",
restrictedPackageName: "com.newnot",
data: { name: "pathu" },
},
};
admin
.messaging()
.send(message)
.then((response) => {
console.log("Successfully sent message:", response);
})
.catch((error) => {
console.log("Error sending message:", error);
});