【问题标题】:How can I run Android process in standby?如何在待机状态下运行 Android 进程?
【发布时间】:2017-03-16 13:39:54
【问题描述】:

当用户按下电源按钮锁定屏幕时,我想继续我的 Android SpeechRecognizer Intent。

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

但目前,当锁定显示器时,该过程会停止。如何正确继续 SpeechRecognizer?

【问题讨论】:

标签: android speech-recognition android-wake-lock recognizer-intent


【解决方案1】:

不可能!如果你的应用加入了 Wihte-list.OR,用户允许应用在后台运行,Android 系统会在你锁定显示后 5 分钟内将应用全部杀掉

【讨论】:

  • 这应该是一条评论。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多