Code example for InputMethodService

Methods: getSystemService

0
        return activities.size() > 0;
    } 
 
    private InputMethodManager getInputMethodManager() {
        return (InputMethodManager) mInputMethodService
                .getSystemService(Context.INPUT_METHOD_SERVICE);
    } 
 
    private void postResult(String recognitionResult) {
        mLastRecognitionResult = recognitionResult;
 
        // Request the system to display the IME. 
        getInputMethodManager().showSoftInputFromInputMethod(mToken,
                InputMethodManager.SHOW_IMPLICIT);
    } 
 
    @Override 
    public void onStartInputView() { 
        Log.i(TAG, "#onStartInputView");
        if (mLastRecognitionResult != null) {
            scheduleCommit();