All the products / resources which were purchased earlier could be restored by using In-App API. This could be simulated by using the Restore and Restorable Products user interface.
Also, if the developers using non Nokia DRM (for his purchase security) and wishes to see the user details, they can use this user interface to simulate the same.
This section allows the developer to simulate the product restore. The developer has to select the product ID form the Product 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 product 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:
Select the product ID/IDs from the drop down list from the Restore Product section.
Select Success.
Enter the Ticket ID of the product. Any value can be entered here.
Enter the Time Delay (for example, a time delay of 10 seconds can be set to simulate the response time from the OVI Portal).
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.
This section helps the developer to fetch the list of restorable products which could be restored. The developer has to check the product ID from the Product 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:
In the Restorable Product Details, check/uncheck the product IDs from the available productID list based on which items user wants to make as restorable item.
Select Success.
Enter the Time Delay (for example, a time delay of 10 seconds can be set to simulate the response time from the OVI 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.