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?