Context Decision
Context Decision helps you increase your app's revenue by showing the right prompts and messages at the right time.
Overview
- Step 1: Add ContextSDK to your app
- Step 2: Ship app into production in Calibration Mode
- Step 3: Once the model is ready, you can start making decisions based on the SDK's predictions
Impact on your app
Less than 0.2% CPU Usage
0.6 MB Memory Usage
Adds less than 700kb to your app's binary size
No PII processed or stored
No app permissions required
Operates without ATT
Installation
Add https://github.com/context-sdk/context-sdk-releases
as dependency.
- Download the latest release: https://storage.googleapis.com/de73e410-context-sdk-releases/latest/ContextSDK.zip
- Drag & Drop the
ContextSDK.xcframework
folder into the Xcode file list - Go to your project settings, scroll down to
Frameworks, Libraries, and Embedded Content
, addContextSDK.xcframework
, and selectEmbed & Sign
If you want to download a specific version, you can replace latest
with the desired version number, e.g. https://storage.googleapis.com/de73e410-context-sdk-releases/3.1.0/ContextSDK.zip
Step 1: Add the ContextSDK maven repository in your project level settings.gradle.kts
file:
dependencyResolutionManagement {
repositories {
...
// Add the ContextSDK maven repo:
maven {
url = uri("https://storage.googleapis.com/fc4073e9-contextsdk-maven/")
}
}
}
Step 2: Add the ContextSDK dependency in your module level build.gradle.kts
:
Step 1: Choose your preferred package manager:
Step 2: Ensure minimum Deployment Target
ContextSDK requires a minimum deployment target of iOS 14.0, be sure to update your ios/Podfile
to specify 14.0 or higher:
- Download the latest version of ContextSDK: https://storage.googleapis.com/de73e410-context-sdk-releases/latest/ContextSDK.zip
- Drag & drop the ContextSDK.xcframework into the
Assets/Plugins/iOS
folder of your Unity project - Add the
ContextSDKBinding.cs
script next to it
License Key
After you installed ContextSDK, you need to add your license key. Register here to get started.
In your willFinishLaunchingWithOptions:
(or anywhere before you access the SDK) setup the ContextManager
:
- Create a new custom Swift class named
AppDelegate.swift
- In your
App
sceneUIApplicationDelegateAdaptor
property wrapper
Note: Android is still in beta - to obtain a license key contact us at support@contextsdk.com
- In your
Application
sub-class call the following code:
class MainApplication : Application() {
override fun onCreate() {
super.onCreate()
ContextSDK.setup(this, "YOUR_LICENSE_KEY_HERE")
}
}
- In your primary
Activity
subclass, or in everyActivity
in your application, allow ContextSDK to attach and detach:
- In your
Application
sub-class call the following code:
public class MainApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
ContextSDK.Companion.setup(this, "YOUR_LICENSE_KEY_HERE", new ContextSDKConfiguration());
}
}
- In your primary
Activity
subclass, or in everyActivity
in your application, allow ContextSDK to attach and detach:
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ContextSDK.Companion.attachToActivity(this);
}
@Override
protected void onDestroy() {
super.onDestroy();
ContextSDK.Companion.detachFromActivity(this);
}
}
Notes:
- If the above isn't setup correctly, ContextSDK won't be able to start and stop collection of accelerometer & gyroscope data.
- The
Activity
must conform toLifecycleOwner
(e.g.AppCompatActivity
). PlainActivities
are not supported.
Call the following code on app start:
In the Start()
of a MonoBehaviour
that is run early in your game (or anywhere before you access the SDK) setup the ContextManager
:
Get Started with Context Decision
Choose your platform to get started: