[英]Can I download an audio file and use it for push notification sound in Android?
[英]How can Android playback streaming audio by push notification trigger?
我是iOS應用開發人員,不熟悉Android。 我想實現在手機收到推送通知時通過Internet播放音頻的功能。
我已經針對iOS對它進行了調查,得出的結論是,在iOS中這是不可能的,因為Apple禁止開發后台通過Internet下載數據。
我想知道此功能在Android中是否可行。 你能給我什么建議嗎?
您需要實現PendingIntent來通知您,並啟動ForgroundService或this或this來播放音頻,並在用戶離開您的應用程序或根據您的特定需求使用他們的應用程序時將其關閉。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.