accessing content provider from non activity class

Put your problem here if it does not fit any of the other categories.

accessing content provider from non activity class

Postby vallis » Tue Oct 14, 2008 10:45 pm

Hi all,
I'm trying to access a content provider to read contact information using a managedQuery.
The problem is that I need to access this content from a class that extends BroadcastReceiver. As managedQuery is part of the Activity class, this is kinda hard.

The method that accesses the content provider is held within a utility class and is usually statically called using (Activity)this but as it is being called from a BroadcastReceiver I cannot typecast 'this' as an Activity.

Any help would be great.
Thanks in advance,
Junior Developer
Junior Developer
Posts: 23
Joined: Sat Oct 11, 2008 12:52 pm
Location: Scotland


Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 7 guests