Message to end Live Activity does not close it on the device.
@chong-shao đang làm issue này rồi.
Từ ngày 2/9/2025.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Environment
- Operating System version: python:3.12.10-slim Docker image running on MacOS
- Firebase SDK version: 6.9.0
- Firebase Product: cloud messaging
- Python version: 3.12.10
- Pip version: 25.0.1
The problem
Management of iOS live activities.
Currently I can successfully start a live activity using the sdk with the following message:
message = messaging.Message(
apns=messaging.APNSConfig(
live_activity_token=live_activity_token,
payload=messaging.APNSPayload(
aps=messaging.Aps(
alert=messaging.ApsAlert(
title="Live Activity Started",
body="Your live activity has been started",
),
custom_data = {
"input-push-token": 1,
"event": "start",
"timestamp": int(time.time()),
"content-state": {
"myAttribute": False,
},
"attributes-type": "MyObjectAttributes",
"attributes": {
"name": "name",
},
},
),
headers={
"apns-priority": "5",
},
),
),
data={ 'type': 'mytype' },
token=token
)
The issue appears when trying to end the live activity, it seems that the sent message has no effect and the live activity remains on the lock screen of the device. This is the message that is being sent:
message = messaging.Message(
apns=messaging.APNSConfig(
live_activity_token=live_activity_token,
payload=messaging.APNSPayload(
aps=messaging.Aps(
alert=messaging.ApsAlert(
title="Live Activity Ended",
body="Your live activity has been ended",
),
custom_data = {
"event": "end",
"timestamp": int(time.time()),
"dismissal-date": int(time.time()),
"content-state": {
"myAttribute": False
},
"attributes-type": "MyObjectAttributes",
"attributes": {
"name": "name"
},
},
),
headers={
"apns-priority": "5",
},
),
),
data={ 'type': 'mytype' },
token=token
)
All the responses of the messaging.send_each method are successful (response.success => True) but the live activity does not end.
Steps to reproduce:
Currently these are the steps to reproduce the issue:
- Start a live activity with the
startmessage - Send the
endmessage via themessaging.send_eachmethod - Check the responses, they should be successful
- The live activity still displays on the device
PS: this might be an issue with Firebase itself and not with the sdk, but I am not entirely sure.
- Ngôn ngữ chính
- Python
- Star
- 1.2k
- Fork
- 359
- Merge trung bình
- 3 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 3
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của firebase/firebase-admin-python
-
api: remoteconfig
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
firebase/firebase-admin-python#957 · 1 bình luận ·
-
api: database type: feature request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
firebase/firebase-admin-python#978 · 1 bình luận ·
-
[FR] Support VERIFY_AND_CHANGE_EMAIL in generate_email_action_link (parity with firebase-admin-node) Đang mởapi: auth
firebase/firebase-admin-python#949 · 2 bình luận · 1 reaction · 1 người được giao ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 43/100
firebase/firebase-admin-python#945 · 1 bình luận · 1 reaction ·
Tất cả issue của firebase/firebase-admin-python
Issue tương tự
-
essnmx good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
-
[Feature] 奇物选择添加优先级 Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
syfoud/Simulated_Scepter#174 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Giskard-AI/giskard-oss#2840 · 1 bình luận ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Đang mởarea: repo bug perceived difficulty: 2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
yeti-platform/yeti#1380 ·