1

I have a custom keyboard implemented as part of a bigger application. In this application I use a webview.

The problem is that whenever the keyboard is opened by a text area in the web view it takes forever for it to show and everytime I press a button of it it also lags. In the logs it is possible to see:

W/InputConnectionWrapper.ICC: Timed out waiting on IInputContextCallback

I tried the answer of a similar post and open the activity that contains the webview in a different process, but due to the architecture of the application it references some background services that are no longer available in that new process.

Is there any workaround this other than major changes to architecture or having the keyboard as a different application instead of being bundled on the main application?

Thanks in advance.

  • Possible duplicate of [Timed out waiting on IInputContextCallback with custom keyboard on Android](https://stackoverflow.com/questions/40650643/timed-out-waiting-on-iinputcontextcallback-with-custom-keyboard-on-android) – Gautam Chibde Jan 15 '18 at 12:12
  • Like I mentioned in the original post, I tried the approach to have the activity launched in a different process. However, in my case, it is not viable due to several architecture changes. – Ricardo Graca Jan 15 '18 at 16:48

1 Answers1

1

In AndroidManifest.xml file. You need to add like this way, keyboard will work perfectly on webviews/hybrid application

<service android:name="com.MyApplication.services.keyboard.MainKB" android:process=":webactivity" android:permission="android.permission.BIND_INPUT_METHOD"> 

Good Luck!

Fakhar
  • 3,946
  • 39
  • 35