I have an app that gives option to install CA cert and it gets stored in the user tab of Trusted Credentials and it works as expected.
FYI
As far as i know there is only a broadcast that tells that uninstall has completed ACTION_PACKAGE_REMOVED
.
After uninstalling the app MyCertApp the event ACTION_PACKAGE_REMOVED
is broadcasted. The code that handles ACTION_PACKAGE_REMOVED
in MyCertApp is alredy gone at that time.
You can do the post-processing only with a second independant app that is still there and that can unistall itself after receiving that MyCertApp is gone.
The other hypotetical solution may be that your app has a menu-item "uninstall MyCertApp". I donot know if it is possible for an app to uninstall itselt