show reply action on wear devices
This commit is contained in:
parent
1dc55f72e3
commit
7e81149869
|
@ -321,10 +321,12 @@ public class NotificationService {
|
||||||
} else {
|
} else {
|
||||||
modifyForTextOnly(mBuilder, messages);
|
modifyForTextOnly(mBuilder, messages);
|
||||||
}
|
}
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
|
||||||
RemoteInput remoteInput = new RemoteInput.Builder("text_reply").setLabel(UIHelper.getMessageHint(mXmppConnectionService, conversation)).build();
|
RemoteInput remoteInput = new RemoteInput.Builder("text_reply").setLabel(UIHelper.getMessageHint(mXmppConnectionService, conversation)).build();
|
||||||
NotificationCompat.Action action = new NotificationCompat.Action.Builder(R.drawable.ic_send_text_offline, "Reply", createReplyIntent(conversation)).addRemoteInput(remoteInput).build();
|
NotificationCompat.Action action = new NotificationCompat.Action.Builder(R.drawable.ic_send_text_offline, "Reply", createReplyIntent(conversation)).addRemoteInput(remoteInput).build();
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||||
mBuilder.addAction(action);
|
mBuilder.addAction(action);
|
||||||
|
} else {
|
||||||
|
mBuilder.extend(new NotificationCompat.WearableExtender().addAction(action));
|
||||||
}
|
}
|
||||||
if ((message = getFirstDownloadableMessage(messages)) != null) {
|
if ((message = getFirstDownloadableMessage(messages)) != null) {
|
||||||
mBuilder.addAction(
|
mBuilder.addAction(
|
||||||
|
|
Loading…
Reference in a new issue