简体   繁体   English

让Android应用在后台运行

[英]Keep Android app running in the background

I'm working on an app that streams live audio to the device. 我正在开发一个将实时音频流传输到设备的应用程序。 But, with some devices when the user is browsing the internet the application stops the audio playing. 但是,对于某些设备,当用户浏览互联网时,应用程序会停止播放音频。 What's the best way to fix this problem? 解决这个问题的最佳方法是什么?

You can use an Android Component Called Services for this kind of background activity. 您可以将Android组件调用Services用于此类后台活动。 A Service is an application component that can perform long-running operations in the background and does not provide a user interface 服务是一种应用程序组件,可以在后台执行长时间运行的操作,但不提供用户界面

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM