Is it possible to introduce voice recognition in a widget?
My problem is that a widget extends from AppWidgetProvider and I can't use onActivityResult method,so I don't know how to obtain the Intent's result.
Intent voiceIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
voiceIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
voiceIntent.putExtra(RecognizerIntent.EXTRA_PROMPT, "Say something");
PendingIntent pendingIntent2 = PendingIntent.getActivity(context, 0, voiceIntent, 0);
RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.voice_widget);
views.setOnClickPendingIntent(R.id.wid, pendingIntent2);
appWidgetManager.updateAppWidget( appWidgetId, views );