I am developing Bluetooth keyboard driver for android. I want to enable my keyboard input method automatically and set it, by just click of toggle button. By enabling I mean
Now I want to do this programmatically by just one click of toggle button , i want to bypass these steps for the user and provide them a toggle button which is doing these steps.
InputMethodManager m = (InputMethodManager) BluezIMESettings.this.getSystemService(INPUT_METHOD_SERVICE);
m.setInputMethod(token, id);
Now where i can get this token and ID ? , i searched in API description i get this
token Supplies the identifying token given to an input method when it was started, which allows it to perform this operation on itself.
id The unique identifier for the new input method to be switched to.
Thank you for your help...