3

I want to continue my Android SpeechRecognizer intent when the user pressed the power button to lock the screen.

public abstract class ListeningActivity {
    protected SpeechRecognizer sr;
    Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
    sr.startListening(intent);

But currently, when locking the display, the process stops. How can I continue the SpeechRecognizer correctly?

1 Answers1

0

no way!android system will kill app all in 5 minute when you locked the dispaly unless your app join Wihte-list.OR,user allow to app running in backgroud