0

I am using a FragmentActivity to display information from my own ContentProvider which is loaded with a CursorLoader. That ContentProvider delivers a phone number and I would like to have the name and image of that contact if available.

In the first approach I queried the ContactsContract in the CursorAdapter but that isn't the best solution as it makes the scrolling laggy even on fast devices.

I thought and searched about my problem and created 3 ways:

  1. A left join with two ContentProviders but I found nothing about that.
  2. Creating a custom Loader class like here.
  3. A service wich adds the information from ContactsContract to my own ContentProvider so I only have to query one provider.

Let's discuss that. :D

Kind Regards,

k.j.

Community
  • 1
  • 1
k.j.
  • 39
  • 1
  • 8

1 Answers1

0

I figured out that what I was trying was not the best idea.

Now I will use a small AsyncTask when I start my app that updates my internal Database with information from ContactsContract. With that method I can use my own ContentProvider with all needed information in a very simple way. :-)

k.j.
  • 39
  • 1
  • 8