Currently we support the following features for Android:
Only Google Play Store is currently supported
Auto-renewing subscriptions validation and renewals tracking
One time purchases validation
Refunds / Revokes tracking
Grace Period and On Hold states are supported
Fraud detection (basically verifying that purchase is valid and doesn't belong to another user)
Promo-Codes are supported
Introductory Prices are supported
Integrations with 3rd party services
Cross Platform is supported
If purchase is made through SDK's billing method, then it will be acknowledged / consumed by SDK.
Apphud SDK requires minimum Android 4.1 and supports only Google Play store.
​Google Play Service Account Credentials file is required to be uploaded to Apphud.
Add the following lines to your build.gradle
file:
allprojects {repositories {...maven { url 'https://jitpack.io' }}}
dependencies {implementation 'com.github.apphud:ApphudSDK-Android:0.3'}
To initialize Apphud SDK you will need API Key. It is a unique identifier of your Apphud application. You can get it in your Apphud application settings under General
tab.
Basic initialization looks like this:
Apphud.start(this, "API_KEY")
Apphud.start(this, "API_KEY");
There is additional parameter which sets custom user id:
Apphud.start(this, "API_KEY", "custom_user_id")
Apphud.start(this, "API_KEY", "custom_user_id");
You are not required to use Apphud purchase method. If you purchase products by yourself, then you should sync purchases with Apphud. So there are two options:
To make a purchase call:
Apphud.purchase(activity, skuDetails) { _ -> }
Apphud.purchase(activity, skuDetails, purchases -> { return null;});
At the launch of the app Apphud automatically fetches SKU Details for products that are added in Apphud dashboard. You can set ApphudListener
and implement the following method:
fun apphudFetchSkuDetailsProducts(details: List<SkuDetails>)