I have to run some background tasks whenever an application is activated / or starts running. Suppose u r running the application and then suddenly the device got off or any how u got out of the application without stopping it properly, then when you will again start the application, obviously it will start running from the previous state before getting out of the application. When it starts again or activated, i want my background tasks to be done.Is there any function which is called every time an application starts which i can use to initialize those background tasks? If not then how can i accomplish my purpose? Need help on this , Thanks in advance …. !!!
Share
Whenever an application returns from being in the background, at very least it will run the the
onResume()function: