/**
 In-App
 Notifications  */

Go back to React Native Getting Started Guide

In-App Notifications

Enable In-app Notifications in your App

In-app notifications allow app publishers to reach out to app users when they use your app. In-App Notifications are deeply integrated in Pyze Growth Intelligence and allow app publishers to reach out to users from manually from Dynamic Funnels and Intelligence Explorer, and automatically based on workflows and campaigns from Growth Automation.

App publishers have full control over when to display the in-app messages and have two options: use the user interface provided by Pyze or develop their own.

Option 1. Use Pyze provided user interface

Invoke built-in User Interface from your app

You can look for In-App messages and invoke the built-in UI anywhere in your app. For example, on a button click or in your Start method or when new scene is loaded/unloaded.
Invoke UI from your app

  • Call the following method, whenever you want to show notification with default pyze UI. Method accepts a callback handler method which will be invoked whenever any of the call to action button on the UI is pressed.

    showInAppNotification(callback);

    Usage

    Pyze.showInAppNotification(function(messageDetails){
          console.log(JSON.stringify(messageDetails));
        });

    Or call the following method to customize the look and feel of the In-App Message Navigation Bar buttons, and show Read, Unread or Both messages. Upto twenty previously read messages are cached, so your users can view them using the PyzeInAppMessageType enumerations like PyzeInAppTypeUnread, PyzeInAppTypeRead or PyzeInAppTypeAll .

    void showInAppNotificatonWithCustomAttributes(messageType, colour, callback);

    Usage

    Pyze.showInAppNotificatonWithCustomAttributes(messageType, colour, function(messageDetails){
          console.log(JSON.stringify(messageDetails));
        });
  • Call the following method, whenever you want to get the unread message count from server.

    countNewUnFetchedMessages(callback);

    Usage

    Pyze.countNewUnFetchedMessages(function(messageCount){
          console.log(messageCount);
        });
  • To get notified which button the app user clicked on along with the deep link status, implement a handler for the call-to-action buttons.

    Usage

    Pyze.countNewUnFetchedMessages(function(message){
          if(message.Value > 0){
            Pyze.showInAppNotification(function(messageDetails){
                console.log("Button Clicked: " + messageDetails.ButtonId 
                        + " Title: " + messageDetails.Title 
                        + " Status: " + messageDetails.Status 
                        + " Url: " + messageDetails.UrlInfo
                        + " Message Id: " + messageDetails.mId
                        + " Campaign Id: " + messageDetails.cId
                        );
            });
          }
        });

Option 2. Build your own user interface

You can provide your own user interface for in-app messages using the base level APIs



Sending In-App notifications from growth.pyze.com

In-app notifications allow app publishers to reach out to app users when they use your app. In-App Notifications are deeply integrated in growth.pyze.com and allow app publishers to reach out to users from manually from Dynamic Funnels and Intelligence Explorer, and automatically based on workflows and campaigns from Growth Automation. For illustration purposes, we will send In-App Notifications from Dynamic Funnels.






About Pyze

Pyze Growth Intelligence® is a transformative SaaS platform that enables mobile and web app businesses to automate engagement, retention and growth of their users. Signup at Pyze, install and initialize the Pyze SDK and watch your app grow.