#java #android #android-studio
Вопрос:
Как я могу узнать удаленный ввод, который был нажат, если он заполнен текстом?
Вот мой код
public void onReceive(Context context, Intent intent) {
Bitmap receiver_pic= MyFirebaseMessagingService.receiver_pic; Bundle remoteInput RemoteInput.getResults From Intent(intent);
Set<Integer> keys = MyFirebaseMessaging.databaseChat.keySet()
for (Integer key: keys) {
if(remoteInput != null) {
Service.databaseChat.keySet();
CharSequence replyText = remoteInput.getCharSequence(String.valueof (key));
try {
Message answer = new Message (replyText, sender: null);
if(!remoteInput.getCharSequence (String.valueof (key)).toString().isEmpty() amp;amp; replyTexti= null){
MyFirebaseMessaging Service.databasechat getkey add (answer);
Toast.makeText(context, replyText.toString(), Toast.LENGTH_SHORT).show();
}
catch (Exception e) {
e.printStackTrace();
}
MyFirebaseMessagingService.sendChannel1Notification (context, MyFirebaseMessagingService. database Chat got (key), receiver pic, key);
}
}
}