Const
Clear the app badge on iOS. No effect on Android.
Dismiss the app's shown notifications on iOS. Should be called on startup.
No effect on Android.
Gets the app's initial URL.
On iOS, make sure to call this only once (only the first call will return something, if Linking.getInitialURL doesn't return anything)
Gets the last known push token. Batch MUST be started in order to use this method.
The returned token might be outdated and invalid if this method is called too early in your application lifecycle.
On iOS, your application should still register for remote notifications once per launch, in order to keep this value valid.
Synchronizes the user's iOS token with Batch. Should be called at each app launch.
No effect on Android.
Ask iOS users if they want to accept push notifications. Required to be able to push users.
No effect on Android.
Please use requestNotificationAuthorization to request permission when needed, and requestToken at each app launch
Ask users if they want to accept push notifications. Required to be able to push users (or use requestProvisionalNotificationAuthorization - ios only).
Ask iOS for provisional notifications (no alert to users). Required to be able to push users (or use requestNotificationAuthorization).
No effect on Android.
Change the used remote notification types on Android. (Ex: sound, vibrate, alert)
Does not work with iOS
Example : setAndroidNotificationTypes(batch.push.AndroidNotificationTypes.ALERT | batch.push.AndroidNotificationTypes.SOUND)
Listen for push events
dismiss and display are only supported on Android (you can still call addListener on those but it's a no-op).
Push payload will vary depending on the platform.
Batch's push module