Android Content provider list

别说谁变了你拦得住时间么 提交于 2019-12-29 03:10:31

问题


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.


回答1:


The publicly available ones are listed in the android.provider package in the SDK documentation:

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 lists to see how best for you to add in your specific desired capability.




回答2:


The content provider for SMS was removed from the SDK in Android 1.5. It was available in the earlier SDKs though.

Use these to get the required URIs

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




回答3:


You can use adb shell dumpsys > dumpsys.txt and search for "content providers" in that file. From that you can see the list




回答4:


You can use next line adb shell dumpsys | grep Provider{



来源:https://stackoverflow.com/questions/1187541/android-content-provider-list

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!