Handle session on uninstalling the application

I want to destroy my current session in the backend if the application is getting uninstalled from the mobile device. What are the best ways to achieve it?

Like when someone holds the app on iOS and deletes the app? I don’t think iOS/Android gives you a hook on that.

You could maybe do something like come up with a polling solution, to know if apps are still installed by periodically checking in with your backend.