I want when user close my app it update SQLite data then close app. I used onPause(), onStop() and onDestroy() method in different time on MainActivity. All methods work when app close.
But The problem is, onStop(), onPause() and onDestroy() are called when I change activity. But I don't want to do it when I change activity, only when I close my app.
How I can do that?
Thank you for your response.