Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

How To support Samsung Apps

Anastasiia Karimova edited this page Mar 5, 2015 · 4 revisions

In the Code

  1. In the AndroidManifest.xml add the corresponding billing permission

     <uses-permission android:name="com.sec.android.iap.permission.BILLING" />
  2. Map the SKUs if required. Remember, Samsung Apps describes an item in terms of Item Group ID and Item ID.

    //format "(digitst)group_id/(string)item_id"
    OpenIabHelper.mapSku(SKU_PREMIUM, OpenIabHelper.NAME_SAMSUNG, "100000100696/000001003746");
    OpenIabHelper.mapSku(SKU_GAS, OpenIabHelper.NAME_SAMSUNG, "100000100696/000001003744");
    OpenIabHelper.mapSku(SKU_INFINITE_GAS, OpenIabHelper.NAME_SAMSUNG, "100000100696/000001003747");
  3. Instantiate new OpenIabHelper using an Activity instance. Activity context is required to call startActivityForResult() for SamsungAccount Activity.

  4. In the proguard config file add

    # SAMSUNG
    -keep class com.sec.android.iap.**
    

Test

To test your .apk with SamsungApps

  • for Samsung Apps

    • Ensure SamsungApps is installed on your device
    • Ensure Samsung IAP Service is installed on your device
  • for OpenIAB

    # install for SamsungApps:
    adb install -i com.sec.android.app.samsungapps /path/to/YourApp.apk
    SamsungApps.isSamsungTestMode = true

Useful Links

http://developer.samsung.com/in-app-purchase

Clone this wiki locally