android - Access message inbox without Content UrI (content//:sms) -


I want to access messages stored in the inbox through my Android project. I have tried the method of creating URI for SMS (Content: // SMS / Inbox) and then it is quaruing for different parameters.

But I can not find any documents to read the inbox SMS in the standard Android Developer Docs. It was mentioned on various websites that this content has been removed from the standard SDK. The app can not support the higher version of Android.

So, how can I make an application for reading SMS from Inbox which is reliable in the Forward version of Android.

Please help !!

This works well in my landmark

  Public listing & lt; String & gt; GetSMS () {Uri MMSMURUUU = Yuri.Presse ("Content: // SMS / Inbox"); & Lt; String & gt; Message = new arreelist & lt; String & gt; (); Cursor cursor = null; {Cursor = mContentResolver.query (mSmsQueryUri, null, null, null, null); If (cursor == empty) {log. ("Cursor is zero"): "+ MsmsQueryUri"; return message;} (boolean hasata = cursor.movetopfst (); hatata; hasdata = cursor.movtoext ( )} {Last String Body = Cursor.Get String (cursor.tustinSmisfth orphrae ("body"); messages.add (body);}} catch (exception e) {log (e.m., tag, e.m.m. Message ();} Finally {cursor.close ();} Return message;}  

Please make sure that you have the SMS permission to read:

  Andrew Use the id-to: name = "android.permission.READ_SMS" & gt; & the lt; / use-permission & gt;  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -