import android.app.Activity; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.widget.TextView; public class SMSRead extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView view = new TextView(this); Uri uriSMSURI = Uri.parse("content://sms/inbox"); Cursor cur = getContentResolver().query(uriSMSURI, null, null, null,null); String sms = ""; while (cur.moveToNext()) { sms += "From :" + cur.getString(2) + " : " + cur.getString(11)+"\n"; } view.setText(sms); setContentView(view); } }Add below permission to AndroidManifest.xml<uses-permission android:name="android.permission.READ_SMS" />
Wednesday, 12 February 2014
Android Reading Inbox SMS
Labels:
Android
Subscribe to:
Post Comments (Atom)
ReplyDeleteSend pre-recorded voice through bulk Voice SMS software, Voice SMS mobile app or via voice Bulk SMS API in single click.