什么是定义过程中的服务类Android清单文件的目的是什么? [英] What is the purpose of Defined Process in Service class of Manifest File in android?

查看:139
本文介绍了什么是定义过程中的服务类Android清单文件的目的是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 <service
            android:name="com.example.a.MyService"
            android:process=".MyService"
            android:enabled="true" />

我想在这里认识过程的目的。因为,我的应用程序是没有关系的这个过程。

I want to know the purpose of process here. Because, my app is not related to this process.

请任何一个解释这一点。

Please any one explained this.

先谢谢了。

推荐答案

这意味着你的服务将在一个名为过程为MyService 运行。根据Android的文档

It means your service will run in a process named MyService. According to Android docs

运行的服务的过程比背景活动的过程排名较高

所以,如果在Android版当你的服务运行,那么任何时候需要的内存也不太可能通过OS被杀死。阅读这里以上。

So if Android need memory at any time when your service is running then it is less likely to be killed by OS. Read here for more.

这篇关于什么是定义过程中的服务类Android清单文件的目的是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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