I am new to Android development.I have created a small app and i have start the app in my device it’s working good.After some state i hit the “home” button so the Activity should go to the onPause() state then i used some other application.My issue is It keeps the activity in the background nearly 45 minutes after it force to move onStop() method and close the Android App.When i again go to the home and click the icon instead of calling restart() method it’s calling onCreate() method.
Thanks in advance…..
in
onPause()you can callActivity_name.this.finish()You may want to learn a little more about Activity life cycle