Skip to main content
Samsung Developer Program

Create an Android Project and Add IAP Helper

In your IDE, you must create an Android app project and add IAP Helper to it.

 

Starting with IAP v3.0, apps are sorted by their package name. You must specify the app's package name that is registered in Seller Office in order to test IAP and prevent processing errors, because the Android app is separated by PackageName instead of ItemGroupId. 

To create a new Android project:

  • Android Studio 2.3.3 is the IDE used in this procedure and throughout this guide.
  1. In Android Studio, click File > New > Project.
  2. Specify the app name and its package name, and click Next.
    In the SDK example, the app name is IAP5Sample, and its package name is iap5helper.sample.example.
     
  3. Set Minimum SDK: (API 14 or higher), and click Next.
  4. Select an Empty Activity, and click Next.
  5. Use the default Activity and Layout names, and click Finish.

 

To add IAP Helper to your Android app project:

  • Your Android app must specify that its minimum SDK is API 14 or higher. 
  • In the procedure, you must specify the package name registered to your Android app.
     
  1. In Project Explorer:
    1. Right-click [Project name] > New > Module.
      In the SDK example, the project name is IAP5Sample.
    2. Select Import Gradle Project, and click Next.
       
  2. In a local browser, navigate to the IAP5Helper folder in the Source Directory, then click Finish to add the project.
  3. In Project Explorer:
    1. Select [Project name].
    2. Right-click [Project name], then select Open Module Settings.
       
  4. In the Project Structure screen:
    1. Select IAP5Sample Modules, and click the Dependencies tab.
    2. Click the + button.
       
  5. In the Choose Modules screen, select IAP5Helper, and click OK.
  • Was this article helpful?