[英]How to detect 3rd party keyboard in react native (iOS and Android)
In native iOS we can specify shouldAllowExtensionPointIdentifier to disable 3rd party keyboard.在原生 iOS 中,我们可以指定 shouldAllowExtensionPointIdentifier 来禁用 3rd 方键盘。
-(BOOL)application:(UIApplication *)application shouldAllowExtensionPointIdentifier:(NSString *)extensionPointIdentifier
{
if (extensionPointIdentifier == UIApplicationKeyboardExtensionPointIdentifier)
{
return NO;
}
return YES;
}
In android is there a solution?在android中有解决方案吗? Managed to use InputMethodManager to detect custom/3rd party keyboard and prompt a message but can't find a way to disable it or change it back to the factory/manufacturer default keyboard.设法使用 InputMethodManager 检测自定义/第 3 方键盘并提示消息,但找不到禁用它或将其更改回工厂/制造商默认键盘的方法。
can't find a way to disable it or change it back to the factory/manufacturer default keyboard找不到禁用它或将其改回工厂/制造商默认键盘的方法
That is not possible.这是不可能的。 In Android, the choice of input method is up to the user (under the control of the OS), not apps.在 Android 中,输入法的选择取决于用户(在操作系统的控制下),而不是应用程序。
In particular, the "factory/manufacturer default keyboard" may be unsuitable for the user for a variety of reasons, including:特别是,“工厂/制造商默认键盘”可能由于多种原因不适合用户,包括:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.