The Connecthings Cordova plugin allows you to initialize the SDK, access to the GDPR methods and In-App actions methods from the js code.

A cordova demo application is available on github to shows you a concrete implementation.

You just have to clone the repo

Install the plugin

You need to run the following command:

cordova plugin add

To uninstall the plugin:

cordova plugin remove cordova-bridge-connecthings

How to use it


First you need to seize your HEROW's identifiers:

  • The Herow platform you use
  • Your SDK ID
  • Your SDK Key
  • Your company

To have more information about every parameters again, we invite you to consult our documentation.

Let's see, how to overwrite these identifiers:

  • For Android, you need to create a xml file called "connecthings-settings.xml".
<?xml version="1.0" encoding="utf-8"?>
 	<string name="ct_url_type">PROD</string>
    <string name="ct_login">your SDK ID</string>
    <string name="ct_password">your SDK Key</string>
    <string name="ct_company">your comapny</string>

And then overwrite, the resource from your config.xml file :

<resource-file src="www/assets/connectplace-settings.xml" target="app/src/main/res/values/connectplace-settings.xml" />
  • For iOS, you need to create a xml file called "connectplace-settings.plist".
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
		<string>your SDK ID</string>
		<string>your SDK Key</string>
		<string>your comapny</string>

Again, you need to override, the resource file from your config.xml file :

<resource-file src="www/assets/connectplace-settings.plist" target="connectplace-settings.plist" />

And that's it, you're good to go.

Managing location permission

To be efficient the HEROW's SDK need to have access to the location permission. You can of course handle the permission yourself or otherwise you can use the following method :


Being compliant with GDPR

You have 4 methods available to help you to be GDPR compliant :

  • ConnecthingsBridge.hasOptinsBeenAsked();
  • ConnecthingsBridge.updateOptin(type, value);
  • ConnecthingsBridge.allOptinsAreUpdated();
  • ConnecthingsBridge.isOptinAuthorized(type, function(result));

You can find out more about this by reading our GDPR tutorial.

Please find below a short workflow example:

// Check if the optins have already been asked
ConnecthingsBridge.hasOptinsBeenAsked(function(pluginResult) {
    console.log("hasOptinsBeenAsked: " + pluginResult["hasOptinsBeenAsked"]);

//give the optin to the SDK: USER_DATA is mandatory
ConnecthingsBridge.updateOptin("USER_DATA", true);
ConnecthingsBridge.updateOptin("STATUS", true);

// Notify the SDK that all optins has been given - must be called each time you update optin

// Check the status of any optin
ConnecthingsBridge.isOptinAuthorized("USER_DATA", function(pluginResult) {
    optinResult.innerHTML = "";
    optinResult.innerHTML = "USER_DATA: " + pluginResult["isOptinAuthorized"];

To learn more about this you can read our dedicated tutorial.

The In-App actions

The following methods allow your application to use the in-app actions.

In-app Actions are actions/messages triggered on a user's phone when the application is active in the foreground.

You can find out more about this by reading our In-App actions tutorial.

To be able to react to in-app action, you need:

  • First, to register your in-app action thanks to the registerInAppAction() method :
  • Then, you need to create two functions: createInAppAction & removeInAppAction.
ConnecthingsBridge.alert.createInAppAction = function(pluginResult) {
	var placeInformation = pluginResult["placeInAppAction"];

ConnecthingsBridge.alert.removeInAppAction = function(pluginResult) {

  • Last, but not least, as soon as you finished to use the in-app system, you need to unregister the listener by using the following method :

To know everything about in-app action, please consult our documentation.


  • For debugging the native side, you can use Android Studio and open your application perspective on the Android platform result (sample/platforms/android).
  • For debugging the client javascript side, you can use chrome, you can read this tutorial to learn how to do it.


  • For debugging the native side, you can use XCode, you need to open your application perspective on the ios platform result (sample/platforms/ios).
  • For the client side, you can use safari, just follow this little tutorial.