Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Message to end Live Activity does not close it on the device.

オープン
#909 コメント 2 件 リアクション 0 件 担当者 2 名 GitHub で見る

@chong-shao がすでに取り組んでいます。

2025年9月2日 から。

評価

この issue はまだ評価されていません。

説明

api: messaging
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 start message
  • Send the end message via the messaging.send_each method
  • 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.

主要言語
Python
スター
1.2k
フォーク
359
平均マージ
5日 6分
マージ済み PR(30日)
2

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

firebase/firebase-admin-python のほかの issue

firebase/firebase-admin-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。