Already saw another thread which mentions that an activity with RecognizerIntent was not working correctly if launched from within an activity with singleInstance launch mode. So I would like to know what my alternatives are.
My use case is as follows: My application listens for an event, and when this event occurs, it displays an alert dialog, even if the user is in the midst of using another application. From other questions I found that the common way of doing this is to launch an activity with singleInstance launch mode. But now once this alert dialog pops up, I need to use RecognizerIntent and do some speech to text processing. However speech input dialog just does not wait for any input and onActivityResult() is called immediately. Things work fine if my alert dialog pops up from an activity which has a launch mode other than "singleInstance".
Are there other ways to approach this problem ?
Try running your Code this way :-
Above code should be written inside onCreate() while below should be written ouside it
I have tested it on DellXCD35 android 2.3.3 and it works perfectly well once you get list of texts in your list view it upto you whihch you want to select.