Configure Notification Center

Notification Center

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.
*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);

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.
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); 
 });

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); 
 });

Stop Notification

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

NotifyVisitors.stopNotification();