push-notification

onMessageReceived() not getting called when app is killed?

白昼怎懂夜的黑 提交于 2021-02-08 09:44:49
问题 I am using Firebase to send push notifications to my app. My app supports till API level 27.I am using FirebaseMessagingService to receive notifications. Inside onMessageReceived() method I am taking data payload and creating own notification in tray. From console I am sending only data payload since i dont want app to create system notifications if the app is in background. Now I am able to get callback in onMessageReceived() when app is in foreground and background. But the issue is its not

Save received remote push notifications - ios

ぐ巨炮叔叔 提交于 2021-02-08 08:54:31
问题 Can we save the received push notifications locally in a plist? I have a reqiurment to show the number of unread push notifications in a badge view just like applicationIconBadgeNumber . But it should be shown inside the application, not as the icon badge view. So, my question is can we save the received push notifications in all the status of the application(running, background and quit)? I have implemented the push notifications, I can share the code if its necessary 回答1: If You have added

Notification does not show firebase Android 8

我只是一个虾纸丫 提交于 2021-02-08 08:32:08
问题 I have an app that is supposed to show a push notification but it doesn't this line new NotificationCompat.Builder(this); is canceled out in the code. I'm new to this, how can this work here is the code in FirebaseMessagingService.java class @Override public void onMessageReceived(RemoteMessage remoteMessage) { super.onMessageReceived(remoteMessage); sendNotification(remoteMessage.getNotification().getBody()); } private void sendNotification(String MessageBody){ Intent intent= new Intent(this

How is MvvmCross initialized in a notification service when app is closed and notification is received?

馋奶兔 提交于 2021-02-08 05:18:28
问题 I've created a service in my application that listens for push notifications from GCM. The service's OnMessage method gets called correctly in all scenarios that I've tested: app running in foreground, app running in background and app not running. However, when the app is not running, the code is throwing a NullReferenceException when I try to resolve dependencies with Mvx.Resolve . Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object at

How is MvvmCross initialized in a notification service when app is closed and notification is received?

我怕爱的太早我们不能终老 提交于 2021-02-08 05:16:53
问题 I've created a service in my application that listens for push notifications from GCM. The service's OnMessage method gets called correctly in all scenarios that I've tested: app running in foreground, app running in background and app not running. However, when the app is not running, the code is throwing a NullReferenceException when I try to resolve dependencies with Mvx.Resolve . Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object at

Apple Wallet: Is Push Token unique for each device?

感情迁移 提交于 2021-02-08 03:46:31
问题 I have made an implementation which i can create passes for apple wallet. Once the device registers with server will push token unique for this device or will change eventually in future? If yes, what are the reasons for that? 回答1: Yes - to help with privacy, the push tokens are regularly rotated - this may occurs at random, or with changes in hardware (user transferring to a new phone), or often with iOS upgrades. Your web-service API implementation will see this as a new registration

start activity automatically after receiving fcm notification?

自古美人都是妖i 提交于 2021-02-07 21:50:03
问题 I want to start a specific activity automatically after receiving fcm push notification.it works fine with on clicking but I want to start it automatically after the notification is received.Here is my code My FirebaseMessagingService method where I am triggering the code public class MyFirebaseMessagingService extends FirebaseMessagingService { private static final String TAG = MyFirebaseMessagingService.class.getSimpleName(); private NotificationUtils notificationUtils; @Override public

start activity automatically after receiving fcm notification?

坚强是说给别人听的谎言 提交于 2021-02-07 21:49:19
问题 I want to start a specific activity automatically after receiving fcm push notification.it works fine with on clicking but I want to start it automatically after the notification is received.Here is my code My FirebaseMessagingService method where I am triggering the code public class MyFirebaseMessagingService extends FirebaseMessagingService { private static final String TAG = MyFirebaseMessagingService.class.getSimpleName(); private NotificationUtils notificationUtils; @Override public

How to send message to multiple android devices using FCM in Node js?

烈酒焚心 提交于 2021-02-07 19:49:37
问题 I tried sending message to single device i.e. to single Registration id and it worked fine but when tried to add multiple Registration Ids it gives 'InvalidServerResponse' error. e.g. Works for regTokens = 'regId1'; But doesn't work for regTokens = ['regId1','regId2']; var FCM = require('fcm-node'); // Add API Key var fcm = new FCM('<server-key>'); exports.sendMessage = function (regTokens, messageToSend, callback) { var message = { //this may vary according to the message type (single

fcm.onNotification() not getting called on clicking the notification when the app is in background

£可爱£侵袭症+ 提交于 2021-02-07 18:15:56
问题 I have installed cordova-plugin-fcm and everything works fine except one little thing. When the app is in background/closed and push notification is sent from firebase, notification pops up in the devices. On clicking that notification from the tray my application starts run, but the control is not entering into fcm.onNotification(). My code in app.component.ts looks like this fcm.onNotification().subscribe(data=>{ if(data.wasTapped){ console.log("Received in background"); console.log(data);