-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> 
> 2) Hidden Content Providers. The open access guarantees don't
> necessarily grant access to the underlying content providers that
> power the native applications. At the moment (this might change)
> access to the native mail, SMS, and IM Content Providers is not
> available.
> 

I figured out how to read the SMS provider:

  Cursor c =
this.getContentResolver().query(Uri.parse("content://sms/inbox"), null,
null, null, null);
  Log.d(TAG, "Read " + Integer.toString(c.getCount()) + " SMS messages
from content (" + Integer.toString(c.getColumnCount()) + " columns)");
  String[] cols = c.getColumnNames();
  for(int i = 0; i < cols.length; i++) {
      Log.d(TAG, "Column: " + cols[i]);
  }
  while(c.moveToNext()) {
      Log.d(TAG, c.getString(c.getColumnIndex("address")) + ":" +
c.getString(c.getColumnIndex("person")) + ":"
+c.getString(c.getColumnIndex("date")) + ":"
+c.getString(c.getColumnIndex("body")));
  }

I saw the URI "content://sms/inbox" after adding the receiver and
listening for incoming SMS.  I got the column names from the middle
block of code.

cheers,
- --
ᛏᚠᛖᚾᚱᛁᛊᚢᛚᚠᚱᛏ
ᛏᚢᛚᚠᛊᛚᛖᛁᚠᚨᚱᛏ
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjhlmcACgkQNig/07RbnEvfwACfVuJbDVbkmN4254ACfGK+sj8Q
GT0An3iVFc8COgtX500vO3okk0viN7AD
=xsFW
-----END PGP SIGNATURE-----

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

Reply via email to