Skip to content Skip to sidebar Skip to footer

Pass Context To Jobservice Android Jobscheduler

I am building an app where I store the url and Json in my local SQLite db and then schedule a JobService. In the JobService, I take out all the requests one by one from the db and

Solution 1:

One approach is to use an event bus implementation: LocalBroadcastManager, greenrobot's EventBus, some Rx-based bus, or even a simple MutableLiveData singleton. Have the service post a message on the bus. Have your UI layer register and unregister from the bus as they come and go. Have the UI layer process messages received on the bus, and have the service raise a Notification if the UI layer does not pick up the message.

Here are sample implementations using:


Post a Comment for "Pass Context To Jobservice Android Jobscheduler"