Cordova SDK Integration

Quick Steps Guidelines

Step 1: Cordova Installation

In your Terminal, navigate to your Cordova directory and install the Cordova plugin, copy in package.json-dependencies for wrapper, and run the command in the step.

Step 2: Start Netmera Plugin

Start Netmera Plugin with the provided code below.

Cordova SDK integration completed 👏

Step 1: Cordova Installation

  1. In your Terminal, navigate to your Cordova directory and install the Cordova plugin.

cordova plugin add https://github.com/Netmera/cordova-plugin-netmera.git
  1. Copy in package.json-dependencies for wrapper.

"@ionic-native/netmera-plugin": "git+https://github.com/Netmera/ionic-wrapper-netmera.git"
  1. Run the following command in your terminal to install the dependencies.

npm install

Sample

"@ionic-native/netmera-plugin": "git+https://github.com/Netmera/ionic-wrapper-netmera.git"
"dependencies": {
  ...
  ...
  "@ionic-native/netmera-plugin": "git+https://github.com/Netmera/ionic-wrapper-netmera.git",
  ...
  ...
}
  1. In your project's config.xml, add the following preferences:

<preference name="NetmeraKey" value="example-key" />
<preference name="NetmeraBaseUrl" value="example-base-url" />
<preference name="FcmKey" value="example-fcm-key" />
<preference name="AppGroupName" value="group.com.example.groupname" />
CommandPurposeNeed

NetmeraKey

Netmera SDK API Key on Netmera Panel

Required

FcmKey

Firebase Sender ID on your Firebase project

Required

AppGroupName

Group name on your Apple developer project (for carousel push)

Optional

NetmeraBaseUrl

Base URL on your server (for on premise setup)

Optional

Step 2: Start Netmera Plugin

import { NetmeraPlugin } from '@ionic-native/NetmeraPlugin/ngx';

constructor(private netmera: NetmeraPlugin) {}
...

this.netmera.start();

Cordova SDK integration completed 👍

Cordova SDK integration has been successfully completed, and your devices are now ready to receive the following types of push notifications sent via the Netmera Dashboard:

  1. Standard Push Notifications

  2. Interactive Push Notifications (If you've configured and published them using the Dashboard)

  3. Push Notifications with Web View Content

  4. Push Notifications with Deeplinks (If your application supports URL Scheme-based deeplinks and you've configured the application's URL Scheme in the Dashboard.)

Last updated