Hi friends I had created my own custom keyboard using inputmethods开发者_StackOverflow中文版ervice now i want to use it in my application as a default keyboard.At the same time it could not be the default keyboard for other application that are running on my android mobile
In short : you can not automatically select a specific inputmethodservice. This is a security feature in android (an inputmethodservice can potentially capture password and fill forms on user's behalf).
The only way to switch input method is to present a standardized InputMethod selection dialog to the user and let him choose (see InputMethodManager's showInputMethodPicker function). Note that this choice is permanent and will affect the whole system.
If you need an application specific keyboard, you would better extend KeyboardView instead of inputmethodservice.
精彩评论