In my app, I want to have one user logged in at a time. Hence, when they log out I am making an API call to make the user offline in my server also.
But in case the user is logged in and erases the app data or uninstall the app how do I notify my server of the same. How can I listen to uninstall event and do some pre-uninstalling tasks.
Because if I cannot do so, next time when the same user installs the app and tries to login, he will not be able to do so because his current status on my server would be offline because log out never happened.
Thanks