DRM Access, User and Device Data

DRM Access

If the you want to protect the content in the application using DRM and access the content , then use the API getDRMResourceAsStream(…). The API getDRMResourceAsStream(…) provides the client application access to DRM encrypted resource files inside JAR. SDK provides options to simulate success/failure for this API. The DRM Content drop down list is populated from the directory <Application Path>/res/drm/data (<Application Path> is provided by the developer in the “Application Details” tab). If the developer does not set the <Application Path> then DRM Content drop down will be empty.

Figure: DRM Access, User and Device Data UI

For example:

Simulation of successful DRM file access:

  1. Place the resource file/files (example Nokig.gif) in the folder <project_root>\res\drm\data\resourceid_x (exampleres\drm\data\resourceid_12345), where X is the product ID of the corresponding purchase item.

  2. Recreate the JAR with res folder included.

  3. In the IAP simulation window go to DRM Access, User and then Device Data tab.

  4. Choose the item “drm/data/resourceid_x/helloworld.gif” from the DRM Content drop-down list.

  5. Select Success option.

User and Device Data (for Non Nokia DRM)

Developers who are using non-Nokia DRM for protecting the contents of the application, can get the user and device specific data using the In-app API getUserAndDeviceId. The developer has to enter the details like Country, Device Model, IMEI, Account, Language, and IMSI.

These settings will be used for simulating the In-app API getUserAndDeviceId(..). The above mentioned user data will be passed to the MIDlet listener call back function userAndDeviceDataReceived(..). The success or failure of the userAndDeviceDataReceived(..) call back function can be simulated by choosing Success or Fail radio button.

For example:

Enter the details of the user such as Country, Device Model, IMEI, Account, Language, IMSI.

In real scenario each In-app API uses network connection; there could be a delay in response. This delay could be simulated by entering the time delay in Time Delay. After doing the above settings, open the MIDlet which uses the getUserAndDeviceId(..) API in the emulator. The user will be able get the user and device details in the listener call back function userAndDeviceDataReceived.