I am using Otto to send events
from IntentService
to my Activity. IntentService
is Downloading files from server and send progress to Activity this is working with otto
very well.
-
I have done so far
registered otto in
OnResume
BusStation.getBus().unregister(this);
created function to receive events
@Subscribe
public void receiveProgress(Message message){
Log.i("Downloader",message.getMessage()+"");
}
unregister bus in
OnPause
BusStation.getBus().unregister(this);
I have
Button
on which click DownloadService is started and this service sends download progress toreceiveProgress
function.
but when I close my app and Restart app and then if DownloadSerice
still downloading file it never send Download progress event on receiveProgress
so how to relink this.