简体   繁体   English

如何在 React Native(iOS 和 Android)中检测 3rd 方键盘

[英]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:特别是,“工厂/制造商默认键盘”可能由于多种原因不适合用户,包括:

  • Language support语言支持
  • Motor impairment运动障碍
  • Visual impairment视力障碍

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将 3rd 方 aar 包含到 Android React Native 模块中? - How to include 3rd party aar into Android React Native module? 如何在Android中杀死第三方进程 - How to kill 3rd party process in android 如何在Android上使用3rd Party库? - how to use 3rd party library on android? 如何保留Android的3rd Party库? - How to keep 3rd party library for Android? Qt/QML Android 3rd 方虚拟键盘不适用于 TextInput - Qt/QML Android 3rd party virtual keyboard not working with TextInput 从Android本机活动加载第三方共享库 - Loading 3rd party shared libraries from an Android native activity 在您自己的android应用中调用第三方本地库 - Calling 3rd party native library in your own android app 在没有第3方的本地c ++中在android中显示文本 - Show text in android with native c++ without 3rd party Android水平自定义库-3rd party库还是本机? - Android horizontal custom gallery - 3rd party library or native? 如何从第三方共享库中查找导致Android本机崩溃的指令? - How to find instruction from 3rd party shared library that caused an android native crash?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM