I have an application, in which I want to send data of user activity to our server when the user killed/closed the application. If it is unsuccessful in sending data to the server in the background then I will send all data when the user relaunches the app again. Is there a method to do this?