简体   繁体   English

增量推送通知号

[英]Increment push notification number

I use Parse.com for my android app's backend. 我将Parse.com用于我的android应用程序的后端。 I also send some push notifications to users using Parse Cloud Code. 我还使用Parse Cloud Code向用户发送一些推送通知。 When I send multiple pushes to a user, he gets multiple push notifications, how do I increment the number in the notification in the phone rather than making multiple notifications appear? 当我向用户发送多次推送时,他会收到多个推送通知,我该如何在电话中增加通知中的号码,而不是使多个通知出现?

When you publish a Notification, you specify an ID, like so (the number 123 in this example): 发布通知时,您可以指定一个ID,如下所示(在此示例中为123):

Intent notificationIntent = new Intent(mActivity, NotificationPublisher.class);
        notificationIntent.putExtra(NotificationPublisher.NOTIFICATION_ID, 123);

If you want to send a new notification, and replace this one, make sure you set the same ID when you send a new notification (which will replace the existing notification with your new content) 如果要发送新通知并替换此通知,请确保在发送新通知时设置相同的 ID(它将用新内容替换现有通知)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 根据手机号码推送通知 - Push notification based on mobile number 推送通知不显示消息数 - push notification doesn't show number of messages 阻止Android中特定号码的短信推送通知 - Block SMS Push Notification of a particular number in Android 计算接收推送通知的用户数量 - calculating the number of user receving a push notification Android推送通知如果通知栏中的通知数量为n,则不打开活动 - Android Push Notification Not opening the Activity if n number of notifications in Notification Bar 当通过fireBase收到推送通知时,IONIC2在android后台应用程序时增加徽章 - IONIC2 Increment badges while app in background on android when push notification is received via fireBase 向gcm推送通知发送大量无效令牌的限制? - Limitation on sending messages to a large number of invalid tokens for gcm push notification? 使用GCM在PHP中发送到Android设备的最大推送通知数 - Maximum number of push notification sent to Android device in PHP using GCM Flutter - 推送通知到达时在应用程序图标上显示徽章编号 - Flutter - Display badge number on app icon when push notification arrives Android和iOS推送通知中可显示的最大字符数是多少? - What is the maximum number of characters that can be displayed in Android and iOS push notification?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM