Notification Center (App-Inbox)

Open App Inbox

You can show a list of push notifications received in an In-app Notification Center. Expiry of the notifications can be set from the panel.

NotifyVisitors.showNotifications((JSON Object)appInboxInfo,  (int)dismiss);

*If you want to use a customized notification center. Pass a json   object appInboxInfo as the first parameter. Otherwise pass null for standard notification center.
*The Key’s value should be static and values will be dynamic.
*You can create upto three labels. Label names exactly same as you passed in notifyvisitors panel. 

var appInboxInfo = {
      "label_one" : "tab1Label",
      "name_one" : "name_a" ,
      "label_two" : "tab2Label" ,
      "name_two" : "name_b",
      "label_three" : "tab3Label",
      "name_three" : "name_c",
      "selectedTabTextColor" : "#FF3D00",
      "unselectedTabTextColor" : "#FF6D00",
      "selectedTabBgColor":"#E1BEE7",
      "unselectedTabBgColor_ios" : "#00796B",
      "selectedTabIndex_ios" : "0",
      "tabTextFontName_ios" : "xxx",
      "tabTextFontSize_ios" : "13"
  };

dismiss:-  You can dismiss the notification-center page after clicking the notification.
pass 0 :- notification-center page will not be destroyed from memory.
pass 1 :- notification-center page destroyed  from memory.

//Example:
Notifyvisitors.showNotifications(appInboxInfo, 0);
NotifyVisitors.shared.showNotifications((JSON Object)appInboxInfo,  (int)dismiss);

*If you want to use a customized notification center. Pass a json object appInboxInfo as the first parameter. Otherwise pass null for standard notification center.
*The Key’s value should be static and values will be dynamic.
*You can create upto three labels. Label names exactly same as you passed in notifyvisitors panel. 

var appInboxInfo = {
      "label_one" : "tab1Label",
      "name_one" : "name_a" ,
      "label_two" : "tab2Label" ,
      "name_two" : "name_b",
      "label_three" : "tab3Label",
      "name_three" : "name_c",
      "selectedTabTextColor" : "#FF3D00",
      "unselectedTabTextColor" : "#FF6D00",
      "selectedTabBgColor":"#E1BEE7",
      "unselectedTabBgColor_ios" : "#00796B",
      "selectedTabIndex_ios" : "0",
      "tabTextFontName_ios" : "xxx",
      "tabTextFontSize_ios" : "13"
  };

dismiss:-  You can dismiss the notification-center page after clicking the notification.
pass 0 :- notification-center page will not be destroyed from memory.
pass 1 :- notification-center page destroyed  from memory.

//Example:
Notifyvisitors.shared.showNotifications(appInboxInfo, 0);  
  
NotifyVisitors.showNotifications((JSON Object)appInboxInfo,  (int)dismiss);

*If you want to use a customized notification center. Pass a json   object appInboxInfo as the first parameter. Otherwise pass null for standard notification center.
*Name of the Json Object should be appInboxInfo. The Key’s value should be static and values will be dynamic.
*You can create upto three labels. Label names exactly same as you passed in notifyvisitors panel. 

var appInboxInfo = {
      "label_one" : "tab1Label",
      "name_one" : "name_a" ,
      "label_two" : "tab2Label" ,
      "name_two" : "name_b",
      "label_three" : "tab3Label",
      "name_three" : "name_c",
      "selectedTabTextColor" : "#FF3D00",
      "unselectedTabTextColor" : "#FF6D00",
      "selectedTabBgColor":"#E1BEE7",
      "unselectedTabBgColor_ios" : "#00796B",
      "selectedTabIndex_ios" : "0",
      "tabTextFontName_ios" : "xxx",
      "tabTextFontSize_ios" : "13"
  };

dismiss:-  You can dismiss the notification-center page after clicking the notification.
pass 0 :- notification-center page will not be destroyed from memory.
pass 1 :- notification-center page destroyed  from memory.

Example:- NotifyVisitors.showNotifications(appInboxInfo, 0);
NotifyVisitors.showNotifications((JSON Object)appInboxInfo,  (int)dismiss);

