Hi,

i am trying to add voice recognition to my input service keyboard.

So I have:

public class mekb extends InputMethodService

But then to call voice recognition, after the example in the sample, I
need to do:

 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, "Speech
recognition demo");
                startActivityForResult(intent,
VOICE_RECOGNITION_REQUEST_CODE);
            }

But then I get the eclipse error that:
  startActivityForResult is undefined for this type.

So is it the case that I cannot get startActivityForResult from
InputMethodService?
Then what's the work around?

Thank you.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to