本文主要是介绍android:exported属性,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
即使你不加exported,现在exported是默认开启的,如果有数据暴露,现在也一直在暴露。所以,一定请大家根据自己的情况加上exported=”true”或者exported=”false”。
加exported=”true”的情况:你的provider需要提供给其他application,甚至第三方application使用的,请一定要加上exported=”true”
加exported=”false”的情况:你的provider只有你自己的application或者跟你一个UID的application使用。
请参考http://developer.android.com/guide/topics/manifest/provider-element.html#exported
The default value is "true"
for applications that set either android:minSdkVersion
or android:targetSdkVersion
to "16"
or lower. For applications that set either of these attributes to "17"
or higher, the default is "false"
.
这篇关于android:exported属性的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!