Firstly, it depends on which web client you use to load data, this client determines the end of incoming data, after which you must call the stopSelf()
method in the Service
object class, than define your actions in the onDestroy()
method block
source share