[android-developers] Re: How to get all sms messages on phone

2012-03-07 Thread Ali Chousein
In my app I didn't need to make the distinction between sent and
received SMS messages. I suggest you to investigate the cursor object
inside the debugger to understand how to make this distinction.

-
Ali Chousein
http://www.codeproject.com/KB/android/PayGol-Android.aspx
http://weatherbuddy.blogspot.com | http://twitter.com/weather_buddy
http://geo-filtered-assistant.blogspot.com
https://marketplace.cisco.com/apphq/products/994


On Mar 7, 6:27 am, Farhan Tariq  wrote:
> So this cursor would point to a collection of sms messages? What do i need
> to extract the sender, receiver, text from the message? Thank you in advance

-- 
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


Re: [android-developers] Re: How to get all sms messages on phone

2012-03-06 Thread Farhan Tariq
So this cursor would point to a collection of sms messages? What do i need
to extract the sender, receiver, text from the message? Thank you in advance

On Wed, Mar 7, 2012 at 3:42 AM, Ali Chousein  wrote:

> SmsManager does not do what you are interested in. Android SDK does
> not officially support retrieving the received and delivered SMS
> messages. But there are always backdoors. In the past I used the
> statement below for retriving all (both received and delivered) SMS
> messages:
>
> Cursor cur = getContentResolver().query(Uri.parse("content://sms"),
> null, null, null, null);
>
> But once again, beware that this is not officially documented and it
> can change without any notice. If you use it, you use it on your own
> risk.
>
> -
> Ali Chousein
> http://www.codeproject.com/KB/android/PayGol-Android.aspx
> http://weatherbuddy.blogspot.com | http://twitter.com/weather_buddy
> http://geo-filtered-assistant.blogspot.com
> https://marketplace.cisco.com/apphq/products/994
>
> --
> 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

-- 
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: How to get all sms messages on phone

2012-03-06 Thread Ali Chousein
SmsManager does not do what you are interested in. Android SDK does
not officially support retrieving the received and delivered SMS
messages. But there are always backdoors. In the past I used the
statement below for retriving all (both received and delivered) SMS
messages:

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

But once again, beware that this is not officially documented and it
can change without any notice. If you use it, you use it on your own
risk.

-
Ali Chousein
http://www.codeproject.com/KB/android/PayGol-Android.aspx
http://weatherbuddy.blogspot.com | http://twitter.com/weather_buddy
http://geo-filtered-assistant.blogspot.com
https://marketplace.cisco.com/apphq/products/994

-- 
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