Android App Exit Button

后端 未结 10 1308
鱼传尺愫
鱼传尺愫 2020-12-18 02:07

I\'m not sure whether I need to add an exit button to my app. Is there any point to doing this? And if on exiting one activity or service is not .finish() or closed properly

10条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-18 02:15

    You don't need an exit button in your app. This is how android works. The user is not given any way to actually exit the application.

    When you call 'finish', the application stack is just pushed to the background. It still exists in the memory. Android itself decides when to close the application(i.e. remove its instance from the memory) and generally this is done when your application becomes the oldest application which was not used for the longest time.

提交回复
热议问题