且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在后台运行android应用程序

更新时间:2023-02-19 19:08:58

您已经在Activity中进行了编码,建议您将其更改为

You have coded in Activity, I suggest you to changed it to Android Service. A Service is a component which runs in the background, without interacting with the user.

看看Vogella的服务示例.

Have a look at Vogella's Service Example.

只需将您的活动代码转换为Android服务,它将在没有任何GUI的情况下在后台运行.

Just Convert your Activity code into Android Service and it will work in background without any GUI.