I can not exit the mobile application

0

I have the following problem with the phonegap when trying to execute the following statement:

navigator.app.exitApp();

The android just leaves the application in the background, the screen disappears but it stays in the background, that is when I click the button to show the applications open it is still there

Someone can help me

    
asked by anonymous 26.09.2016 / 16:43

1 answer

1

Jacob, this happens because you can not "close" an application, only the Android system that can decide when an application will exit the stack, the fact that the application stays in the recent applications tab does not mean that it is running on background.

I'm not sure how Phonegap works, though, it certainly runs within an Android Activity, so I'd advise you to take a look at Life Cycle of an Activity to better understand how Android manages your application.

    
26.09.2016 / 17:36