Is it possible to access the database from a service?

xyzandroid picture xyzandroid · Feb 15, 2012 · Viewed 7.8k times · Source

I want to access the database from my service which runs in the background. Is that possible?

Answer

waqaslam picture waqaslam · Feb 15, 2012

Yes, it is possible to access your database from service. To access database, all you need is Context which is also available in service.