question

KaterinaEgorova-5214 avatar image
0 Votes"
KaterinaEgorova-5214 asked ·

UWP Custom Device integration and uninstall of the UWP app

I have custom capability declared in my UWP application to communicate with the custom device. When The UWP application is being Uninstalled I have to notify custom device so custom device can take actions to clean up data related to my UWP app
How could this be done please?

windows-uwp
· 7
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Unfortunately, there is no api that can listen whether the uwp application is uninstalled. Maybe you can try to send message to your device regularly. Once the application is uninstalled, it means the application won't send message to your device. After waiting for a period of time, if your device does not receive any message, then you can let your custom device clean up data.

0 Votes 0 · ·

This approach will not work for us.
We cannot ping the driver on regular bases just for the sake of possibility of uninstalling our UWP App. This type of activity will interfere with the device's and system's normal activity. Is there any other way to solve this problem. Can we utilize PackageUninstalling APIs: https://docs.microsoft.com/en-us/uwp/api/windows.applicationmodel.packagecatalog.packageuninstalling? Or any other suggestion? Thanks

0 Votes 0 · ·
FayWang-MSFT avatar image FayWang-MSFT KaterinaEgorova-5214 ·

By testing, the PackageUninstalling API won't be triggered when the app is uninstalling. Currently, there is no api can listen whether the app is uninstalled.

0 Votes 0 · ·
Show more comments

0 Answers