By testing your application, you can ensure that it performs in-app purchasing correctly. If your in-app purchase process uses a back end server, use the live version of the server for testing. You can test the application on a device or in the SDK emulator.
To test your application on a device:
Enable the test
mode for your application by creating an empty file named TEST_MODE.TXT
in the application project's resource folder.
Compile the application and deploy it to the device.
Run the application on the device.
Since the test mode is enabled, all network requests related to in-app purchasing are directed to a test server, which responds in the same way to all requests regardless of their parameters. In the test mode, you can verify that the In-App Purchase API starts the network connection and returns valid responses for successful purchase or restoration requests. No money transactions are made.
When your application is ready to be published in Nokia Store,
Nokia Store automatically removes the TEST_MODE.TXT
file. This allows your application to run in the real Nokia Store
environment and use its in-app purchase feature as intended, for example,
to make money transactions.
The Nokia SDK for Java allows you to simulate in-app purchasing in the emulator. The SDK supports both local simulation (meaning no Internet connection is used) and Nokia test server simulation. You can use the emulator to:
Create and save application-specific simulation settings for in-app purchasing by predefining what values the API methods return
Retrieve product metadata
Purchase a product
Retrieve restorable product details
Restore a product
Retrieve current user and device details for purposes of restoring content not protected with built-in DRM
Simulate DRM access to resource files
The emulator does not interact with the actual Nokia Store servers, so no money transactions are made. For more information about using the emulator, see the SDK documentation.