@nativescript/local-notifications custom sound not working
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 38/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- android, typescript
- 领域
- mobile-dev
调研方向
从 local-notifications README 和 Android 实现开始,使用报告中的调度调用和 Android 11 作为复现用例。检查如何处理来自 App_Resources/Android/src/main/res/raw/silent.wav 的值;当已调度的通知播放指定的自定义声音而不是设备默认声音时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Hi All, I've been trying to look out for a solution on the internet, and even tried to understand the source code with no avail.
I'm trying to schedule a local notifications as follows
LocalNotifications.schedule([ {
id: id,
title: `Some title`,
sound: 'res://silent.wav',
ongoing: true,
notificationLed: false,
forceShowWhenInForeground: false,
priority: 0,
actions: actions,
icon: 'res://icon',
} ])
and the notification is displayed correctly. And that's fine. The only problem is that the sound file which I am specifying is not being played, and instead the default android notification sound of the device is playing.
I've even tried using silent.wav and silent as values... I even tried passing <any>null as indicated in the README but nothing worked.
The silent.wav file is located in App_Resources/Android/src/main/res/raw and App_Resources/iOS respectively
Something worth mentioning is that I've been trying this out on Android 11.
Any help and pointers would be greatly appreciated.
- 主要语言
- TypeScript
- 星标
- 206
- 派生
- 123
- 平均合并
- 2 天 1 小时
- 30 天内合并 PR
- 1
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NativeScript/plugins 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 92/100
NativeScript/plugins#680 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
NativeScript/plugins#671 ·
-
难度 1/5 1 小时以内 新手友好度 72/100
NativeScript/plugins#640 ·
-
难度 4/5 3-5 天 新手友好度 45/100
NativeScript/plugins#668 ·
-
难度 4/5 3-5 天 新手友好度 45/100
NativeScript/plugins#665 · 1 条评论 ·
查看 NativeScript/plugins 的全部 Issue
相似的 Issue
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 95/100
-
Ecosystem: ClawMetry — the Qwen Code reader is now free and open source (follow-up to #9294 / #9338) 未关闭category/integration priority/P3 scope/documentation status/ready-for-human type/feature-request
难度 1/5 1 小时以内 新手友好度 84/100
-
area:auth FE mvp P3
难度 2/5 1-3 小时 新手友好度 88/100
klasolsson81/jobbliggaren#1788 ·
-
难度 2/5 1-3 小时 新手友好度 74/100
get-convex/migrations#69 ·
-
accessibility angular bug good first issue typescript ux
难度 2/5 1-3 小时 新手友好度 88/100
apache/fineract-backoffice-ui#584 · 1 条评论 ·