保持Android应用程序在后台运行 [英] Keep Android app running in the background

查看:534
本文介绍了保持Android应用程序在后台运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作流是现场音频到设备的应用程序。但是,某些设备,当用户浏览互联网的应用程序停止音频播放。什么是解决这个问题的最好方法?

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?

推荐答案

您可以使用Android组件调用 服务 作为这种背景下活动。 A 服务 是一个应用程序组件,可以在后台执行长时间运行操作,并且不提供用户界面

You can use an Android Component Called Services for this kind of background activity. A Service is an application component that can perform long-running operations in the background and does not provide a user interface

这篇关于保持Android应用程序在后台运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