mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-01-15 15:48:05 +00:00
fix: project id notifications
This commit is contained in:
5
app.json
5
app.json
@@ -129,10 +129,7 @@
|
||||
"expo-notifications",
|
||||
{
|
||||
"icon": "./assets/images/notification.png",
|
||||
"color": "#9333EA",
|
||||
"android": {
|
||||
"projectId": "streamyfin-4fec1"
|
||||
}
|
||||
"color": "#9333EA"
|
||||
}
|
||||
],
|
||||
"expo-web-browser",
|
||||
|
||||
@@ -255,9 +255,19 @@ function Layout() {
|
||||
|
||||
// only create push token for real devices (pointless for emulators)
|
||||
if (Device.isDevice) {
|
||||
Notifications?.getExpoPushTokenAsync()
|
||||
.then((token: ExpoPushToken) => token && setExpoPushToken(token))
|
||||
.catch((reason: any) => console.log("Failed to get token", reason));
|
||||
Notifications?.getExpoPushTokenAsync({
|
||||
projectId: "e79219d1-797f-4fbe-9fa1-cfd360690a68",
|
||||
})
|
||||
.then((token: ExpoPushToken) => {
|
||||
if (token) {
|
||||
console.log("Expo push token obtained:", token.data);
|
||||
setExpoPushToken(token);
|
||||
}
|
||||
})
|
||||
.catch((reason: any) => {
|
||||
console.error("Failed to get push token:", reason);
|
||||
writeErrorLog("Failed to get Expo push token", reason);
|
||||
});
|
||||
}
|
||||
}, [user]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user