firebase-cloud-messaging

How to send a request when push notification is cancelled in Android

本小妞迷上赌 提交于 2021-02-18 19:21:32
问题 When an application receives push notification from FCM , it calls onMessageReceived . (See 1, 2 or 3.) When a user taps the notification , it launches the applications, then it sends a request to a server that the user has read the notification. I want to know when a device received a push notification, but the user swiped it (or cleared all notifications). I want to send a request to the server that the user simply cancelled the notification . I tried to send BroadcastReceiver and show logs

Firebase cloud messaging - subcribing to topic from a JavaScript client [duplicate]

限于喜欢 提交于 2021-02-17 05:54:05
问题 This question already has answers here : How to subscribe to topics with web browser using Firebase Cloud Messaging (5 answers) Closed 11 months ago . After a lot of pain I got Firebase cloud messaging to work for my JavaScript PWA and push notifications are sent and received properly. However I did create quite a few Cloud Functions to manage topic registration (from the server then). Now I would like to minimize my use of Cloud Functions, and do as much as possible from the client. I see at

Firebase cloud messaging sendToDevice works properly but sendMulticast fails for the same list of tokens

会有一股神秘感。 提交于 2021-02-17 05:30:16
问题 For certain types of messages, I want to target users by FIRTokens vs topic, which are stored in my real-time database. I load these tokens with async/await and then decide if I want to send notifications to a topic vs a smaller list of users. The data loading code works as expected. But what's odd is that if I use .sendMulticast(payload) , the notifications fail for all tokens in the list. On the other hand if I use .sendToDevice(adminFIRTokens, payload) the notification goes successfully to

The provided registration token is not registered

谁说胖子不能爱 提交于 2021-02-16 20:39:19
问题 I'm trying to send push notification for iOS via Google cloud functions but it returns error that The provided registration token is not registered . But I've checked it by debugging my app and the FCM registration token is correct. After that I've tried to send push notification via Firebase console to single device by providing FCM token but it failed due to Unregistered registration token . How this happens because there is no issue with device FCM token? 回答1: I think it should be some

Firebase Cloud Messaging : Expiration of FCM token

强颜欢笑 提交于 2021-02-16 20:07:16
问题 I understand that the FCM token renews itself if one of the following happens. -The app deletes Instance ID -The app is restored on a new device -The user uninstalls/reinstall the app -The user clears app data. The following can be used at the App side to monitor Token renewal. Monitor token generation The onTokenRefreshcallback fires whenever a new token is generated, so calling getToken in its context ensures that you are accessing a current, available registration token. Make sure you have

Why is FCM Push Messages on iOS only working in production or via TestFlight?

余生长醉 提交于 2021-02-11 17:37:36
问题 I'm trying to get push notifications working on FCM. I'm using the new authentication key way with the .p8 file. Everything is working when I use TestFlight to get the app on my iPhone. But when I use Xcode during development, I receive the message in foreground mode. But it's not shown in the system tray when the app is closed / in background mode. Is it even possible to receive notifications when the app is installed via xcode directly on the phone? Since notifications are also not working

xcodebuild Unsigned IPA - Missing Push Notification Entitlement (Work when signing directly the App in XCode)

风流意气都作罢 提交于 2021-02-11 16:55:54
问题 Context : XCODE 12.0.1 I'm using Push Notifications in Ionic. The configuration is OK. I added the Push Notification Capability in Signing and Capabilities . I build my app and I do npx cap open ios , and I do Product > Archive and then it asks me to sign the app, I sign it, and OK. When I test Notifications, everything works well. Problem : I need to generate unsigned IPA with xcodebuild for my client. He wants to sign it himself. But when I generate the xcarchive (unsigned IPA), then he

xcodebuild Unsigned IPA - Missing Push Notification Entitlement (Work when signing directly the App in XCode)

你离开我真会死。 提交于 2021-02-11 16:54:58
问题 Context : XCODE 12.0.1 I'm using Push Notifications in Ionic. The configuration is OK. I added the Push Notification Capability in Signing and Capabilities . I build my app and I do npx cap open ios , and I do Product > Archive and then it asks me to sign the app, I sign it, and OK. When I test Notifications, everything works well. Problem : I need to generate unsigned IPA with xcodebuild for my client. He wants to sign it himself. But when I generate the xcarchive (unsigned IPA), then he

Send push notification to people nearby through Firebase Cloud Function without manually managing push tokens?

十年热恋 提交于 2021-02-11 15:59:27
问题 Seems like majority of solutions here require the developer to manually save each user's push token in addition to Firebase saving these tokens as well, then iterate through these and send out notifications. This is not really desirable since I would be storing push tokens in two separate places and need to make sure their lifecycle management is synchronized, which is error prone 😢Is there a better way? Some options I considered: Give each user a person/unique topic, then map out a

Send push notification to people nearby through Firebase Cloud Function without manually managing push tokens?

纵饮孤独 提交于 2021-02-11 15:59:04
问题 Seems like majority of solutions here require the developer to manually save each user's push token in addition to Firebase saving these tokens as well, then iterate through these and send out notifications. This is not really desirable since I would be storing push tokens in two separate places and need to make sure their lifecycle management is synchronized, which is error prone 😢Is there a better way? Some options I considered: Give each user a person/unique topic, then map out a