mirror of
https://github.com/xoureldeen/Vectras-VM-Android.git
synced 2026-07-28 18:44:24 +00:00
- Firebase Crashlytics has been added back. - Notifications have been improved. - Viewing in the An Bui app has been added to supported content in the Rom store.
27 lines
No EOL
766 B
JavaScript
27 lines
No EOL
766 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",
|
|
//targetVersions: "3.9.0,3.9.1"
|
|
targetVersions: ""
|
|
},
|
|
topic: "vectrasvmandroidgithub"
|
|
});
|
|
|
|
console.log("Sent:", res);
|
|
} catch (err) {
|
|
console.error("Error:", err);
|
|
}
|
|
}
|
|
|
|
sendNotification(); |