Live Activity ID in UserDefaults not the same as in Flutter
m-schmale opened this issue ยท 1 comments
Hi ๐
Not sure if this is a misunderstanding on my side or a bug. I compared the Live Activity IDs I get when I create a Live Activity with the ID that is written in the UserDefaults and they don't match.
How I get the Live Activity ID in Flutter: final String? activityId = await _liveActivitiesPlugin?.createActivity(data);
- First app start
- New activity is created with ID: 6D135D3F-C206-44F9-A98E-7C572A962509
- Second app start
- New activity is created with ID: B8A4C9A9-A430-40CE-AFE2-63B070A6C40A
- Current behavior: The ID used as a prefix in UserDefaults is 94B54E24-C3E5-479B-BF2B-F1728C9F4748
- What I expect: The ID used as a prefix in UserDefaults should be 6D135D3F-C206-44F9-A98E-7C572A962509
- Third app start
- New activity is created with ID: DC95BAAB-7E6D-4CEA-B49E-B307AF9EA433
- Current behavior: The ID used as a prefix in UserDefaults is 992D58AA-B824-40A7-AF3C-9CB04DEA1E70
- What I expect: The ID used as a prefix in UserDefaults should be B8A4C9A9-A430-40CE-AFE2-63B070A6C40A
Could you please explain this?
Thanks ๐
I have noticed that in createActivity() the UUID of LiveActivitiesAppAttributes is used as prefix:
But the activity identifier of the created iOS live activity is returned:
Tomorrow, I will try to update a specific live activity by push notification. Unfortunately it doesn't work for me as described in the documentation:
To set matchName for a specific notification, you just need to grab the notification id you want (ex. 35253464632) and concatenate with your key by adding a _, example: 35253464632_matchName.