Currently, the Kongregate Publishing SDK does not include direct integration for Kartridge. The Kartridge SDK is required for your game to integrate with Kartridge. However, the Kartridge SDK does not include the analytics tools included with the publishing SDK. To add the features of the Publishing SDK to a Kartridge game, first integrate the Kartridge SDK then follow the steps below to enable a Kartidge SDK Adapter for the Publishing SDK. The process is very similar to enabling a Steam game to use the Publishing SDK.
The Kongregate Publishing SDK has dependencies on native Kartridge SDK methods. In order to access that functionality, it makes use of a KartridgeAdapter
class. To access this class you must include the adapter in your build and initialize the StandaloneEnabled
and StandaloneAdapterClass
settings as described below.
UNITY: Add the KartridgeAdapter.cs
file included in the Unity
folder of the SDK zip to your build and set the StandaloneAdapterClass
setting like so:
KongregateAPI.Settings.StandaloneEabled = true;
KongregateAPI.Settings.StandaloneAdapterClass = typeof(Kongregate.KartridgeAdapter);
AIR: Add the KartridgeAdapter.as
file included in the SDK zip to your project and set the following settings:
KongregateAPI.Settings.StandaloneEabled = true;
KongregateAPI.settings.standaloneAdapter = new KartridgeAdapter();
Authentication is handled by the Kartridge SDK. The Kongregate Panel is not needed, since Kartridge performs the authication. When the KartridgeAdapter
is enabled, authentication events (e.g. KONGREGATE_EVENT_USER_CHANGED
and KONGREGATE_EVENT_GAME_AUTH_CHANGED
) will fired from the publishing SDK. Note: similar events are also fired from the Kartridge SDK, which you may already be handling. No need to handle them in both places.
Analytics functionality should work as normal when targeting Standalone/Kartridge builds.
Since standalone builds do not provide a bundle ID or application version, you will need to manually set two additional fields in the KongregateAPI.Settings
object, as shown below:
Unity
KongregateAPI.Settings.BundleID = "com.kongregate.mobile.<gamename>.steam";
KongregateAPI.Settings.AppVersion = "<your_app_version_string>";
Air
KongregateAPI.settings.bundleID = "com.kongregate.mobile.<gamename>.kartridge";
KongregateAPI.settings.appVersion = "1.0.0";
Statistics passed to the publishing SDK are passed through to the Kartridge SDK. You’ll only want to submit stats to one of the SDKs to prevent them from being reported twice.
The publishing SDK does not support in-app purchases. To access this feature you must use the Kartridge SDK directly.