gpt4 book ai didi

android - 如何识别是否在 android 软键盘中单击了麦克风?

转载 作者:太空狗 更新时间:2023-10-29 15:00:02 26 4
gpt4 key购买 nike

我需要在麦克风点击时调用一些自定义事件,如何识别麦克风何时被点击?

最佳答案

根据文档,这是不可能的,您可以创建自己的键盘并处理它 -

As soft input methods can use multiple and inventive ways of inputting text, there is no guarantee that any key press on a soft keyboard will generate a key event: this is left to the IME's discretion, and in fact sending such events is discouraged. You should never rely on receiving KeyEvents for any key on a soft input method. In particular, the default software keyboard will never send any key event to any application targetting Jelly Bean or later, and will only send events for some presses of the delete and return keys to applications targetting Ice Cream Sandwich or earlier. Be aware that other software input methods may never send key events regardless of the version.

检查 this

希望这对您有所帮助。

关于android - 如何识别是否在 android 软键盘中单击了麦克风?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27684871/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com