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 

CTA Callback

3min

CTA Configuration

Flutter Plugin supports callback on the action of in-app notification buttons by returning a map of key-value pairs. Check for more Call to Action according to your industry.

To make use of this first set the InAppNotificationClickListener to your activity code:

Dart
|
CooeePlugin sdk = new CooeePlugin();
sdk.setCooeeInAppNotificationAction(inAppTriggered);


Make sure you have a function created in your code :

Dart
|
void inAppTriggered(Map<String, dynamic> map) {
    this.setState(() {
        if (map.actionType == "PLAY_COURSE") {
          // Product id will be available via "map.courseID"
        } else if (map.actionType == "APPLY_COUPON") {
          // Your code to apply a given coupon.
          // Coupon code can be accessed via "map.couponCode"
        } else if (map.actionType == "GO_TO_SCREEN") {
          // Your code to take user to a particular screen
          // Screen name can be accessed via "map.screenName"
        }
     });
}


Important Note

Please remove the android:name from application tag present the android/app/src/main/AndroidManifest.xml.



Updated 03 Mar 2023
Did this page help you?
Yes
No
PREVIOUS
Tracking Screens
NEXT
Push Notification
Docs powered by archbee 
TABLE OF CONTENTS
CTA Configuration
Important Note