Samsung devices use a variant of Android. Some may include both Google Play and the Samsung Galaxy Store.
The following outlines the steps required to enable Galaxy Store in app purchases in your application.
Samsung have created a guide here to setup an application for IAP. Below we will summarise the key points.
com.samsung.android.iap.permission.BILLING permission to your application (see manifest additions below) and create an APK making sure you have set a package name (application id) different from the app registered in other app stores.
You can use this APK to upload to the store as a "dummy" application to go through the process of setting up your application's in-app items and start testing locally.
You do not need to publish either to beta or live before testing. However make sure you have correctly set your testing users as per testing.
Register an app and in-app items
- Sign in to Seller Portal using your Samsung account.
- Click Add New App
- Click Android, select the default language, and click Next.
Note : After entering information in each tab, click Save.
- In the Binary tab, upload your app APK.
In the App Information tab, enter fundamental app details.
In the Country / Region & Price tab, specify a free or paid app, a paid app price, and countries to sell your items.
In the In App Purchase tab, register one or more in-app items:
a. Click Add Item
b. Enter in-app item information.
c. Click Save.
Note : For a subscription item, ensure your item registration information is correct. After saving a subscription item, you can only change its item title.
d. Verify the item is listed
The Samsung In-App Purchases implementation is provided in the Samsung variant of the InAppBilling extension, i.e.
com.distriqt.InAppBilling.Samsung.ane. You must use this version of the extension to ensure you have the Samsung In-App Purchases code available to your application.
You must only use one variant in your application. Remove any other versions of the InAppBilling extension from your project.
Add the following permissions to your manifest additions, these permissions indicate that Samsung In-App Purchases are used in this application:
These should be added to the
application node in your manifest additions.
The following example uses our test applicaiton id
Setting up a Billing Service
The following is in addition to the documentation in Setting up a Billing Service.
When setting up your service you will need to specify the
InAppBillingServiceTypes.SAMSUNG_INAPP_PURCHASE service type. You will also want to set the "operation mode". This is a setting that allows testing of samsung In-App Purchases and should be disabled in production builds (or set to
You should wait for the
InAppBillingEvent.SETUP_SUCCESS event to ensure the Samsung In-App Purchases are correctly initialised and available on the device.