returning subscriber in RxJava after storing data fetch from webservice
returning subscriber in RxJava after storing data fetch from webservice I am trying to call the web service to fetch the data and storing it into database using following code. I have created a separate class to perform following operation. Now , the issue is i want to notify my activity when i successfully fetch and store data in database. if some error occurs then i want to show that on UI itself. somehow i am able to write a code to fetch the data using pagination but not sure how would i notify UI where i can subscribe catch the update related to progress and error if any. public Flowable<Response> getFitnessData() { Request request = new Request(); request.setAccess_token("d80fa6bd6f78cc704104d61146c599bc94b82ca225349ee68762fc6c70d2dcf0"); Flowable<Response> fitnessFlowable = new WebRequest() .getRemoteClient() .create(FitnessApi.class) ...