[英]NotificationCompat.Action shows only one action button FCM Push Notification
我正在實施 Firebase 推送通知。 它有 2 個動作按鈕接受和拒絕,它是一個來自數據負載的數組。
當按下觸發時,它只顯示拒絕按鈕。 沒有顯示兩個按鈕。
下面是我的代碼
NotificationCompat.Builder(this, channelId)
.setSmallIcon(R.drawable.push_small_icon)
.setStyle(NotificationCompat.BigPictureStyle().bigPicture(bitmap))
.setContentTitle(remoteMessage.data[Const.TITLE])
.setContentText(remoteMessage.data[Const.MESSAGE])
.setPriority(Notification.PRIORITY_MAX)
.addAction(action) // Action buttons
.setAutoCancel(true)`enter code here`
.setSound(defaultSoundUri)
.setContentIntent(pendingIntent)
請幫我解決這個問題。
謝謝
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.