***This page has been removed from the VDC due to the Verizon Apps shutdown. Feel free to browse our other development areas, devices, APIs and Tools.***
***NOTE: Effective November 1st, 2012, the VDC no longer accepts new Verizon App submissions. Additionally, beginning December 2012, final billing to customers for all existing Subscriptions and In-App Purchase apps will occur, and all paid Subscriptions and In-App Purchase API apps will be removed from the catalog on November 1st, 2012. Customers will receive a final full month of use & access, before Verizon Apps begins its complete shutdown in January 2013.
For additional details, please review the Verizon Apps Notice and Verizon Apps Transition Timeline.***
The In-App Purchase SDK combines Subscriptions functionality with the ability to easily enable your application to perform In-App purchases in a single SDK. The configuration steps below detail enabling your environment for use of either/both option(s).
Critical Programming Note: There are specific services that run on Android devices and perform the required license checking. You must set these permissions in your AndroidManifest.xml file so your app has the authorization to access the license service. Simply paste the following permissions into the AndroidManifest.xml file before the closing manifest tag:
Assuming an Android project has already been created, the build path for your project must be configured to point to the VZWProtectedApplicationLibrary JAR file included in the SDK.
- In Eclipse, right click the Project and select ‘Properties’.
- In the properties pop-up, select ‘Java Build Path’ then the ‘Libraries’ tab.
- Finally, select ‘Add External JARs’ and point to the location of the Android VZWProtectedApplicationLibrary.jar file on the file system.
After clicking ‘Ok’ the build path for the project will include the VzwProtectedApplicationLibrary JAR file.
Note that the SDK is open source; if you make any modifications to the SDK please use the guidance in the Open Source section below to add the source files directly to the project space in Eclipse.
If you intend on modifying the source code the alternative to using the JAR is to include the source in your project. Note that it is not recommended to modify the source and changes you make could result in failure to pass testing. Only modify the source if you are confident that your changes will not modify the overall operation of the In-App Purchase SDK.
The source files can be downloaded from the VDC portal at: http://developer.verizon.com/downloads/Smart_Phone/Subscriptions/source/vdcdwnload/VZWProtectedApplicationLibrary.zip
They contain both Android and older Subscriptions-only Blackberry files - make sure that you do not confuse the two sources. Eclipse should point to the Android source files.
Note: that there are many ways to import packages to Eclipse – the following steps list one potential way.
- Right click the project ->New-> Package, making sure to name the package com.verizon.vcast.apps.
- Right click the new package that has been created then-> Import -> point to the source folder where your Subscriptions source code is located.
- Check all the source files in Eclipse to import and click Finish