Sar*_*ekR 4 push-notification ios dart flutter flutter-dependencies
我想在 Flutter 的 iOS 平台的推送通知中使用我自己的声音。由于我没有iOS开发经验,我正在努力解决它。
在我的应用程序设置中有 3 个通知声音选项,以便用户可以选择通知声音。我已经实现了local_notifications包,虽然我在我的应用程序中收到通知,但我找不到如何在 iOS 平台的推送通知中使用自定义声音。
您应该将此默认给定的声音名称替换为您的声音名称。
var iOSPlatformChannelSpecifics = IOSNotificationDetails(sound: 'slow_spring_board.aiff'); //put your own sound text here
Run Code Online (Sandbox Code Playgroud)
(在此之前,您的声音应该使用 Xcode 添加到您的项目中)以下是如何使用 Xcode 为 iOS 设备将自定义声音添加到您的项目的链接:https : //medium.com/@dmennis/the-3-ps- to-custom-alert-sounds-in-ios-push-notifications-9ea2a2956c11
注意:声音持续时间应小于 30 秒,否则将不起作用
| 归档时间: |
|
| 查看次数: |
2765 次 |
| 最近记录: |