Vectras-VM-Android/js/push_notification.js
An Bui 09f9654ccd 4.2.4
- Faster return to virtual machine.
- Fixed the frozen virtual machine startup dialog when using X11.
- Added audio support for the built-in X11 display.
- Improved notifications.
- Qemu 7.2.22 has been improved and requires manual updating with the Upgrade tool using a command in the Terminal.
2026-06-10 15:13:21 +07:00

28 lines
No EOL
801 B
JavaScript

import admin from "firebase-admin";
import serviceAccount from './*-*-firebase-adminsdk-*-*.json' with { type: 'json' };
admin.initializeApp({
credential: admin.credential.cert(serviceAccount)
});
async function sendNotification() {
try {
const res = await admin.messaging().send({
data: {
title: "Vectras VM",
message: "Welcome!",
image: "https://github.com/xoureldeen/Vectras-VM-Android/blob/master/resources/vectrasvm.png",
url: "https://github.com/xoureldeen/Vectras-VM-Android",
//activityClass: "update",
//targetVersions: "4.1.0,4.2.0",
targetVersions: ""
},
topic: "vectrasvmandroidgithub"
});
console.log("Sent:", res);
} catch (err) {
console.error("Error:", err);
}
}
sendNotification();