Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Content provider list

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.

like image 532
systempuntoout Avatar asked Jul 27 '09 10:07

systempuntoout


People also ask

What are the content providers in Android?

A content provider manages access to a central repository of data. A provider is part of an Android application, which often provides its own UI for working with the data. However, content providers are primarily intended to be used by other applications, which access the provider using a provider client object.

How many content providers are there?

You can implement as many as you want, as you can see from the documentation here. To register a content provider, you need to add its corresponding <provider> tag in the Android Manifest. In most cases, however, you won't need multiple content providers. One is usually enough, as it can handle multiple tables.

What is ContentResolver in Android?

The Content Resolver behaves exactly as its name implies: it accepts requests from clients, and resolves these requests by directing them to the content provider with a distinct authority. To do this, the Content Resolver stores a mapping from authorities to Content Providers.


2 Answers

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.

like image 85
CommonsWare Avatar answered Oct 08 '22 07:10

CommonsWare


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

like image 32
Prashast Avatar answered Oct 08 '22 06:10

Prashast