Thanks for your reply. I tried this and still the same problem :-(. I am
starting to be crazy of that.
private PendingIntent startVoiceRecognitionActivity(Context context) {
Intent activityIntent = new Intent(context, MainActivity.class);
PendingIntent resultsPendingIntent = PendingIntent.getActivity(context, 0,
activityIntent, 0);
Intent voiceIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
voiceIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
voiceIntent.putExtra(RecognizerIntent.EXTRA_PROMPT, "Speech recognition
demo");
voiceIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
voiceIntent.putExtra(RecognizerIntent.EXTRA_RESULTS_PENDINGINTENT,
resultsPendingIntent);
PendingIntent pendingIntent = PendingIntent.getActivity(context, 0,
voiceIntent, 0);
return pendingIntent;
}
PendingIntent pendingIntent = startVoiceRecognitionActivity(*
context.getApplicationContext()*);
remoteView.setOnClickPendingIntent(R.id.widget_button_save, pendingIntent);
--
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