website logo
HomeGo to Dashboard
User Guide
How-To Videos
Developers
Navigate through spaces
⌘K
Getting Started
Introduction
Compatibility
Terminology
SDK Installation
Shopify
Any Website
Dukaan
Angular 2+
WooCommerce
WordPress
Android Native
iOS Native
Flutter
Cordova
Ionic
React Native
Data Integration
Data Models
Mandatory Events
Mandatory Properties
Call to Action
System Events
Device Properties
Docs powered by archbee 

Get Started

8min

The Cooee's Cordova plugin for customer engagement gives your team the power to easily integrate it in your Cordova (with Ionic) application. Follow these simple steps:

Add Plugin

Install the plugin using the popular single commands in the Terminal/PowerShell:

Cordova
Ionic
|
ionic cordova plugin add @letscooee/cordova-plugin \
    --variable COOEE_APP_ID="MY_COOEE_APP_ID" \


Cordova/Ionic will automatically pull the latest version of the plugin.

Document image


Replace MY_COOEE_APP_ID with the App ID which is present at Cooee Portal.

Notification Service Configuration (Only for iOS)

Plugin adds CooeeNotificationServiceExtension as a new target in the iOS platform. Just add build number and build version in the new target. Refer to the below image as a reference.

Document image


Permission Usage

Cooee uses few permissions if granted (we do not ask explicitly).

Android (Optional)

Cooee SDK supports prompting the following permissions via engagement. To make it work, you need to add the following in app's config.xml under <platforms name="android"> file:

XML
|
<!-- Cooee SDK use this permission to run Augmented Reality engagements -->
<config-file target="AndroidManifest.xml" parent="/manifest">
    <uses-permission android:name="android.permission.CAMERA" />
</config-file>

<!-- Cooee SDK use this permission to run Location based engagements -->
<config-file target="AndroidManifest.xml" parent="/manifest">
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
</config-file>


iOS (Required)

Apple requires a user-friendly description of such permissions as defined here. Add below code in your config.xml under <platforms name="ios">.

XML
|
<edit-config file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription">
    <string>App uses location to search retailer location</string>
</edit-config>
<edit-config file="*-Info.plist" mode="merge" target="NSBluetoothAlwaysUsageDescription">
    <string>App uses Bluetooth to find out nearby devices</string>
</edit-config>
<edit-config file="*-Info.plist" mode="merge" target="NSCameraUsageDescription">
    <string>Need to access your camera for a better AR experience</string>
</edit-config>


Android Configuration

The minimum supported android version for Cooee is API 21. Cooee SDK also supports Augmented Reality(AR). This requires a small configuration mentioned below in your config.xml under <platforms name="android">

XML
|
<!-- Add xmlns:android & xmlns:tools to widget tag-->
<widget
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">
    ...
    <platform name="android">
        ...
        <!-- Sets minimum Android SDK to 21 -->
        <preference name="android-minSdkVersion" value="21"/>

        <!-- Enable google play service for Android -->
        <preference name="GradlePluginGoogleServicesEnabled" value="true" />

        <!-- Sets configuration for com.google.ar.core -->
        <config-file target="AndroidManifest.xml" parent="/manifest/application">
            <meta-data android:name="com.google.ar.core" android:value="optional" />
        </config-file>

        <!-- Adds xmlns:tools in AndroidManifest.xml's manifest tag -->
        <edit-config file="app/src/main/AndroidManifest.xml" target="/manifest" mode="merge">
            <manifest xmlns:tools="http://schemas.android.com/tools"/>
        </edit-config>

        <!-- Adds android:name in AndroidManifest.xml's application tag -->
        <edit-config file="app/src/main/AndroidManifest.xml" target="/manifest/application" mode="merge">
            <application android:name="com.letscooee.cordova.CooeePluginController" tools:replace="android:name"/>
        </edit-config>
    </platform>
<widget/>




Updated 03 Mar 2023
Did this page help you?
Yes
No
PREVIOUS
Cordova
NEXT
Tracking Events
Docs powered by archbee 
TABLE OF CONTENTS
Add Plugin
Notification Service Configuration (Only for iOS)
Permission Usage
Android (Optional)
iOS (Required)
Android Configuration