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

Returns the list of currently active live activities. Returns empty list on API < 36.

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 getLiveActivitySubscriberId(liveNotificationId: String): String

Returns the persisted LA subscriber id for a live notification, or empty string if this device is not subscribed to it.

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 handleLiveActivityClick(intent: Intent?, openDeepLink: Boolean = true): String?

Handles a Live Activity notification click from the background.

Link copied to clipboard

Checks whether Live Activities are supported on this device. Requires API 36+ (Android 16) for ProgressStyle notifications.

Link copied to clipboard

Checks whether a specific live activity is currently active. Returns false on API < 36.

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

Simulates a Live Activity push for testing purposes. No-op on API < 36.

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

Subscribes this device to a backend live notification (Live Activity) so it starts receiving its push updates.

Link copied to clipboard

function to unregister subscriber

fun unregisterSubscriber(projectId: String, projectToken: String, subscriberId: String): ListenableFuture<Unit>
Link copied to clipboard
fun unsubscribeFromLiveActivity(liveNotificationId: String): ListenableFuture<Unit>

Unsubscribes this device from a backend live notification it previously subscribed to via subscribeToLiveActivity. No-op if the device is not subscribed to it.