nokia-x-in-app-payment-samples/PepperFarmSimulator
Tomi Paananen f466e3d72d Updated copyright and license information. 2014-04-25 13:55:36 +03:00
..
gradle/wrapper Added Pepper Farm Simulator sample and updated the README.md. 2014-02-20 16:47:30 +02:00
libs Added Pepper Farm Simulator sample and updated the README.md. 2014-02-20 16:47:30 +02:00
res Updated copyright and license information. 2014-04-25 13:55:36 +03:00
src/com/nokia Updated copyright and license information. 2014-04-25 13:55:36 +03:00
.classpath Added Pepper Farm Simulator sample and updated the README.md. 2014-02-20 16:47:30 +02:00
.project Added Pepper Farm Simulator sample and updated the README.md. 2014-02-20 16:47:30 +02:00
AndroidManifest.xml Updated copyright and license information. 2014-04-25 13:55:36 +03:00
README.md Added Pepper Farm Simulator sample and updated the README.md. 2014-02-20 16:47:30 +02:00
build.gradle Added Pepper Farm Simulator sample and updated the README.md. 2014-02-20 16:47:30 +02:00
gradlew Added Pepper Farm Simulator sample and updated the README.md. 2014-02-20 16:47:30 +02:00
gradlew.bat Added Pepper Farm Simulator sample and updated the README.md. 2014-02-20 16:47:30 +02:00
ic_launcher-web.png Added Pepper Farm Simulator sample and updated the README.md. 2014-02-20 16:47:30 +02:00
license.txt Updated copyright and license information. 2014-04-25 13:55:36 +03:00
lint.xml Added Pepper Farm Simulator sample and updated the README.md. 2014-02-20 16:47:30 +02:00
proguard-project.txt Added Pepper Farm Simulator sample and updated the README.md. 2014-02-20 16:47:30 +02:00
project.properties Added Pepper Farm Simulator sample and updated the README.md. 2014-02-20 16:47:30 +02:00

README.md

Nokia In-App Payment API sample: Pepper Farm Simulator

This Nokia sample application demonstrates how to implement the support for Nokia In-App Payment enabler. This application contains sample code to:

  • Connect to Nokia In-App Payment enabler service
  • Check if your application supports In-App billing
  • Return product information
  • Purchase content
  • Consume content
  • Restore content

Instructions

Import the project to your IDE. The recommended build target for the project is Android 4.1.2, API level 16.

Implementation

Description of the classes:

  • Package com.nokia.example.pepperfarm.client:

    • MainScreenPepperListFragment: Fragment for the main screen of the Pepper Farm Simulator. Contains all purchased peppers in a list.
    • PepperFarmMainScreenActivity: This is the first screen that loads in the Pepper Farm application. It shows you a list of peppers you have already purchased and includes buttons allowing you to purchase, restore and consume peppers.
    • PepperFarmSplashScreen: Splash screen that is shown when application is launched for the first time.
    • ProductListActivity: Activity representing a list of purchasable products.
    • ProductListFragment: Fragment containing a list of all purchasable peppers.
  • Package com.nokia.example.pepperfarm.client.util:

    • ProductDetails: Holds product details response data.
    • Purchase: Holds purchase and restoration response data.
  • Package com.nokia.example.pepperfarm.iap:

    • Payment: This class creates a ServiceConnection with Nokia In-App Payment enabler. Used to do all Nokia In-App Payment enabler specific actions.
  • Package com.nokia.example.pepperfarm.product:

    • Config: Product ID mapping for all purchasable content.
    • Content: Used to represent a collection of Nokia Store IAP items.
  • Package com.nokia.example.pepperfarm.product.adapters:

    • ContentListAdapter: An adapter used to show a list of Peppers you currently own.
    • ContentPurchaseAdapter: This adapter is used to display a list of products that can be purchased.

Known issues

None.

License

See the separate license file provided with this project.