androidandroid-softkeyboard

Switch keyboard profile programmatically


Is there any way that we can switch installed keyboards programmatically (without going to the settings section manually)?

My requirement is that the user is presented with all the keyboards which are installed on the phone and gets a chooser dialog to switch to the one wishes?

(basically we want to cut down the step to transfer him to the settings page)


Solution

  • This piece of code will fulfill your requirements:

    InputMethodManager imeManager = (InputMethodManager) getApplicationContext().getSystemService(INPUT_METHOD_SERVICE);
    imeManager.showInputMethodPicker();
    

    As Commonsware points out in his answer, there is no way to do this behind the user's back.