A quick lookup of the SDK's public methods, grouped by area. For step-by-step setup, see Getting Started; for push & in-app messaging, see the Notification Integration guide.
Event, identity, and feature-flag methods are on the com.paylisher.Paylisher facade. Initialization is on PaylisherAndroid, and notification helpers are on FcmMessagingService.
Setup & lifecycle
| Method | What it does |
|---|
PaylisherAndroid.setup(context, config) | Initializes the SDK with your configuration. Call once in Application.onCreate(). |
Paylisher.debug(enable: Boolean) | Toggles verbose SDK logging at runtime. |
Paylisher.flush() | Sends all queued events immediately instead of waiting for the next batch. |
Paylisher.reset() | Clears the current user's identity and local state (distinct ID, super properties, feature flags, session). Call on logout. |
Paylisher.optIn() | Resumes data capture for the user. |
Paylisher.optOut() | Stops all data capture for the user. |
Paylisher.isOptOut(): Boolean | Returns whether the user is currently opted out. |
Paylisher.close() | Shuts the SDK down and releases its resources. |
Sessions
| Method | What it does |
|---|
Paylisher.getSessionId(): UUID? | Returns the current session ID, or null if no session is active. |
Paylisher.isSessionActive(): Boolean | Returns whether a session is currently active. |
Paylisher.startSession() | Manually starts a new session. |
Paylisher.endSession() | Manually ends the current session. |
Event tracking
| Method | What it does |
|---|
Paylisher.capture(event, properties?, userProperties?, userPropertiesSetOnce?, groups?) | Sends a custom event. Only event is required; all other parameters are optional. |
Paylisher.screen(screenTitle, properties?) | Sends a $screen (screen-view) event. |
Paylisher.register(key, value) | Sets a super property — included with every subsequent event; persisted across sessions. |
Paylisher.unregister(key) | Removes a previously registered super property. |
User identity
| Method | What it does |
|---|
Paylisher.identify(distinctId, userProperties?, userPropertiesSetOnce?) | Associates events with a specific user and sets person properties. See Identify User. |
Paylisher.alias(alias) | Adds another distinct ID for the same user. |
Paylisher.distinctId(): String | Returns the current distinct ID (the one passed to identify, or the auto-generated anonymous ID). |
Paylisher.group(type, key, groupProperties?) | Associates the session's events with a group (e.g. company/organization). |
Feature flags
| Method | What it does |
|---|
Paylisher.reloadFeatureFlags() | Re-fetches feature flags from the server. |
Paylisher.getFeatureFlag(key) | Returns a flag's value — Boolean for boolean flags, the variant String for multivariate flags. |
Paylisher.isFeatureEnabled(key): Boolean | Returns whether a flag is enabled. |
Paylisher.getFeatureFlagPayload(key) | Returns a flag's JSON payload, if any. |
Notifications
These notification helpers live on com.paylisher.android.notification.FcmMessagingService. See the Notification Integration guide for usage.
| Method | What it does |
|---|
FcmMessagingService.setNotificationIntentClass(activityClass: Class<*>) | Sets the Activity that opens when the user taps a Paylisher notification. Call in Application.onCreate(). |
FcmMessagingService.setMainActivity(activity: Activity) | Tells the SDK which Activity to render in-app overlays on. Call from each Activity's onResume(). |
FcmMessagingService.handleRemoteMessage(context, remoteMessage) | Forwards a Paylisher FCM message to the SDK from your own FirebaseMessagingService (static forward pattern). |
FcmMessagingService.handleNewToken(token) | Forwards a refreshed FCM token to Paylisher from your own service's onNewToken. |