开发者

Hide Android Voice Recognition Activity to run in background?

开发者 https://www.devze.com 2023-02-10 16:28 出处:网络
Is there a way to either 开发者_JAVA技巧 A) start the activity without opening up the GUI B) start the VoiceRecognitionActivity behind my current activity, so the user does not notice?

Is there a way to either

开发者_JAVA技巧

A) start the activity without opening up the GUI B) start the VoiceRecognitionActivity behind my current activity, so the user does not notice?

Essentially, I'm not fond of how Voice Recognition disrupts the UX and would rather the user just see the words "listening" in my activity. Android's a great OS and I think it deserves more beautiful apps!

I'm an Android newbie (as you can see from my question history) and very much appreciate your help.


A) start the activity without opening up the GUI

No. There is no such concept in Android.

B) start the VoiceRecognitionActivity behind my current activity, so the user does not notice?

No. There is no such concept in Android.

Essentially, I'm not fond of how Voice Recognition disrupts the UX

Bear in mind that what you want should be immaterial. What your users want is what matters.

You are welcome to attempt to use SpeechRecognizer directly, though this is only possible on Android 2.2 and newer. On older versions of Android, you will have to settle for the standard voice recognition UI.


You can implement a voice service using SpeechRecognizer. However, the service still has to run in the UI thread. That is you can not create another thread in the service and let the recognizer runs there.

0

精彩评论

暂无评论...
验证码 换一张
取 消