当我在清单XML文件中遇到此标记时,我正在浏览androID-17的NotePad示例应用程序:
<provIDer androID:name="NotePadProvIDer" androID:authoritIEs="com.Google.provIDer.NotePad" androID:exported="false"> <grant-uri-permission androID:pathPattern=".*" /> </provIDer>
我查了一下单位名称,然后看到com.Google.provIDer.NotePad被列为提供商的授权之一.我假设NotePadProvIDer引用了NotePadProvIDer.java文件中定义的NotePadProvIDer类,但是我想问一问是否确实如此,以确保我走在正确的轨道上.
另外,我想知道com.Google.provIDer.NotePad到底是什么,它的定义是什么,以及com.Google.provIDer.NotePad的目的是什么,以及com.Google.provIDer.NotePad是该网站的授权机构.提供商.
解决方法:
那是ContentProvider.
Content provIDers are one of the primary building blocks of AndroID
applications, provIDing content to applications. They encapsulate data
and provIDe it to applications through the single ContentResolver
interface. A content provIDer is only required if you need to share
data between multiple applications. For example, the contacts data is
used by multiple applications and must be stored in a content
provIDer. If you don’t need to share data amongst multiple
applications you can use a database directly via sqliteDatabase.
实际上,com.Google.provIDer.NotePad是实现ContentProvIDer的类.
从<provider>
开始:
总结androID:authoritIEs
A List of one or more URI authoritIEs that
IDentify data offered by the content provIDer. Multiple authoritIEs
are Listed by separating their names with a semicolon. To avoID
conflicts, authority names should use a Java-style naming convention
(such as com.example.provIDer.cartoonprovIDer). Typically, it’s the
name of the ContentProvIDer subclass that implements the provIDer
以上是内存溢出为你收集整理的Android清单XML提供程序标签. android:authorities全部内容,希望文章能够帮你解决Android清单XML提供程序标签. android:authorities所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)