push-notification

Firebase web push notification Service worker issue

孤者浪人 提交于 2020-07-20 04:15:30
问题 I am new to web push notification area. I want to send firebase web notifications from web to web. I tried doing that and ended up with this error FirebaseError: Messaging: We are unable to register the default service worker. Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script. (messaging/failed-serviceworker-registration) I dont know where am I went wrong. Thanks in Advance 回答1: You need to add the service worker file firebase-messaging

Angular 6 - “Service workers are disabled or not supported” error

蹲街弑〆低调 提交于 2020-07-15 11:41:04
问题 I want to push notification subscription with web-push module and angular service worker . I've followed instructions from these links: Angular Push Notifications: a Complete Step-by-Step Guide and Push Notifications with Angular & Express yet the notification prompt was not showing up as it should. I've checked the swPush object and found out that it was not enabled, and I don't know why even I've followed angular/pwa installation instructions exactly as those links said. Hope someone here

Angular 6 - “Service workers are disabled or not supported” error

倾然丶 夕夏残阳落幕 提交于 2020-07-15 11:40:37
问题 I want to push notification subscription with web-push module and angular service worker . I've followed instructions from these links: Angular Push Notifications: a Complete Step-by-Step Guide and Push Notifications with Angular & Express yet the notification prompt was not showing up as it should. I've checked the swPush object and found out that it was not enabled, and I don't know why even I've followed angular/pwa installation instructions exactly as those links said. Hope someone here

Local Push notification not working in Xamarin iOS

你说的曾经没有我的故事 提交于 2020-07-10 11:11:45
问题 I am using Xamarin.forms and implemented Local push notification for iOS. It is working successfully when I am debugging the app through visual studio even when the app is minimized, the app can able to receive the notification. But while running the app directly without debugging through visual studio, the app is not able to display the notification. Kindly guide me on this. Then I also tried by releasing the app to the app store but experienced the same, the app is not able to receive the

Local Push notification not working in Xamarin iOS

大憨熊 提交于 2020-07-10 11:10:50
问题 I am using Xamarin.forms and implemented Local push notification for iOS. It is working successfully when I am debugging the app through visual studio even when the app is minimized, the app can able to receive the notification. But while running the app directly without debugging through visual studio, the app is not able to display the notification. Kindly guide me on this. Then I also tried by releasing the app to the app store but experienced the same, the app is not able to receive the

flutter: subscribing user to different topics in one collection for push notifications fcm

不羁岁月 提交于 2020-07-10 04:50:56
问题 i wanna subscribe my users to different "language" topics according to their preference so they receive notifications in the language they want in my firestore i have a collection called notifications inside its document(default) i have two more collections .. english and arabic. now in my shopping app i subbed the user to english topic to test if it works _fcm.subscribeToTopic('english'); and here's my index.js code for cloud fuctions: const functions = require('firebase-functions'); const

Unique Firebase Instance-Id for every user account

旧街凉风 提交于 2020-07-09 14:32:28
问题 I'm unsure how to handle different user accounts on the same device appropriately, as Firebase only creates one Instance-Id per device. Therefore, I though that it would be possible to delete the Instance-Id when the user is logged out and to create a new one when a new user is logged in. On login: FirebaseInstanceId.getInstance().getInstanceId().addOnCompleteListener(task -> System.out.println(task.getResult().getToken())); On logout: FirebaseInstanceId.getInstance().deleteInstanceId() Does

How to implement CallKit alike behaviour on Android with react native?

只愿长相守 提交于 2020-07-09 04:08:11
问题 I have an application written in react-native to handle Voip calls between users. I need to wakeup the app upon push notification and show a screen to accept/decline the call. On iOS there is callkit, is there anything similar for Android? 回答1: After some researches, I've come up with a solution which integrates some native Android code with the native app. First of all I've used WakefulBroadcastReceiver to wake up our activity process after receiving a push notification, then with a Service

Get player_id from OneSignal on page load

╄→尐↘猪︶ㄣ 提交于 2020-07-08 10:51:48
问题 I am implementing web push notifications using Onesigal API. $fields = array( 'app_id' => "07aae1f0-xxxx-xxxx-aa7a-21c79c5b6733", 'include_player_ids'=>['57dd3f80-xxxx-xxxx-adb0-294bfa69621a'], 'contents' => array( "en"=> "message" ) ); $fields = json_encode($fields); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://onesignal.com/api/v1/notifications"); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json; charset=utf-8', 'Authorization: Basic YTdmYTYxYzYtN..

Get player_id from OneSignal on page load

社会主义新天地 提交于 2020-07-08 10:51:45
问题 I am implementing web push notifications using Onesigal API. $fields = array( 'app_id' => "07aae1f0-xxxx-xxxx-aa7a-21c79c5b6733", 'include_player_ids'=>['57dd3f80-xxxx-xxxx-adb0-294bfa69621a'], 'contents' => array( "en"=> "message" ) ); $fields = json_encode($fields); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://onesignal.com/api/v1/notifications"); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json; charset=utf-8', 'Authorization: Basic YTdmYTYxYzYtN..