I am using RxJava to provide reactive, asynchronous access to a database. I would like to be able to call these methods within a Job. The problem is though, because the Job has to succeed or fail within the onRun() method's body, there is no way to perform any asynchronous operations. I realize I could use toBlocking() on my rx calls, but that seems a little unsatisfactory.
I have read this ticket #230 about asynchronous jobs, but I still think asynchronous support would be an excellent improvement, being a good way to properly support RxJava.
If you take a look at the Android JobScheduler, it supports the ability to run job synchronously or asynchronously. In the case of asynchronously, it is the developer's responsibility to call jobFinished() to indicate the job completed. There is an example here.
This approach gives more flexibility and would be great if android-priority-jobqueue could support it too!
I am using RxJava to provide reactive, asynchronous access to a database. I would like to be able to call these methods within a Job. The problem is though, because the Job has to succeed or fail within the onRun() method's body, there is no way to perform any asynchronous operations. I realize I could use toBlocking() on my rx calls, but that seems a little unsatisfactory.
I have read this ticket #230 about asynchronous jobs, but I still think asynchronous support would be an excellent improvement, being a good way to properly support RxJava.
If you take a look at the Android JobScheduler, it supports the ability to run job synchronously or asynchronously. In the case of asynchronously, it is the developer's responsibility to call jobFinished() to indicate the job completed. There is an example here.
This approach gives more flexibility and would be great if android-priority-jobqueue could support it too!