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
content://sms/inbox
and does it work on all version of android?
Answer
Is it valid to use
content://sms/inbox
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.
Filed under: Android Coding FAQ
Tags:
Comments
No Comments
Leave a reply
You must be logged in to post a comment.