Search code examples
windows-phone-8installationin-app-purchase

Detect application reinstallation on Windows Phone


In windows phone 8 application the user is given a limited number of specific actions.The current number is stored in IsolatedStorageSettings. Unlocking of the application make with In App purchase (IAP)

The problem is that when the user reinstall the app data from IsolatedStorage are deleted.

How detect application re-installation on Windows Phone?


Solution

  • From a device, there's no way to detect that an app has been reinstalled. Applications are sandboxed, and one of the purpose is precisely to be able to completely wipe it when uninstalling.

    The only alternative I can think of requires that you set up a web service. Windows Phone provides way to uniquely identify an user, and you can use that to track installations: https://msdn.microsoft.com/en-US/library/windows/apps/microsoft.phone.info.userextendedproperties(v=vs.105).aspx

    But it means that the user will need an internet connection when launching your app the first time, which may be an inconvenience. It also means that you'll have to find some hosting for your web service.