Kukushka SDK makes it easy to give players survey tasks followed by a reward. The SDK can be installed and set up in minutes.
This version is designed for the Unity game engine. Other versions of the SDK can be found below:
iOS SDK can be found here
Android SDK can be found here
This SDK requires Unity 2018.4+ and provided only for Android and iOS games.
- Android 5+ supported;
- iOS 7+ supported;
Automatic installation and Setup steps:
- Download latest version of SDK from Releases page or directly from this repository;
- Add .unitypackage file to your project;
- Open setup wizard using "Kykyshka SDK" => "Setup Wizard" window;
- Type your App Key in the Setup Wizard;
- Open Example scene and build your Android or iOS application;
- Enjoy!
Manual SDK setup in your project:
Create your game script and initialize SDK by creating object:
Kykyshka sdkInstance = new Kykyshka(new SDKOptions
{
DebugMode = true, // Debug Mode — when active will always display a demo survey regardless of AppKey, UserID, your geo etc. Useful for testing
AppKey = "gamedemo", // Application Key
UserID = "demouserid" // User ID
});
Pro tip: test your integrations with DebugMode = true to immediately see how the game would behave with an active survey
Also you can set custom UserID for your game by SetUserID method:
sdkInstance.SetUserID(your_game_user_id);
SDK Usage:
Now you can call two main methods of Kykyshka SDK to preload and show Survey for user:
sdkInstance.HasSurvey(); // To Check and Preload Available Survey for this user
sdkInstance.ShowSurvey(); // To Show Survey for user
SDK Callbacks:
Kukushka SDK has a lot of different Callbacks for your game. Use this callbacks to detect Survey Complete or problems with loading.
Callback | Parameters | Usage |
---|---|---|
OnSurveyStart | - | Called when user started survey |
OnSurveyAvailable | - | Called after preloading if surveys available |
OnSurveyUnavailable | - | Called after preloading if surveys unavailable |
OnSuccess | int | Called when user complete survey. If a passed parameter is 1, the user was screened out by screening questions |
OnFail | SurveyResult or null | Called when user got error in the survey. May contain additional data. |
OnLoadFail | - | Called when Survey has loading error |
OnError | - | On General SDK Errors Callback |
Callbacks Example:
// Add Survey Callbacks
sdkInstance.OnSurveyStart = () =>
{
// Called when user started survey
};
sdkInstance.OnSuccess = hq =>
{
// Called when user complete survey
//Debug.Log((hq==1) "Screened out" : "Survey complete!")
};
sdkInstance.OnFail = data =>
{
// Called when user got error in the survey
};
sdkInstance.OnLoadFail = () =>
{
// Called when Survey has loading error
};
// Add Preloading Callbacks
sdkInstance.OnSurveyAvailable = () =>
{
// Called after preloading if surveys available
};
sdkInstance.OnSurveyUnavailable = () =>
{
// Called after preloading if surveys unavailable
};
Please, note: Currently version of Kukushka SDK supports only Portrait orientation and your game orientation will be force changed to Portrait at Survey opening and returned to last orientation after Survey closed.
Kukushka SDK uses WebView module to show Survey Window for your users.
This module provided by Third-Party Open-Source Library and can be found here:
https://github.com/gree/unity-webview