Cordova SDK
The Netcore CE 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 Netcore CE Cordova SDK effectively in your Cordova projects.
Prerequisites
Before installing and integrating the Netcore CE Cordova SDK, ensure that you have the following prerequisites in place:
- A Netcore CE account.
- A Cordova project is set up and ready for development. For more information on setting up Cordova, refer to Cordova.
- The
Node.js
andnpm
must be installed and updated on your system. - Any preferred development environment must be set up.
- The target platforms (Android/iOS) must have development environments configured.
Integrate Cordova SDK
To integrate the Netcore CE Cordova plugin into your project, follow the installation steps:
Install Smartech Base Cordova Plugin
Install Netcore CE 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:
- 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>>
- Integrate the latest Netcore CE SDK: Update the app-level
build.gradle
file.
api "com.netcore.android:smartech-sdk:${SMARTECH_BASE_SDK_VERSION}"
- Integrate the latest Netcore CE 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 Netcore CE Cordova library in your JavaScript code.
const SmartechBaseCordova = window.plugins.SmartechBaseCordova;
Available Features
For detailed instructions on each feature, refer to the provided links.
Updated 5 months ago