I am developing an application for Android using SUP 2.1.3. While initialization the application will be registered in the server and makes a connection between the server and the device. Now this registered connection has to be removed when the user uninstall the application from the device.
My question is: can I do it through the application itself?
If yes, How can I do it. From my research, I could understand that it is not possible to call any code at the time of uninstall as we do it with onDestroy() or onPause() methods.
No, you can’t.
When you uninstall an application, its process is killed (if it was running) and the application folder is deleted.
Why does the connection has to be removed ?
Either way, when checking if the user is onboarded at the SUP, the Connectivity library is simply returning a boolean value from a SharedPreferences file.