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

17min

Our Flutter plugin wrapper makes it easier for you to install the SDK directly on your Flutter app. Follow these simple steps

Add Dependencies

To add the Cooee Flutter plugin to your project, edit your project's pubspec.yaml file:

YAML
|
dependencies:
    cooee_plugin: x.y.z


Replace x.y.z with the latest release of the SDK

Document image


Or Run command

Shell
|
$ flutter pub add cooee_plugin


This command will add the latest version of cooee_plugin

Configure Credentials

Android setup

Add the following inside the application tag in AndroidManifest.xml present in android/app/src/main/ folder.

XML
|
<meta-data
    android:name="COOEE_APP_ID"
    android:value="MY_COOEE_APP_ID"/>

<!-- Sets configuration for com.google.ar.core -->
<meta-data android:name="com.google.ar.core" android:value="optional" />


iOS setup

Add the following snippet in the app's Info.plist present at ios/Runner/ folder.

plist
|
<key>COOEE_APP_ID</key>
<string>MY_COOEE_APP_ID</string>


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

Configure Firebase (Android only)

For Android, Cooee uses Firebase Messaging Service to send push notifications. To enable this feature, follow the steps below:

Register your app with Firebase

  1. To connect your app to firebase, follow Step 2 provided in the firebase documentation.
  2. Once the app is connected to your firebase project, add the google-service.json file in the android/app folder of your project.

Add Firebase messaging service

Note:

This step is required for cooee_plugin: ^1.3.7 and below versions.

Once you registered your app with firebase, add the following inside the application tag in AndroidManifest.xml present at android/app/src/main/ folder

XML
|
<service android:name="com.letscooee.flutter.FlutterCooeeFirebaseMessagingService"
    android:exported="false">
    <intent-filter>
        <action android:name="com.google.firebase.MESSAGING_EVENT" />
    </intent-filter>
</service>


Permission Usage

Android (Optional)

Cooee SDK supports prompting the following permissions via engagement. To make it work, you need to add the following to the app's AndroidManifest.xml file present in android/app/src/main/ folder.

XML
|
<!-- Cooee SDK use this permission to run Augmented Reality engagements -->
<uses-permission android:name="android.permission.CAMERA" />

<!-- Cooee SDK use this permission to run Location based engagements -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<!-- Cooee SDK use this permission to post an notification(required only on Android 13 and above) -->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />


iOS

Cooee SDK uses a few permission if granted (we do not ask explicitly) for analysing the user. This helps us to create and deliver better notifications and in-apps. Apple requires a user-friendly description of such permissions as defined here.

Add the following permission description to App's Info.plist file present at ios/Runner/ folder.

Plist
|
<key>NSLocationWhenInUseUsageDescription</key>
<string>App uses location to search retailer location</string>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>App uses Bluetooth to find out nearby devices</string>
<key>NSCameraUsageDescription</key>
<string>Need to access your camera for a better AR experience.</string>


Import it

Now in your Dart code, import the package and start using it:

Dart
|
import 'package:cooee_plugin/cooee_plugin.dart';


Android 13 and above needs permission to be granted to Post a Notification. You will need to add the below code once the flutter view initializes.

Dart
|
void requestNotificationPermission() {
    CooeePlugin.requestNotificationPermission();
}




Updated 03 Mar 2023
Did this page help you?
Yes
No
PREVIOUS
Flutter
NEXT
Tracking Events
Docs powered by archbee 
TABLE OF CONTENTS
Add Dependencies
Configure Credentials
Android setup
iOS setup
Configure Firebase (Android only)
Register your app with Firebase
Add Firebase messaging service
Permission Usage
Android (Optional)
iOS
Import it