I'm just finishing up my voice recognition app and it works well. The user is given a question and answers via voice.
One nagging thing is that the voice recognition window pops up quite near the top of the phone screen and it would be nice if it was a bit lower so that it didn't obscure the text for the question.
Is it possible to do this programmatically?
===
Additional info:
Thanks, DroidBee. I am using the following code to call the voice recognition engine:
private void startVoiceRecognitionActivity()
{
Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
intent.putExtra(RecognizerIntent.EXTRA_PROMPT, "Voice recognition Demo...");
startActivityForResult(intent, REQUEST_CODE);
}
I got this part of the code from a tutorial rather than producing it myself. I don't see anywhere that specifies a window or popup.
This is in the main activity and I also used: import android.speech.RecognizerIntent;
By seeing the question, what I understand is that you are having problem with the positioning of the window used for doing an action. But you haven't specified which one you are using. ( a Dialog, Popup Window etc.)
If you are using a popup window, you have to set the anchor according to the position where you have to set the window.
It might be easy if you can explain the type of window used. :)
Happy Coding..!!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With