You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not able to receive push notification when WebApp is active, Am I missing something ?
I'm not able to receive notification when tab is active or when I'm on another tab. I'm getting notification only if my tab/website is completely closed. I'm facing same in my PWA as well. When PWA app and website is closed I'm able to receive notification. Am I missing anything ?
const isPushNotificationSupported = oneSignalApp.Notifications.isPushSupported()
await oneSignalApp.Notifications.requestPermission()
if (
isPushNotificationSupported &&
oneSignalApp.Notifications.permission &&
oneSignalApp.Notifications.permissionNative === 'granted'
) {
/// Here goes my code to save player_id in backend
}
aman-u-7span
changed the title
[Question]:
[Question]: Not able to receive push notification when WebApp is active, Am I missing something ?
Aug 9, 2024
Not able to receive push notification when WebApp is active, Am I missing something ?
I'm not able to receive notification when tab is active or when I'm on another tab. I'm getting notification only if my tab/website is completely closed. I'm facing same in my PWA as well. When PWA app and website is closed I'm able to receive notification. Am I missing anything ?
main.js
My one-signal composable
Package versions
"@onesignal/onesignal-vue3": "^2.0.1",
"vue": "^3.3.11"
Service worker
/public/OneSignalSDKWorker.js -> importScripts("https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.sw.js");
Any help would be really appreciated. Thanks
The text was updated successfully, but these errors were encountered: