Live Activities#
flet_onesignal.live_activities.OneSignalLiveActivities
#
OneSignal Live Activities namespace (iOS only).
Provides methods for managing Live Activities, which display real-time information on the iOS Lock Screen and Dynamic Island.
Functions#
enter
async
#
Enter a Live Activity.
Call this when the user starts a Live Activity that should receive push updates from OneSignal.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
activity_id
|
str
|
A unique identifier for the Live Activity. |
required |
token
|
str
|
The push token for the Live Activity. |
required |
exit
async
#
Exit a Live Activity.
Call this when the Live Activity ends or the user dismisses it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
activity_id
|
str
|
The identifier of the Live Activity to exit. |
required |
remove_push_to_start_token
async
#
Remove the push-to-start token for a Live Activity type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
activity_type
|
str
|
The type identifier of the Live Activity. |
required |
set_push_to_start_token
async
#
Set the push-to-start token for a Live Activity type.
This allows OneSignal to start a Live Activity via push notification.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
activity_type
|
str
|
The type identifier of the Live Activity. |
required |
token
|
str
|
The push-to-start token. |
required |
setup_default
async
#
Setup default Live Activity options.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
options
|
Optional[dict]
|
Optional configuration options for Live Activities. |
None
|