1
handler = new Handler(new Handler.Callback() {
        @Override
        public boolean handleMessage(Message msg) {
            if (msg.what == TRIGGER_AUTO_COMPLETE) {
                if (!TextUtils.isEmpty(autoCompleteTextView.getText())) {
                    makeApiCall(autoCompleteTextView.getText().toString());
                }
            }
            return false;
        }
    });

I am trying to use this piece of code ,in a project with target sdk 30.As i can see the constructor is deprecated ,and i do not know how to "convert" it.

Christos
  • 11
  • 1
  • 2
    See this question https://stackoverflow.com/questions/61023968/what-do-i-use-now-that-handler-is-deprecated – tyczj Mar 24 '21 at 15:38
  • 3
    Does this answer your question? [What do I use now that Handler() is deprecated?](https://stackoverflow.com/questions/61023968/what-do-i-use-now-that-handler-is-deprecated) – Jesús Barrera Aug 19 '21 at 02:08

0 Answers0