3

I have couple of services and a BroadcastReceiver that is suggested to be cleaned / stopped when the app is closed.

Those services are started in the applocation's OnCreate function, however there is no onClose or onDestroy function in the application class.

Can anyone please suggest the proper place in the code and in application life cycle, to clean up all the resources that need to be cleaned when the app is closed?

jekcom
  • 2,065
  • 2
  • 24
  • 34

1 Answers1

0

All sevices have a func onDestroy. I think this is the best place. What is for about BroadcastReceiver usually i dinamically register it and so it is easy to unregister

Vlad
  • 7,997
  • 3
  • 56
  • 43