views:

48

answers:

1

Hi everybody, i want to set scandinavian keyboard as default keyboard on an android device and i want to do this by code. So i try with InputMethodManager :

InputMethodManager mng = (InputMethodManager)getSystemService(LoginActivity.INPUT_METHOD_SERVICE);
List<InputMethodInfo> m_list=mng.getInputMethodList();

and i find the method setInputMethod (IBinder token, String id) of the InputMethodManager class. But i don't find examples/documentation that explain me how to use it.Any suggestion? Thanks.

+1  A: 

Hi everybody, i want to set scandinavian keyboard as default keyboard on an android device and i want to do this by code.

You cannot modify the "default keyboard on an android device" via code from a standard SDK application. The user can choose their own keyboard and locale via the Settings application. You can send users to the proper Settings screen via ACTION_INPUT_METHOD_SETTINGS and ACTION_LOCALE_SETTINGS, which are activity Intent actions defined on android.provider.Settings.

Applications that are part of the device firmware can use DEFAULT_INPUT_METHOD on android.provider.Settings.Secure.

CommonsWare