I'm using EventBus
to communicate between Activity
and Service
.
Today I got a problem and don't know why.
I have
Activity
,Fragment
andService
. All of them are working fine.In
Activity
andFragment
Iregistered
them toReceive
events
which delivered fromService
In
Activity
andFragment
, Iun-register
them whenonDestroy()
was called.In normal cases, when
Services
deliversevents
,Fragment
andActivity
can receive thoseevents
and work well.But when
App
is pushed on thebackground
(by presses Home or Power button), onlyFragment
receives events which delivered fromService
, andActivity
does not receive them.I did not do anything in
onPause()
both ofActivity
andFragment
.
Question:
Is there any explanation for that? And how can I make my Activity
receives event like Fragment
did when app is pushed on background?