I have a office365/SharePoint Online App (SharePoint Hosted App) that when installed into SharePoint Online, it will provision some static files (css/js) and custom actions into the SharePoint host web.
The problem is when the user tries to Remove the application from SharePoint host, my provisioned files will remain installed and active, unless the user goes to a specific app page, and clicks a custom uninstall button at my app web ( not to mention that he has to click it before Removing the application itself! )
Is there any clean way that I can run my un-installation logic ( to remove those provisioned files ) when the user Removes the App ?
Note that proposed solution has to be completely client side ? ( we cannot go with provider hosted solutions )