I am not able to start Activity from keyboard, while other keyboard like "Go Keyboard", "Microsoft Swiftkey Keyboard" , "1C Big Keyboard", and many more keyboard working fine on MIUI 11 with default permission which are already allowed when install in on any Chinese phone.
Java:
final Intent intent = new Intent( mRichImm.getInputMethodInfoOfThisIme().getSettingsActivity());
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
| Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
final int currentDisplayId = ((WindowManager) getSystemService(Context.WINDOW_SERVICE))
.getDefaultDisplay().getDisplayId();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
context.startActivity(intent,
ActivityOptions.makeBasic().setLaunchDisplayId(currentDisplayId).toBundle());
}else{
context.startActivity(intent);
}
}else{
context.startActivity(intent);
}