I'm using firebase to push notifications in my android app.
I have sql database that stores user id , his token and login status (logged in - not logged in) to check before sending notification.
Everything working perfectly till I thought of this scenario, What if the user uninstall the app? the login will always be true and he will still receive notification. Cause I did some research and I found out that I can not detect when the user will uninstall the app so I could update his login status.
Any idea what should I do? Or do you have any better idea than storing the login status? cause for now the user can not logout from application unless he has internet connection so I could be able to update his login status via API. Which doesn't make sense. But i couldn't find any other idea.