For one of the mobile applications we have created we need to build a functionality wherein we need to force exit the app .
We are using "navigator.app.exitApp()" but this not killing the session in the android task manager which is creating issues .
Can you please suggest how we can do the same ?
Hello Utkarsh,
I hope you are great mate.
I found this answer in below link which is given by Daniel,
https://www.outsystems.com/forums/discussion/35944/force-mobile-app-to-close/
its possible like session timeout in Web application
Create On the Logics tab on Client Actions the server event OnApplicationReady:
5000 is a timeout of 5 seconds, adjust it according to your needs
I hope this helps to you.
Kind Regards,
Ajit kurane.
Hi,
Also you can take reference of below link,
https://www.outsystems.com/forums/discussion/69183/how-to-exit-app-when-back-button-is-pressed-in-mobile-app/
https://www.outsystems.com/forums/discussion/37745/android-back-button-android-back-button-issue/
This is a solution(the same Ajit provided on his first answer, you can find on the link below), but try to see if is for your case.
Márcio
Hello Ajit ,
Thanks for the reply .
But the problem here is using navigator.app.exitApp() does not forces a complete exit . So more or less it goes to sleep mode but session is still in the task manager of Android .
In my application I want to kill / destroy the session in case user choses a force exit .
Regards,
Utkarsh
Did you try with "On destroy" event ?
Thanks,
Ajit Kurane.