Skip to content Skip to sidebar Skip to footer

Need Help For Closing My Android App

I am developing an Android application. I want to quit my application but application should be in running state in background. Whenever I click on application application should s

Solution 1:

Android is designed this way: you don't need to explicitely terminate your applications, the system does it for you.

You just have to terminate the Activities or Services by calling Activity.finish() or Service.stopSelf() to see your apps behaving as you described.

Should there be any log-in process, just store the needed information in a SharedPreference to make your application able to re log-in for you or to use the token obtained at login time (depends of the way the process is designed). More details on SharedPreferences here.


Post a Comment for "Need Help For Closing My Android App"