class Teak.LiveActivity
Teak Live Activity functionality.
Static Methods
StartedLiveActivity
Report a Live Activity push-to-update token to Teak.
IEnumerator Teak.LiveActivity.StartedLiveActivity(string activityId,
byte[] pushToken,
string systemActivityId,
System.Action<Reply> callback);
Call this when a live activity starts and receives its push-to-update token, and again whenever the token rotates during the activity’s lifetime.
Parameters
| Name | Description |
|---|---|
|
A stable, game-chosen string naming the kind of live activity (e.g. "chest_timer"). |
|
The push-to-update token bytes from ActivityKit’s |
|
The OS-level per-instance activity identifier, from |
|
A callback invoked with the result of the call. |
StartedLiveActivity
Report a Live Activity push-to-update token to Teak, using a hex-encoded token string.
IEnumerator Teak.LiveActivity.StartedLiveActivity(string activityId,
string pushTokenHex,
string systemActivityId,
System.Action<Reply> callback);
Convenience overload for callers who already hold the token as a hex string (for example, persisted via PlayerPrefs). Decodes to bytes and delegates to StartedLiveActivity(string, byte[], string, System.Action<Reply>).
ScheduleLiveActivityUpdate
Schedule a single update to be delivered to a live activity at a future time.
IEnumerator Teak.LiveActivity.ScheduleLiveActivityUpdate(string activityId,
long offset,
Dictionary<string, object> customData,
Dictionary<string, object> systemData,
System.Action<Reply> callback);
Call between StartedLiveActivity(string, byte[], string, System.Action<Reply>) and the activity ending. customData is delivered as APNs content-state; systemData carries Apple system fields (event, stale-date, dismissal-date).
Parameters
| Name | Description |
|---|---|
|
A stable, game-chosen string naming the kind of live activity. |
|
Delay from server-now, in seconds, at which the update should be delivered. |
|
Game-defined content-state payload. Must contain only JSON-serializable values. Required. |
|
Optional Apple system fields. May be null. |
|
A callback invoked with the result of the call. |
CancelLiveActivityUpdates
Cancel all pending scheduled updates for a live activity.
IEnumerator Teak.LiveActivity.CancelLiveActivityUpdates(string activityId,
System.Action<Reply> callback);
Scopes to the current user’s updates for activityId ; updates scheduled for other users or other activity kinds are unaffected.The reply’s Reply.CanceledCount carries the number of updates canceled by the server on success.