如何让我的 android 应用程序在后台运行? [英] How can I make my android app run on the background?

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

问题描述

我构建了一个收集有关电池数据的应用程序.为了收集这些数据,我需要我的应用程序在后台运行,以便能够收集这些数据.我该怎么做?

I build an application that collects data about the battery. In order to collect this data I need my application to run on the background in order to be able to collect this data. How can I do it?

推荐答案

你需要把你的activity改成服务

You need to change your activities into Service

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

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