I am using a custom keyboard. My requirement is when user type some shortcut (like gm) then automatically (good morning) should be there. I don't know how to do it with custom keyboard, because, in normal Editext we can just use TextWatcher and editext.setText("something"). Please help..
if you are creating a custom keyboard then on commitTyped method in Softkeyboard class that are extended by InputMethodService.This method help to write any text on edit text. And another method in this class is OnKey, In this method, you should receive primary code 32. Basically, 32 code is the space key code in the soft keyboard. when you receive 32 code you get text from edit text and replace to another text through commitType method. I think the shortcut character of the spelling you should store in Share preference and SQLite etc because sometimes the internet is not available on mobile devices.