当用户按下电源按钮锁定屏幕时,我想继续我的 Android SpeechRecognizer 意图。
public abstract class ListeningActivity {
protected SpeechRecognizer sr;
Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
sr.startListening(intent);
但是目前,当锁定显示器时,该过程会停止。如何正确继续 SpeechRecognizer?