Android 内容提供者列表
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1187541/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Android Content provider list
提问by systempuntoout
Where can I get the full list of Content Provider
that Android offers out of the box?
Specifically, I'm looking for a content provider that lists received SMS.
我在哪里可以获得Content Provider
开箱即用的 Android 产品的完整列表?
具体来说,我正在寻找一个列出收到的 SMS 的内容提供商。
回答by CommonsWare
The publicly available ones are listed in the android.provider package in the SDK documentation:
SDK 文档中的 android.provider 包中列出了公开可用的:
http://developer.android.com/reference/android/provider/package-summary.html
http://developer.android.com/reference/android/provider/package-summary.html
All other ones are undocumented, presumably for a reason. You are welcome to search the Android source code for those classes which extend ContentProvider
, perhaps using Google Code Search. And, if you are working on improving the Android firmware, you can also make inquiries on one of the Android open source project liststo see how best for you to add in your specific desired capability.
所有其他的都没有记录,大概是有原因的。欢迎您在 Android 源代码中搜索那些扩展的类ContentProvider
,也许使用Google 代码搜索。而且,如果您正在改进 Android 固件,您还可以查询 Android开源项目列表之一,以了解如何最适合您添加特定的所需功能。
回答by Prashast
The content provider for SMS was removed from the SDK in Android 1.5. It was available in the earlier SDKs though.
从 Android 1.5 中的 SDK 中删除了 SMS 的内容提供程序。不过,它在早期的 SDK 中可用。
Use these to get the required URIs
使用这些获取所需的 URI
Uri.parse("content://sms")
Uri.parsr("content://sms/inbox")
Uri.parsr("content://sms/sent")
etc
Keep in mind that since these are undocumented they may change in the future.
请记住,由于这些未记录在案,因此将来可能会更改。
For more details look at core/java/android/provider/Telephony.java in the android source code
有关更多详细信息,请查看 android 源代码中的 core/java/android/provider/Telephony.java
回答by Tuyen Dinh
You can use adb shell dumpsys > dumpsys.txt and search for "content providers" in that file. From that you can see the list
您可以使用 adb shell dumpsys > dumpsys.txt 并在该文件中搜索“内容提供者”。从中你可以看到列表
回答by Misha
You can use next line adb shell dumpsys | grep Provider{
您可以使用下一行 adb shell dumpsys | grep Provider{