I developed an app a little over 2 years ago, where I call the function...
startActivityForResult(intent);
to get microphone input. The program doesn't read past that line of code until I say something into the mic. If I say nothing, then I have the option to tap the mic button and say something. Then, the function onActivityResult() gets called after I finally say something into the mic.
Eventually, my phone updated its operating system, and I noticed that onActivityResult() no longer gets called after I say something into the microphone. Not only that. but since I also have startActivityForResult(intent) used inside a threaded loop, that function repeatedly gets called WHILE it is waiting for me to say something into the mic, not allowing me enough time for me to say anything into the mic (whereas the old operating system waited for me to say something into the mic before continuing onto the function onActivityForResult() to get the results). How would I fix this problem?
Thank you.
I believe I was able to resolve the reason why my app was behaving differently (after my Android operating system updated itself)... with the OLD operating system, after startActivityForResult() gets called (with a 'microphone' intent to get microphone input), the microphone widget would open up and the 'program flow' of my app would 'pause' UNTIL microphone input is retrieved from the widget. Then, the program flow of my app would continue after onActivityResult() gets called, whereas the NEW operating system allows the 'program flow' of my app to continue past startActivityForResult() WHILE the microphone widget is opened, thus causing my timer to call startActivityForResult() repeatedly, instead of waiting until the widget (which is a separate program) get input, and then close. If there is a way to code the program flow of my app to 'pause itself' WHILE the microphone widget is open (like the OLD way), please let me know. Thank you.