code: public static void showKeyboard(Context context, EditText target) {
          if (context == null || target == null) {
              return;
          }
  
          InputMethodManager imm = getInputMethodManager(context);
  
          imm.showSoftInput(target, InputMethodManager.SHOW_IMPLICIT);
      }
docs: Show keyboard and focus to given EditText
  
  @param context Context
  @param target  EditText to focus