> Hi, All:
> I have a problem when using database in broadcastReceiver.  I can't open
> the
> database created in the activity.
> e.g:
> malwareDB = new PackageDB(this);
> The eclipse give me the error that "PackageDB(this)" is undefined. It
> seems
> that the BroadcastReceiver doesn't support the database?

BroadcastReceiver is not a Context. onReceive() is passed a Context -- try
using that.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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