Android softkeyboard landscape issue

I’ve an issue with landscape softkeyboard on some, not all, android devices. Issue seems related with keyboard installed.
When I ask to device, java natively, to show keyboard, some phones does not show anything. Some other show it correctly. In portrait mode code always works fine. Using swiftkey keyboard code works fine in every phone tested.

public class Native extends Extension{	
	private static View view;
    private static InputMethodManager imm;
	
	public static void showKeyboard() 
    {
		mainActivity.runOnUiThread(new Runnable()
        {
			public void run()
			{
				imm.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT);
			}
        });
	}
    
    public static void hideKeyboard() 
    {
    	
    	mainActivity.runOnUiThread(new Runnable()
        {
    		public void run()
    		{
    			imm.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager.HIDE_IMPLICIT_ONLY);
    		}
        });
    }
	
    public static void initialize(){
        view = mainActivity.getCurrentFocus();
        
		mainActivity.runOnUiThread(new Runnable()
		{
			public void run()
			{

				imm = (InputMethodManager) mainContext.getSystemService(mainContext.INPUT_METHOD_SERVICE);
				
			}
		});
	}
}

Have you any advice to try to solve? I’ve tried many combination of showSoftInput with many values and same with toggleSoftInput. Results was same or worst (i.e. using SHOW_FORCED keyboard appear but is not sensitive, keys cannot be pressed)

Thanks in advance.
David.

Here’s older code we used to have, I’m not sure if it would be helpful?

Thanks for reply Singmajesty but SHOW_FORCED seems not able to actvate keyboard in right way.
I’ve tried your code but seems not work.
Most strange thing is the relation found with softkeyboard selected: Samsung Keyboard works fine with code and also swiftkey. Google and some other native keyboard have this issue. Obliviously sofkeyboard are tested on same devices when possible (i.e. Google vs Swiftkey)

Do you know any other way to call and manage keyboard without using JNI standard? Any advice to try to solve in other way?
Thanks again.
David.

Yeah, looks like the difference between the code is that our code forced it to close, then flagged it to toggle on. I’m not sure how this varies with the show call that you have, but perhaps it thinks the keyboard is visible for some reason