Get Started
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:
Replace x.y.z with the latest release of the SDK
Or Run command
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.
iOS setup
Add the following snippet in the app's Info.plist present at ios/Runner/ folder.
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
- 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
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.
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.
Import it
Now in your Dart code, import the package and start using it:
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.