android determine programmatically if voice dictation on soft keyboard is enabled

前端 未结 1 754
遥遥无期
遥遥无期 2021-01-27 10:09

I am writing an app that requires a high level of security. The app will be deployed on a Droid X device. I cannot allow the user to access the voice to text feature of the soft

相关标签:
1条回答
  • 2021-01-27 10:30

    So there's 2 sides to this. First, it doesn't look like there is a reliable/clean way to determine programmatically if it is disabled. In general the way the voice input is set up it should be indistinguishable from typed input: structurally you shouldn't be able to tell the difference between one or the other. Your code above checks to see if the Activity is missing: disabling it does not remove the Activity.

    On the other hand: look at the InputMethodManager's getCurrentInputMethodSubtype: this appears to be able to indicate the input mode. That might do what you want, but not sure.

    Let me know.

    0 讨论(0)
提交回复
热议问题