0

I implemented a small application which will list all the SMS from INBOX and displays both the Contact number and Name.

I have to use two URIs, one is to get the SMS and the other is to get the Contact information related to that SMS.

This approach is having lot of performance issue while listing all the SMS with the Contact Name. It is taking quiet a long time in my 600MHz Android Phone.

But my native SMS application is launching within fraction of seconds. I really don't know how to achieve this.

One way I am thinking of using JOIN conditions on two URIs because I don't know how to use rawQuery on Content://SMS/inbox and the Contacts Data.

Any help would be appreciated. Thanks in Advance..

User 1034
  • 8,145
  • 25
  • 67
  • 88
  • The ContentProvider/ContentResolver API only exposes the JOINs explicitly declared in the provider itself - and those JOINs are typically only in the SQLite database of that provider - if you need information from both providers you're going to have to do it in sw, e.g. using the horrendously buggy CursorJoiner (dunno if they bothered to fix that one). – Jens Dec 30 '11 at 09:09

1 Answers1

0

But my native SMS application is launching within fraction of seconds. I really don't know how to achieve this.

They can access their own database directly, and therefore can use JOINs directly. You cannot express a JOIN across ContentProviders.

CommonsWare
  • 910,778
  • 176
  • 2,215
  • 2,253