Cordova SDK

Learn to integrate CEE Cordova SDK

The CEE Cordova SDK is a tool for you to engage with users and gain insights into app usage. It enables you to do the following:

  • Send targeted messages to users for better interaction.
  • Track user behavior and app usage for informed decision-making.

This is available for both iOS and Android platforms. This guide helps you install, integrate, and utilize the CEE Cordova SDK effectively in your Cordova projects.

Prerequisites

Before installing and integrating the CEE Cordova SDK, ensure that you have the following prerequisites in place:

  1. A CEE account
  2. A Cordova project is set up and ready for development. For more information on setting up Cordova, refer to Cordova.
  3. TheNode.js and npm must be installed and updated on your system.
  4. Any preferred development environment must be setup.
  5. The target platforms (Android/iOS) must have development environments configure.

Integrate Cordova SDK

To integrate the CEE Cordova plugin into your project, follow the installation steps:

  1. Smartech Base Cordova
  2. Android SDK
  3. iOS SDK

Install Smartech Base Cordova Plugin

Install CEE Cordova plugin by running the below command from your project directory.

cordova plugin add smartech-base-cordova --save

Integrate Android SDK

Refer to Basic Setup, to install the Android SDK. For Android development, proceed with the following steps:

  1. Define Latest SDK version: Add the version line to your gradle.properties.
// Version of smartech base SDK to use with React Native
SMARTECH_BASE_SDK_VERSION=<<base_sdk_android_version>>
  1. Integrate the latest CEE SDK: Update the app-level build.gradle file.
api "com.netcore.android:smartech-sdk:${SMARTECH_BASE_SDK_VERSION}"
  1. Integrate the latest CEE SDK: Add initialization code to the onCreate method of your application class.
SmartechBasePlugin smartechBasePlugin = SmartechBasePlugin.getInstance();
smartechBasePlugin.init(this);
smartechBasePlugin.setDebugLevel(SMTDebugLevel.Level.DEBUG);

🚧

Avoid Unnecessary Code Duplication

Refrain from including Smartech.getInstance(new WeakReference<>(context)).initializeSdk(this); code in the application class. The provided code snippet already accomplishes the required functionality. Adding redundant code may lead to conflicts or unexpected behavior in your application.

Install iOS SDK

For iOS app development, refer to Basic Setup. Once your basic setup is completed, you can integrate into your project. You can initialize the CEE Cordova library in your JavaScript code.

const SmartechBaseCordova = window.plugins.SmartechBaseCordova;

Available Features

For detailed instructions on each feature, refer to the provided links.