The following diagram illustrates the restoration process for items that are built-into an app and protected by Nokia using DRM. The green color indicates the secure payment process, which is executed by the in-app purchase API. The diagram does not include a back-end server of your own, which you can use, for example, to gather statistics, verify the purchase, or provide other services.
The following steps describe one possible restoration process with DRM protected content:
To be able to display the purchasable items to the consumer, the app must know the IDs of the products that are available for purchase. Before you code the app, you use Nokia Publish to identify in-app purchase items. Nokia Publish returns IDs for these items. Use the in-app purchase API to get descriptions for purchasable items, using IDs to identify items.
Nokia Store returns the product metadata (name, price, and description) that matches the given product IDs.
The app displays the items to the consumer, using the metadata received. In this scenario, the app also displays a UI option to the consumer to check if there is any previously purchased content to restore.
The consumer selects this option, and the app sends a request to Nokia Store to find out which items the consumer is entitled to restore. This step includes prompting the consumer for their Nokia account password, if the consumer is not yet signed in.
Nokia Store returns the list of restorable items.
The app displays the available items to the consumer.
The consumer selects which item(s) to restore.
The app triggers a restoration process using the in-app purchase API, repeating the process for each item that is being restored.
Nokia Store delivers the DRM key for each restored item to unlock them on the device.