package net.solutinno.util;

import android.app.Activity;
import android.content.Context;
import android.os.IBinder;
import android.view.View;
import android.view.inputmethod.InputMethodManager;

public class SoftKeyboardHelper
{
    public static void closeSoftKeyboard(Activity activity) {
        if (activity == null) return;
        InputMethodManager inputManager = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);
        View currentView = activity.getCurrentFocus();
        if (currentView != null) {
            IBinder token = currentView.getWindowToken();
            if (token != null) {
                inputManager.hideSoftInputFromWindow(token, InputMethodManager.HIDE_NOT_ALWAYS);
            }
        }

    }
}

@@ -751,11 +751,297 @@
 %7D%0A%0A    %7D
+%0A%0A    public static boolean isSoftKeyboardActive(Activity activity) %7B%0A        if (activity == null) return false;%0A        InputMethodManager inputManager = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);%0A        return inputManager.isAcceptingText();%0A    %7D
 %0A%7D%0A

Add isSoftKeyboardActive() function to SoftKeyboardHelper