现在的位置: 首页 > 编程语言 > 正文

Androidandroid:exported=true用法详解

2020年02月13日 编程语言 ⁄ 共 552字 ⁄ 字号 评论关闭

Android相关属性的介绍:android:exported = true

    在Activity中该属性用来标示:当前Activity是否可以被另一个Application的组件启动:true允许被启动;false不允许被启动。 android:exported 是Android中的四大组件 Activity,Service,Provider,Receiver 四大组件中都会有的一个属性。 总体来说它的主要作用是:是否支持其它应用调用当前组件。

例如:

<activity android:exported="true" …/>

注意:

AndroidManifest中android:exported="false"

如果Service等的AndroidManifest中声明为android:exported="false"

则该服务不能够跨进程使用。

Permission Denied!

需要改为:android:exported="true"

以上就是本次介绍的全部知识点内容,感谢大家的阅读和对我们的支持。

本文标题: Android android:exported = true 用法详解

以上就上有关Androidandroid:exported=true用法详解的相关介绍,要了解更多Android,exported内容请登录学步园。

抱歉!评论已关闭.