[android-developers] Re: Is there any method to read sms and gmail?

2009-09-10 Thread eaindra nilar
Hello,

You can read sms this way
public class SmsApp extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
String strUri=content://sms/inbox;
Uri urisms=Uri.parse(strUri);
//try{
Cursor c=this.getContentResolver().query(urisms, null, null, null,
null);
while(c.moveToNext())

 -~--~~~~--~~--~--~---

 but you need permission ,u described  SMS_READ

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Is there any method to read sms and gmail?

2009-09-10 Thread 楊健
Thank you very much ,I will try this。

 

  _  

From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of eaindra nilar
Sent: Thursday, September 10, 2009 6:59 PM
To: android-developers@googlegroups.com
Subject: [android-developers] Re: Is there any method to read sms and gmail?

 

Hello,

You can read sms this way
public class SmsApp extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
String strUri=content://sms/inbox;
Uri urisms=Uri.parse(strUri);
//try{
Cursor c=this.getContentResolver().query(urisms, null, null, null,
null);
while(c.moveToNext())

-~--~~~~--~~--~--~---

but you need permission ,u described  SMS_READ



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---