Documentation

Documentation

YourOwn SetupYourOwn SDKYourOwn API
Sphere SetupSphere SDKSphere API
  • Resources

›Reference

Getting started

  • Copilot.cx Mobile SDK
  • Importing the iOS SDK
  • Importing the Android SDK
  • SDK configuration

Getting started for flutter

  • Importing the Copilot.cx Android SDK for Flutter
  • Importing the Copilot.cx iOS SDK for Flutter
  • Interacting with the Copilot.cx SDK in Dart

Getting around

  • Hello Copilot

Reference

  • Manage session
  • Report
  • In-app messages
  • Authentication

Event reporting guide

  • Predefined events
  • Custom events

Appendix

  • Releases
  • Open source mapping

In-app messages


Getting started with 'In-app Messages'

'In-app messages' feature allows you to target messages to the right user in the right time displaying a native In-app message which allows pre-defined various interactions.

Integrating with 'In-app messages' feature

In order to add the 'In-app messages' functionality to your project, please follow these steps:

  1. Make sure you start a session calling the sessionStarted(userId) method with the currently logged in userId managed by your backend (Reference)

  2. Optional - If your connected devices are being sold in online marketplaces (like Walmart, Amazon etc.) please follow Online Marketplaces support.

  3. Optional - Copilot.cx In-app messages solution can display messages without an additional authentication process. If you would like to add server authentication for sensitive message content, please refer to Authenticate with Copilot.

Online Marketplaces support


This section is relevant for iOS projects only

In order to add the ability to work with 3rd party installed Online Marketplace Applications some additional configuration changes are required:

  1. In your Xcode project, open your application's Info.plist file.
  2. Locate the LSApplicationQueriesSchemes in your Info.plist file. If this property does not exist, add a new Array property with that name.
  3. Add new items to the LSApplicationQueriesSchemes with the following values:
  • walmart
  • com.amazon.mobile.shopping

Multiple Targets - In case your application contains multiple targets, please make sure this property and values are added to each of the Xcode project's targets.

External authentication

Disabling In-app messages

You can disable In-app messages by calling the disable command on your Copilot.cx instance. In-app messages won't be shown until you enable the in-app messages feature by calling the enable command on your Copilot.cx instance.

It is strongly recommended to control and minimize the duration the 'In-app messages' feature will be disabled in order allow showing the user the most relevant in-app messages at the right time when performing the specific action.

iOS
Android (Java)
Android (Kotlin)
Copilot.instance.inAppMessages.disable()
// or
Copilot.instance.inAppMessages.enable()
Copilot.getInstance().InAppMessages.disable();
// or
Copilot.getInstance().InAppMessages.enable();
Copilot.getInstance().InAppMessages.disable()
// or
Copilot.getInstance().InAppMessages.enable()

App Navigation support for In-app messages actions


You can set custom behaviours for In-app dialog buttons by using the "App Navigation" action. This allows you to implement your own custom in-app navigation, encouraging users to discover and perform certain actions inside your application. In order to do so, you'll have to:

  1. Implement the AppNavigationDelegate protocol for iOS and the AppNavigationHandler interface for Android.
iOS
Android (Java)
Android (Kotlin)
extension AppDelegate: AppNavigationDelegate {

func getSupportedAppNavigationCommands() -> [String] {
// TODO: List here all supported commands
["subscriptionPage", "anotherAppNavigationCommand"]
}

func handleAppNavigation(_ appNavigationCommand: String) {
// TODO : List here the handeling logic for each action. Once the button in the dialog gets pressed, this logic will be executed
switch appNavigationCommand {
case "subscriptionPage":
//TODO: Define here your navigation logic

case "anotherAppNavigationCommand":
//TODO: Define here your navigation logic
...
default:
print("Unsupported app navigation")
}
}
}

class MyAppNavigationHandler implements AppNavigationHandler {

@Override
public void handleAppNavigation(Activity activity, String appNavigationCommand) {
if (appNavigationCommand.equalsIgnoreCase("subscriptionPage")) {

}
else if (appNavigationCommand.equalsIgnoreCase("anotherAppNavigationCommand") {

}
...
else {
Log.d(TAG, "Unsupported app navigation");
}
}

@Override
public List<String> getSupportedAppNavigationCommands() {
return new ArrayList<String>() {{
add("subscriptionPage");
add("anotherAppNavigationCommand");
...
}};
}
}

class MyAppNavigationHandler : AppNavigationHandler {

override fun handleAppNavigation(activity: Activity, appNavigationCommand: String) {
when {
appNavigationCommand.equals("subscriptionPage", ignoreCase = true) -> {

}
appNavigationCommand.equals("anotherAppNavigationCommand", ignoreCase = true) -> {

}
...
else -> {
Log.d(TAG, "Unsupported app navigation");
}
}
}

override fun getSupportedAppNavigationCommands(): List<String> {
return arrayListOf(
"subscriptionPage",
"anotherAppNavigationCommand"
)
}
}
  1. Register your protocol/interface implementation using the Copilot instance in your AppDelegate / Application classes.
iOS
Android (Java)
Android (Kotlin)
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
...
Copilot.setup(analyticsProviders: [firebaseProvider, eventLogProvider]).registerAppNavigationDelegate(self)
...
}
...
}

public class MyApplication extends Application {
public void onCreate() {
...
Copilot.setup(this, providers).registerAppNavigationHandler(new MyAppNavigationHandler());
...
}
}
class MyApplication: Application() {
override fun onCreate() {
...
Copilot.setup(this, providers).registerAppNavigationHandler(MyAppNavigationHandler())
...
}
}
← ReportAuthentication →
  • Getting started with 'In-app Messages'
  • Integrating with 'In-app messages' feature
  • Online Marketplaces support
  • Disabling In-app messages
  • App Navigation support for In-app messages actions
Copilot
Mail: hello@copilot.cx
Call: (212).398.0001
© Copilot.cx 2025