在我在Android上卸载该应用程序之前,手机系统中的居民是否会驻留?

在我在Android上卸载该应用程序之前,手机系统中的居民是否会驻留?,第1张

概述我知道可以通过在AndroidManifest.xml中添加代码A来注册服务.在我卸载该应用程序之前,该服务是否会驻留手机系统中?服务停留在系统中时会否消耗系统资源?代码A<serviceandroid:name="bll.CleanupService"></service>解决方法:互联网上有很多有关服务及其用途的资料,但是,

我知道可以通过在AndroidManifest.xml中添加代码A来注册服务.

在我卸载该应用程序之前,该服务是否会驻留在手机系统中?

服务停留在系统中时会否消耗系统资源?

代码A

<service androID:name="bll.CleanupService"></service>

解决方法:

互联网上有很多有关服务及其用途的资料,但是,我将尽力回答.

服务:这是androID组件,它在系统的后台和前台运行.

A foreground service performs some operation that is noticeable to the
user. For example, an audio app would use a foreground service to play
an audio track. Foreground services must display a Notification.
Foreground services continue running even when the user isn’t
interacting with the app.

Android – implementing startForeground for a service?

A background service performs an operation that is not noticeable to
the user, It can be downloading any file. We can use this for long
running operation.

回到您的问题,将尝试一个接一个地回答.

在我卸载应用程序之前,该服务是否会驻留在手机系统中?

是的,它将驻留在您的手机上,直到您不卸载应用程序为止.但是它不会无限运行,随着您的工作完成,它将停止.

服务成本留在系统中时会占用系统资源吗?

可能会导致以下问题:如果未正确使用它,则在运行后台服务时,我们应该知道何时停止它,除非它将连续运行.这也可能会导致您与内存有关的问题.

总结

以上是内存溢出为你收集整理的在我在Android上卸载该应用程序之前,手机系统中的居民是否会驻留?全部内容,希望文章能够帮你解决在我在Android上卸载该应用程序之前,手机系统中的居民是否会驻留?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1081393.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-27
下一篇 2022-05-27

发表评论

登录后才能评论

评论列表(0条)

保存