Top Picks

Movies by Flixster







February 10, 2013


Status of content://sms/inbox query in Android SDK


I am trying to use

Uri uri = Uri.parse("content://sms/inbox"); Cursor c= getContentResolver().query(uri, null, null ,null,null);

from this blog but I stumbled upon this answer from @CommonsWare and his blog here

All this is around 2 years old.

Is this code still working on the android 4.1.1 or has been blocked. I am facing a problem in receiving a broadcast for SMS received in Samsung Galaxy SIII (I have posted another question here.)

Therefore looking at alternatives to make it work.

My Question

Is it valid to use


and does it work on all version of android?



Is it valid to use


That depends on what you mean by “valid”.

There is no guarantee that this content provider will exist on all devices, and there is no guarantee that the user’s chosen SMS client will be storing its messages in this content provider even if it does exist.

That being said, I am not aware of any device that lacks this provider.

does it work on all version of android?

Android itself does not have this content provider. It is supplied by an app. The conventional app for this is the AOSP SMS client.

Professional Hosting fro Just Host

Filed under: Android Coding FAQ



No Comments

Leave a reply