How to close Android application?

后端 未结 22 1529
小蘑菇
小蘑菇 2020-11-22 07:17

I want to close my application, so that it no longer runs in the background.

How to do that? Is this good practice on Android platform?

If I rely on the \"ba

22条回答
  •  滥情空心
    2020-11-22 08:13

    Copy below code and paste AndroidManifest.xml file in under First Activity Tag.

                  
                
                    
                    
                
                 
    

    Also Add this below code in all under Activity Tag in AndroidManifest.xml file

     android:finishOnTaskLaunch="true"
    

提交回复
热议问题