*If you want to use a customized notification center. Pass a json   object appInboxInfo as the first parameter. Otherwise pass null for standard notification center.
*The Key’s value should be static and values will be dynamic.
*You can create upto three labels. Label names exactly same as you passed in notifyvisitors panel. 

 var appInboxInfo = {
      label_one: 'tab1Label',
      name_one: 'name_a',

      label_two: 'tab2Label',
      name_two: 'name_b',

      label_three: 'tab3Label',
      name_three: 'name_c',

      selectedTabTextColor: '#FF3D00',
      unselectedTabTextColor: '#FF6D00',

      selectedTabBgColor: '#E1BEE7',
      unselectedTabBgColor_ios: '#00796B',
      selectedTabIndex_ios: '0',
      tabTextFontName_ios: 'xxx',
      tabTextFontSize_ios: '13',
    };

const dismissValue = '0';
const finalData = { appInboxInfo, dismissValue };

NotifyVisitors.showNotifications(finalData);

dismiss:-  You can dismiss the notification-center page after clicking the notification.
pass 0 :- notification-center page will not be destroyed from memory.
pass 1 :- notification-center page destroyed  from memory.

Notification Count

This function provides the unread count(s) of push notifications. This functionality can be used to show the user number of unread push notification count on the bell icon.

Pass a json object tabCountInfo as the first parameter. Otherwise pass null for standard notification center.
The Key’s value should be static and values will be dynamic

var tabCountInfo = {
      "label_one" : "tab1Label",
      "name_one" : "name_a" ,
      "label_two" : "tab2Label" ,
      "name_two" : "name_b",
      "label_three" : "tab3Label",
      "name_three" : "name_c"
  };

Notifyvisitors.getNotificationCenterCount(tabCountInfo, callback);

//Example
Notifyvisitors.getNotificationCenterCount(tabCountInfo, function(count){
     alert("response : " + count); 
 });
Pass a json object tabCountInfo as the first parameter. Otherwise pass null for standard notification center.
The Key’s value should be static and values will be dynamic

var tabCountInfo = {
      "label_one" : "tab1Label",
      "name_one" : "name_a" ,
      "label_two" : "tab2Label" ,
      "name_two" : "name_b",
      "label_three" : "tab3Label",
      "name_three" : "name_c"
  };

Notifyvisitors.shared.getNotificationCenterCount(tabCountInfo, callback);

//Example
Notifyvisitors.shared.getNotificationCenterCount(info).then((response){
   // do your task
});
Pass a json object tabCountInfo as the first parameter. Otherwise pass null for standard notification center.
Name of the Json Object should be tabCountInfo. The Key’s value should be static and values will be dynamic

var tabCountInfo = {
      "label_one" : "tab1Label",
      "name_one" : "name_a" ,
      "label_two" : "tab2Label" ,
      "name_two" : "name_b",
      "label_three" : "tab3Label",
      "name_three" : "name_c"
  };

NotifyVisitors.getNotificationCenterCount(tabCountInfo, callback);

//Example
NotifyVisitors.getNotificationCenterCount(tabCountInfo, function(count){
     alert("response : " + count); 
 });
Pass a json object tabCountInfo as the first parameter. Otherwise pass null for standard notification center.
The Key’s value should be static and values will be dynamic

 var appInboxInfo = {
      label_one: 'tab1Label',
      name_one: 'name_a',

      label_two: 'tab2Label',
      name_two: 'name_b',

      label_three: 'tab3Label',
      name_three: 'name_c',
    };

const countData = { appInboxInfo };
NotifyVisitors.getNotificationCenterCount(countData).then((value: any) => {
  // do your stuff
});

Notification Center Data

This function provides notification center data as JSON in callback. This functionality can be used if a client wants to create their own custom notification center ui.

Notifyvisitors.getNotificationDataListener(callback);

//Example
Notifyvisitors.getNotificationDataListener(function(callback){
  alert("response : " + callback); 
 });
Notifyvisitors.shared.getNotificationCenterData(callback);

//Example
Notifyvisitors.shared.getNotificationData()
  .then((value) {
       // do your task
  });
NotifyVisitors.getNotificationDataListener(callback);

//Example
NotifyVisitors.getNotificationDataListener(function(callback){
  //alert("response : " + callback); 
});
NotifyVisitors.getNotificationDataListener(callback); 

//Example
NotifyVisitors.getNotificationData().then((value: any) => {
      console.log(value); // Success!
});

Stop Notification

If a client wants to stop displaying inapp notifications (banners & surveys) then they can call this function in their app.

Notifyvisitors.shared.stopNotification();
Notifyvisitors.stopNotification();
Notifyvisitors.stopNotification();
Notifyvisitors.stopNotification();