Restore Product

Purchased products which are restorable could be restored using In-app API restoreProduct(…). The settings for restoration could be done using Restore and Restorable Products tab.

Restore Product

This section allows the developer to simulate the product restore. The developer has to select the In-app ID form the In-app ID drop down list.

These settings will be used for simulating the In-app API restoreProduct(..). The Ticket number entered is passed to the MIDlet In-app listener call back function restorationCompleted(..).

The success or failure of the restorationCompleted(..) callback function can be simulated by choosing Success or Fail radio button. In case of failure, the user can simulate the reason for the failure by choosing any of the option in the Reason drop down list. Each In-app ID can be set have success or fail.

This allows the user to simulate the scenarios like Restoration not allowed, restoration device limit exceeded etc.

Time delay could be simulated by entering the time in the Time Delay edit box.

Figure: Restore and User Data UI

For Example:

In order to successfully restore the product the developer has to do the following settings:

  1. Select the In-apps ID from the drop down list from the Restore Product section.

  2. Select Success.

  3. Enter the Ticket ID of the product. Any value can be entered here.

  4. Enter the Time Delay (for example, a time delay of 10 seconds can be set to simulate the response time from the Nokia Portal).

Note: You may select multiple In-app IDs from the drop down list under the Restore Product section

After doing the above settings, open the MIDlet which uses the restoreProduct(..) API in the emulator. The user will be able to restore all previously purchased product through the call back function.

Restorable Product Details

This section helps the developer to fetch the list of restorable products which could be restored. The developer has to check the In-app ID from the In-app ID list box.

These settings will be used for simulating In-app API getRestorableProducts. The product data items checked is passed to the MIDlet In-app listener call back function restorableProductsReceived(..).

The success or failure of the restorableProductsReceived(..) callback function can be simulated by choosing Success or Fail radio button. In case of failure, the user can simulate the reason for the failure by choosing any of the option in the Reason drop down list.

This allows the user to simulate the scenarios like restoration not supported, restoration device limit exceeded etc.

Time delay could be simulated by entering the time in the Time Delay edit box.

For Example:

In order to successfully see the list of restorable products in the MIDlet the developer has to do the following settings:

  1. In the Restorable Product Details, check/uncheck the In-app IDs from the available productID list based on which items user wants to make as restorable item.

  2. Select Success.

  3. Enter the Time Delay (For example: 10 seconds) to simulate the response time from the Nokia portal.

After doing the above settings, open the MIDlet which uses the getRestorableProducts(..) API from the emulator. The user will be able get the list of all restorable products through the call back function.