It appears that showSoftInput is very buggy with Fragments.
First try @TronicZomB's solution. It works for an Activity with a single Fragment.
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
However, for an Activity with nested FragmentTransactions, you'll be forced to use toggleSoftInput with the SHOW_FORCED and HIDE_NOT_ALWAYS parameters. HIDE_NOT_ALWAYS prevents the toggle command from closing the already opened keyboard after an orientation change.
InputMethodManager imm = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.HIDE_NOT_ALWAYS);
To hide the keyboard at a later time, you can use:
imm.hideSoftInputFromWindow(activity.findViewById(android.R.id.content).getWindowToken(), 0);