簡體   English   中英

推送通知聲音不來

[英]Push notifications sound not coming

我試着像下面這樣使用

我正在使用 pyfcm 發送通知 ( https://github.com/olucurious/PyFCM/ )。

push_service = FCMNotification(api_key)
push_service.notify_multiple_device(registration_ids=registration_ids, message_title=message_title,
message_body=message_body, data_message=data_message, sound="Default")

我添加了 sound="Default" 作為 function 的最后一個參數。但是即使通知即將到來,手機也不會發出任何聲音。

這是一個 React Native 應用程序,但我認為 React Native 與此無關,因為任何移動應用程序甚至都不知道通知何時進入后台。

知道如何解決這個問題嗎? 謝謝

你應該把 sound=True

push_service.notify_topic_subscribers(
    message_body=message, topic_name=topic_condition, sound=True)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM