react-native-push-notification
version 3.2.1. If you are handling the display of the notifications, newer versions may work.<project>/android/app/src/main/AndroidManifest.xml
, integrate the following XML to allow proper permissions to allow the app to manage Push Notifications.google-services.json
according to Google's instructions. From the google-services.json
file, you will need the project_number
field, which you will use as the "Sender ID".Zaius.configure()
configure
are as follows:appId
: [Required] The App ID as mentioned above, the Shortened Name of your project.apiKey
: [Required] The API Key from the Public tab in the APIs section of the Zaius app.appVersion
: The version of your app, sent with each request to help you keep track of which customers are using which version.baseUrl
: Where the Zaius API is located. This should not normally by changed.onNotification
: A callback function that is called when a Push Notification is recieved by the app (Android) or tapped by the user (both Android and iOS). See Push Notifications for more information.onRegister
: A callback function that is called when permission for Push Notifications has been granted. Once this callback is called, everything is set up on the phone side for Pushes to work.platform
: Which platform the app is running on. Will be detected if it's not supplied.requestPermissions
: Should be false for modern android OS versions. For iOS, if this is false
, then it is up to the app author to callZaius.requestPermission()
in order for Push Notifications to be initialized on iOS. See Push Notifications for more.senderID
: [Required for Android] Required for Push Notifications on Android. The Sender ID is found in the google-services.json
file you can obtain this file from Firebase by following Google directions. The Sender ID
is the value found at project_info
-> project_number
.startQueue
: When set to true, the SDK will start processing the Event queue as soon as it can. See Events for more information about the Event queue. Zaius.configure
is a Promise
and so it must be handled as a Promise
or called from an async
function.Zaius
object from configure()
the following functions are available on both the object returned from Zaius.configure()
and as functions directly on the global Zaius
object (e.g. Zaius.customer()
).Zaius.getConfig()
: Returns the configuration that the Zaius
object is using.Zaius.anonymize()
: Generates a new VUID, effectively anonymizing the user.