Adds a new subscription for an external Braze SDK event. Note that this subscriber will be called synchronously from the running thread of the Braze SDK and may not be on the same thread as the caller of this method.
When you first start using Braze on a device, the user is considered "anonymous". You can use this method to optionally identify a user with a unique ID. These User IDs should be private and not easily obtained (e.g. not a plain email address or username). This enables the following:
Identical to .changeUser but provides an sdk auth signature for the user before any networking begins, even if the existing external id is used.
Helper method for IBraze.deserializeContentCard.
Constructs a Content Card from its Card.forJsonPut output. Useful for caching Content Card data and recreating them for your own purposes.
Returns the user currently being tracked by Braze. Note that modifying values on instances of BrazeUser for a previous user will result in those values being stored locally, but they will not be synced with the Braze server until that user becomes active again.
Get the device ID - a randomly generated, app specific ID that is stored on the device. A new ID will be generated if the user clears the data for the app or removes/re-installs the app. The ID will persist across Braze.changeUser calls.
In order to log a purchase, switch to logPurchase. Using this method will by default log a purchase with a quantity of one.
In order to log a purchase, switch to logPurchase.
Reports that the current user made an in app purchase. Useful for tracking and segmenting users more likely to make purchases.
Reports that the user clicked on the push notification. Note that integrations shouldn't be calling this method directly.
When possible, .logPushNotificationOpened should be used instead. Note that integrations shouldn't be calling this method directly.
Removes a single subscription associated with the given activity and event class. This should be called if you want to selectively unsubscribe from an event, but do not want to remove every subscription for the activity.
Requests an immediate refresh of Content Cards from the Braze server.
Clients apps may call this method when location permissions are granted to request immediate initialization of geofences as appropriate. This will also request a single location update since location permissions were likely not present at the start of the user's session.
Subscribes to "no matching trigger" events. The subscriber callback will be called when a open, custom event, or purchase event is sent, but there's not a corresponding in-app message that was triggered by it. The subscriber will be called with a NoMatchingTriggerEvent.