firebase-notifications

How to receive eventbus events when Activity is in the background

喜夏-厌秋 提交于 2019-12-06 10:55:27
I want to get notification message using Firebase Notification service. I'm sending message from Firebase, it is ok. I want to get this notification if user run in MainActivity also I want to show pop-up using dialog. If user run other activities for example SettingActivity or ProfileActivity , notification handle anyway and user run MainActivity pop-up appear suddenly. To do this I'm using Greenbot Eventbus. When I'm inside MainActivity and notification comes It appears so it is ok. But When I'm inside another Activity notification not coming. How to handle this message until come

Angular Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script

隐身守侯 提交于 2019-12-05 18:08:48
I am doing Push notifications in Angular PWA with Firebase and I am following a link to do so. https://medium.com/@tariqueejaz/progressive-web-app-push-notifications-making-the-web-app-more-native-in-nature-a167af22e004 I am using Angular 6 and have setup the code for everything. when I am trying to run it, then it is showing me a pop up . After clicking on Allow button, it is throwing an error on console: Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script." code : "messaging/failed-serviceworker-registration" message : "Messaging: We are

Firebase push notification not working

扶醉桌前 提交于 2019-12-05 03:05:35
I developed an android applicaiton. I used firebase for notification. I read firebase documentation then I made them respectively. I could send a push notification to one device by using InstanceID token. But I could not send push notification to all devices. Please help me. MyFirebaseMessagingService.java public class MyFirebaseMessagingService extends FirebaseMessagingService { private static final String TAG = "MyFirebaseMsgService"; /** * Called when message is received. * * @param remoteMessage Object representing the message received from Firebase Cloud Messaging. */ // [START receive

FCM - Not Receiving Notifications when the app is relaunched

杀马特。学长 韩版系。学妹 提交于 2019-12-04 22:28:11
I migrated to Firebase Cloud Messaging for push notifications. Every thing works great , I get notifications whenever the app is open or running in background , but when the app is closed and a message is sent from the server then you don't receive it in the device ( obviously ). Now when I reopen the app , I should get the pending notification ( the notification sent while the app was closed ) but I don't get the notification. This is my FireBaseMessagingService class public class MyFirebaseMessagingService extends FirebaseMessagingService { public static String TAG="Firebase"; @Override

GCM to FCM for Xamarin

谁说胖子不能爱 提交于 2019-12-04 10:22:20
问题 Xamarin has the predefined support to GCM (Google Cloud Messaging) which was explained in https://developer.xamarin.com/guides/cross-platform/application_fundamentals/notifications/android/remote_notifications_in_android/ As currently Google migrated from GCM to FCM (Firebase Cloud Messaging) does it work with Xamarin with same instruction or there any other Docs for integrating FCM with Xamarin? Does all features provided in Firebase can be used in Xamarin App? 回答1: does it work with Xamarin

How to handle launch options in Swift 3 when a notification is tapped? Getting syntax problems

故事扮演 提交于 2019-12-04 09:04:27
问题 I am trying to handle the launch option and open a specific view controller upon tapping a remote notification that I receive in swift 3. I have seen similar question, for instance here, but nothing for the new swift 3 implementation. I saw a similar question (and ) In AppDelegate.swift I have the following in didFinishLaunchingWithOptions: var localNotif = (launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey] as! String) if localNotif { var itemName = (localNotif.userInfo!["aps"]

how get message body when FCM notification message is tap?

半世苍凉 提交于 2019-12-04 07:19:09
When app is in background, the notification message is deliver by Notification, when the notification is tap, app is launch, how can i get the message body? the intent is this: Bundle[{google.sent_time=1470813025421, from=568540028909, google.message_id=0:1470813025865549%31bd1c9631bd1c96, collapse_key=com.google.firebase.quickstart.fcm}] no message body in intent, only message id! Thanks! try this @Override public void onMessageReceived(RemoteMessage remoteMessage) { // TODO(developer): Handle FCM messages here. // If the application is in the foreground handle both data and notification

Group Firebase FCM on Android Device

这一生的挚爱 提交于 2019-12-04 07:04:37
问题 I am trying to send cloud messages using the Firebase console. I am doing this for android device. The push notifications do appear on the device fine along with the data sent with it. But each notification shows up on its own. Meaning if I send 3 notifications three items show up in the notification bar. What I want to achieve is that all the notifications to be grouped under one heading. As you have in WhatsApp or Facebook. How can this be achieved using the Firebase Console? 回答1: By

How to send Image with firebase Push Notification using swift 3

只愿长相守 提交于 2019-12-04 06:39:48
Can any one help me to send notification like this: I'm using Firebase Notifications. I tried to put the image URL in value of Advanced options and key 1 when I send my notification. The image URL appears in the debugger, but no image appears when notification appears in my device. This is My Code. import UIKit import UserNotifications import Firebase import FirebaseInstanceID import FirebaseMessaging @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? let gcmMessageIDKey = "gcm.message_id" func application(_ application: UIApplication,

Notifications tracking when using FCM

拜拜、爱过 提交于 2019-12-03 16:24:00
Is it possible to track the notification status, whether it was opened or canceled by the user, when I send a push notification without using firebase services dashboard? I am using Advanced REST client and I would like to record data about the notifications status when sending payload to https://fcm.googleapis.com/fcm/send Conversion tracking is only built into Firebase Notifications. I don't think we have a public API to feed into those charts. But if you send your messages through Firebase Cloud Messaging, you could: record the conversion events in your app by calling Firebase Analytics