Ionic SDK
Learn to integrate Netcore CE Ionic SDK.
The Netcore CE Ionic 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 Ionic SDK effectively in your Ionic projects.
Prerequisites
Before installing and integrating the Netcore CE Ionic SDK, ensure that you have the following prerequisites in place:
- A Netcore CE account
- A Ionic project is set up and ready for development.
- The
Node.js
andnpm
must be installed and updated on your system. - Any preferred development environment must be setup.
- The target platforms (Android/iOS) must have development environments configure.
Integrate Ionic SDK
To integrate the Netcore CE Ionic plugin into your project, follow the installation steps:
Install Smartech Base Ionic Plugin
Install the Netcore CE Ionic plugin by running the below command from your project directory.
npm install 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 it into your project. You can initialize the Netcore CE Ionic library in your JavaScript code.
import SmartechBaseCordova from 'smartech-base-cordova'
Available Features
For detailed instructions on each feature, refer to the provided links.
Updated 6 months ago