locked
Purchase information is lost after suspend and terminate

    Question

  • I study the Windows 8 "Trial app and in-app purchapse" sample, and find that the purchased license is lost after the app is suspended and terminated. Please follow the steps below to reproduce the bug:

    1. Launch the sample and select scenario 1: Trial-mode.

    2. Click the "Buy App" button to do a simulated purpose. The output after a successful purchase should be "You successfully upgraded your app to the fully-licensed version. Or if you click the "Purchased" button, the output should be "You are using a fully-licensed version of this app.".

    3. Click "Suspend and shutdown" button in VS debug toolbar to simulate an app suspend and terminate state change.

    4. Press F5 to launch the sample again, and then select scenario 1: Trial-mode.

    5. Click the "Purchased" button, the output is "You are using a trial version of this app.".

    In all, your purchased license is lost in the end. Is this a VS bug, or did I have to do some extra work to save the user licence?

    Thursday, February 28, 2013 1:15 PM

Answers

  • Hi Leonard,

    That is a property of the sample and the simulator. The CurrentAppSimulator reads the app status from a hard-coded XML file rather than from the store, so any changes are temporary and are not reflected in future instances of the app. This is not the case for a real app which uses CurrentApp and uses the live data from the store.

    --Rob

    • Marked as answer by Leonard Thursday, February 28, 2013 10:36 PM
    Thursday, February 28, 2013 9:56 PM
    Owner

All replies

  • Hi Leonard,

    That is a property of the sample and the simulator. The CurrentAppSimulator reads the app status from a hard-coded XML file rather than from the store, so any changes are temporary and are not reflected in future instances of the app. This is not the case for a real app which uses CurrentApp and uses the live data from the store.

    --Rob

    • Marked as answer by Leonard Thursday, February 28, 2013 10:36 PM
    Thursday, February 28, 2013 9:56 PM
    Owner
  • Thank you, that's what I really want.
    Thursday, February 28, 2013 10:35 PM