9

Input dispatching timed out (Waiting to send non-key event because the touched window has not finished processing certain input events that were delivered to it over 500.0ms ago.

I am getting this error sometimes on button multiple click simultaneously. Long running operation is done here.

sendBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                runOnUiThread(new Runnable() {
                    @Override
                    public void run() {
                        sendChatTextContent(messageText, null, "", "");
                    }
                });
            }
        });

On sendChatTextContent() method I have checked AeroPlane Mode status, internet connectivity, AES_Encryption of text, and sent data to SignalR AWS server using Service. Previously there was no issue but this issue occurs sometimes after updating the support library to androidx. How can I handle this?

Chibueze Opata
  • 9,856
  • 7
  • 42
  • 65
Zia
  • 1,204
  • 1
  • 11
  • 25

1 Answers1

0

Your call to sendChatTextContent() must stop the caller: use a non UI Thread instead...