how can i access database from broadcast receiver in android?
i am developing a alarm application using BroadcastReceiver
. Here i need to check whether the alarm is on or off from the database. So i need to check the status of the alarm when the broadcast event came. I have to put the database access code in BroadcastReceiver
class onReceive()
method. Here suggest me if there is any way to access the data from the BroadcastReceiver
thanks in advanc开发者_JS百科e
There is no real problem accessing the DB from the BroadcashReceiver. You will need the context, which you have as part of the BroadcastReceiver onReceive method signature and that's it. If you're facing a specific problem, please tell us what it is
精彩评论