The intend for the read and replay doesn't work with the current code for android 26+ because the intent is not explicit and implicit intends are not allowed in this way any more.
// Creates an intent that will be triggered when a message is marked as read.
private Intent getMessageReadIntent(int id) {
return new Intent(getApplicationContext(), MessageReadReceiver.class)
.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES)
.setAction(READ_ACTION)
.putExtra(CONVERSATION_ID, id);
}
// Creates an Intent that will be triggered when a voice reply is received.
private Intent getMessageReplyIntent(int conversationId) {
return new Intent(getApplicationContext(), MessageReplyReceiver.class)
.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES)
.setAction(REPLY_ACTION)
.putExtra(CONVERSATION_ID, conversationId);
}
The MessageReplyReceiver.class and MessageReadReceiver.class must be provided in the Intend constructor