0

On implementing onHandleIntent(Intent inte) of IntentService Class,i need to call a webservice which is added in another class say "Webservices.Class".Through EventBus.getDefault().post(new ResponseEvent()),it is delivering response in all activities / fragments etc,But it is not delivering the response inside the intentService class which i called.Does anybody came across this situation?

I Used onEventMainThread(ResponseEvent event) for receving response

Thanks in Advance.

KP_
  • 1,854
  • 25
  • 43

1 Answers1

0

IntentService is running on back thread so posting it on the main thread wont work.

I guess that u r using IntentService becuase of push notification, if u want eventbus then u need to open a Service and let it implement the EventBus.

EE66
  • 4,601
  • 1
  • 17
  • 20