I don't have idea why this causes problems. Google Speech Recognizer requiers to work in main UI thread, so I can't for example do it in Async Task. I suppose this is problem with single audio input? How can I resolve this problem?
Recording audio requires in AndroidManifest: However when I have wifi turned off, application works properly like on emulator. And on my device my application has crash when I starts recording audio and speech reognizing - "has stopped unexpectedly". But emulator don't supports speech reocognition because of lack of voice recognition services. My problem is that my application works properly on emulator.
I have tried also to record audio in Thread, but this is worse solution.
My application records audio using MediaRecorder class in AsyncTask and also use Google API transform speech to text - Recognizer Intent - using the code from this question : How can I use speech recognition without the annoying dialog in android phones