Home » Android » android – inactive InputConnection warning in all EditText box

android – inactive InputConnection warning in all EditText box

Posted by: admin June 15, 2020 Leave a comment

Questions:

In my application, i am getting 3 “inactive InputConnection” warning (logCat below) every time I do anything with cursor on an EditText field.

This warnings popup even if I select another EditText (with cursor is one EditText), or just click on a button, or whatever I do with cursor in an EditText. This behavior is consistent in all the pages (activities).

Even if I click on any Menu button (to go another page) or back button with focus on an EditText field, the same set of warnings pop up.

In some Activity where I don’t have any EditText, I don’t have this problem.

This problem occurs when I try in real device (Samsung Note II), but does not replicate when I try in emulator.

Do anybody has an idea how to deal with this?

LogCat:

11-27 22:23:44.820: W/IInputConnectionWrapper(25490): getSelectedText on inactive InputConnection
11-27 22:23:44.850: W/IInputConnectionWrapper(25490): setComposingText on inactive InputConnection
11-27 22:23:44.850: W/IInputConnectionWrapper(25490): getExtractedText on inactive InputConnection
How to&Answers:

You should add this code to manifest:

android:windowSoftInputMode="adjustNothing"

Answer:

Check whether you use getIntent() or new Intent().

When i use getIntent():

Intent intent = getIntent();
intent.setClass(getBaseContext(), Activity.class);
startActivity(intent);

at first run all works, but at second run its produce a warning and application was shut down:

V/Monotype: SetAppTypeFace- try to flip, app = com.{package}

V/Monotype: Typeface getFontPathFlipFont – systemFont = default

I/TextInputLayout: EditText added is not a TextInputEditText. Please switch to using that class instead.

I/TextInputLayout: EditText added is not a TextInputEditText. Please switch to using that class instead.

I/Timeline: Timeline: Activity_idle id: [email protected] time:61939164

I/Timeline: Timeline: Activity_launch_request id:com.{package} time:61942367

W/IInputConnectionWrapper: showStatusIcon on inactive InputConnection

W/IInputConnectionWrapper: beginBatchEdit on inactive InputConnection

W/IInputConnectionWrapper: endBatchEdit on inactive InputConnection

D/OpenGLRenderer: endAllStagingAnimators on 0x5589e3a5f0 (RippleDrawable) with handle 0x5589d7c0e0

When i use new Intent():

Intent intent = new Intent(getBaseContext(), Activity.class);
startActivity(intent);

app is works normally.