PushPushGo

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Settings used for migration to support switch user before start first time app after upgrade/switch defaultIsSubscribed default is false

Functions

Link copied to clipboard
Link copied to clipboard

function to construct and send beacon

Link copied to clipboard
fun createSubscriber(): ListenableFuture<String>

function to register subscriber and returns future with subscriber id

Link copied to clipboard

function to read Your API Key from an PushPushGo library instance

Link copied to clipboard

function returns custom flags from shared contexts for click intent

Link copied to clipboard
fun getNotificationDetails(notificationIntent: Intent?): PPGoNotification?

function to retrieve PPGo notification details

Link copied to clipboard

function to read Your API Key from an PushPushGo library instance

Link copied to clipboard
fun getPushToken(): ListenableFuture<String>

function to retrieve last push token used to subscribe that

Link copied to clipboard

function to read Your subscriber id from an PushPushGo library instance

Link copied to clipboard
fun handleBackgroundNotificationClick(intent: Intent?, overrideFlags: Int = Intent.FLAG_ACTIVITY_NEW_TASK)

helper function to handle click on notification from background

Link copied to clipboard
fun isPPGoPush(notificationIntent: Intent?): Boolean
fun isPPGoPush(notificationData: Map<String, String>): Boolean

function to check whether the given notification data belongs to the PPGo sender

Link copied to clipboard

function to check if user subscribed to notifications

Link copied to clipboard
fun migrateToNewProject(newProjectId: String, newProjectToken: String): ListenableFuture<PushPushGo>

function to re-subscribe to different project (previously unsubscribe from current project) WARNING: after resubscribe use object returned by this function instead of previous one

Link copied to clipboard

function to register subscriber

Link copied to clipboard

function set custom intent flags to shared preferences when push receives then check for this flags and add them in PendingIntent launcherActivity as flags

Link copied to clipboard

function to unregister subscriber

fun unregisterSubscriber(projectId: String, projectToken: String, subscriberId: String): ListenableFuture<Unit>