Others
Get FCM/APNS Token
This function provides FCM subscription token (in case of Android)and APNS token (in case of IOS)
 NotifyVisitors.getRegistrationToken().then((value: any) => {
      console.log(value); // Success!
 });
Subscribe Push Category 
In case you want to create a different category for sending push notifications or you want to unsubscribe users for all categories.
 const finalData = {
   categoryArray: ['g1', 'g2'],
   unsubscribeSignal: false,
 };
 NotifyVisitors.subscribePushCategory(finalData);
Example :
 const finalData = {
   categoryArray: ['g1', 'g2'],
   unsubscribeSignal: false,
 };
 NotifyVisitors.subscribePushCategory(finalData);
NotifyVisitors UID
NV UID stands for NotifyVisitors Unique Identifier. We create this ID at our backend side & allot one unique id to every user whether it’s known or anonymous. This ID can be seen in the NV dashboard >> Mobile Push >> Subscribers section.

If any user wants this UID in their app for any use according to their use-case then they can implement this function & it will provide you the UID as String.
Notifyvisitors.getNvUID(callback);
Example :
 NotifyVisitors.getNvUID().then((value: any) => {
      console.log(value); // Success!
 });
Get Landing Page Data
If you want to get some data in your application on the clicks of the push notification,
in-app banner and surveys (for page redirection and others purpose).
Call below function on your page which is loaded first when app is open.
addNotificationReceivedListener();
Example :
 async addNotificationReceivedListener() {
    await NotifyVisitors.addListener('notificationReceived', (event: any) => {
      console.log('notificationReceived', event);
    });
  }
Updated about 2 years ago
