1

I want to use a numeric keyboard in android notification's direct reply and also want to set the input filter for it.

RemoteInput remoteInput =
          new RemoteInput.Builder("log").setLabel(defaultUnitBG == 1 ? "mg/dL" : "mmol").build();

      NotificationCompat.Action replyAction = null;
      NotificationCompat.Action.Builder actionBuilder =
          new NotificationCompat.Action.Builder(R.drawable.white_circle, replyLabel,
              getLogPendingIntent(context, notificationScheduleObject, iUniqueId, notificationId));

      actionBuilder.setAllowGeneratedReplies(true);
AskNilesh
  • 67,701
  • 16
  • 123
  • 163
  • i don't know if its possible with the native view but You can use customized notification instead . – ADM Dec 12 '17 at 10:20
  • can i use edit text in notification for nougat and above ? – Rishabh Tanwar Dec 12 '17 at 10:23
  • Thats not possible(just found out) Edit text are not allowed in Remote views . – ADM Dec 12 '17 at 10:27
  • is there any way to open numeric keyboard? – Rishabh Tanwar Dec 12 '17 at 10:30
  • I do not see a solution right now. [Read here](https://developer.android.com/reference/android/app/RemoteInput.html) and [Here](https://developer.android.com/reference/android/app/RemoteInput.Builder.html#setChoices(java.lang.CharSequence[])) if you have not already. Thx . Post answer if you figure out a solution for this . – ADM Dec 12 '17 at 10:39
  • Only solution i see right now is to setChoices to remote view . And disable input. But i haven't tried it yet. So good luck. – ADM Dec 12 '17 at 10:41
  • Ok, thanks a lot will try :) – Rishabh Tanwar Dec 12 '17 at 11:05

0 Answers0