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

akarimova edited this page Oct 22, 2014 · 4 revisions
  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 "group_id/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.**
    
  5. To test your .apk with SamsungApps following steps are needed:

    • Ensure SamsungApps is installed on your device
    • Ensure Samsung IAP Service is installed on your device
    • Install your .apk with special option to help OpenIAB choose SamsunApps
    # install for SamsungApps:
    adb install -i com.sec.android.app.samsungapps /path/to/YourApp.apk
Clone this wiki locally