remote-input

cancel notification with remoteInput not working

六月ゝ 毕业季﹏ 提交于 2019-12-10 17:46:58
问题 I am showing a notification with RemoteInput like this: RemoteInput remoteInput = new RemoteInput.Builder("key_add_note") .setLabel("add note") .build(); PendingIntent AddNotePendingIntent = PendingIntent.getBroadcast(getApplicationContext(), (int) txn.get_id(), new Intent(getApplicationContext(), AddNoteBroadcastReceiver.class) .putExtra(Constants.IntentExtras.STA_TXN_ID, txn.get_id()), PendingIntent.FLAG_UPDATE_CURRENT); NotificationCompat.Action action = new NotificationCompat.Action

How to utilize Android Nougat's Direct Reply feature with a NotificationListener?

喜夏-厌秋 提交于 2019-12-09 08:36:35
问题 My app is using a NotificationListener to read out messages from various 3rd party apps, for example WhatsApp. So far I was able to send a reply if only one chat is unread, the code is below. However, in the case with WhatsApp, getNotification().actions returns a null object when more than two chats are unread, as the messages are bundled together. As you can see in the pictures below, if the notifications are extended there is an option to send a direct reply as well, therefore I am certain