You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I understand the code correctly @istornz added a section to monitor that token but its never transported to flutter.
The content state reflects the mutable state of the activity.
If we are talking bout updating a LA:
The live_activity_token is the token you received from the activityUpdateStream which provides the token after you called createActivity.
The content state is still the mutable content of your activity. In my case:
structLiveActivitiesAppAttributes:ActivityAttributes,Identifiable{publictypealiasLiveDeliveryData=ContentState // don't forget to add this line, otherwise, live activity will not display it.
publicstructContentState:Codable,Hashable{
// make everything nullable to be able to retrieve initial
// values before notification is sent to update
letprogress:Double?leteta:Int?letprintState:String?letfile:String?}varid=UUID()}
This will be the progress, eta, printState and file properties.
I am using APNs directly, as FCM did not support LA while I developed my solution, I send a Map<String, String> with the field -> newValue (e.g. progress : "1") mappings to the APNs
The new FCM feature with live activity.
After setting the activityToken to the live_activity_token as present in the picture
The live activity didn't updated.
Note : the content-state contain keys that present in the use defaults
What should be included in the content-state & live_activity_token to make it work instead?
The text was updated successfully, but these errors were encountered: