1

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.

Anu
  • 1,884
  • 14
  • 30

1 Answers1

0

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.

Johannes Staehlin
  • 3,680
  • 7
  • 36
  • 50
  • When an application initializes, a connection template will be created in the SUP. I want to remove that while the application get uninstalled. It is almost impossible to detect a connection template in such a manner and delete it manually from the SUP server. – Anu Sep 18 '12 at 08:56