AndroidNotification::VibrateTimingsMillis not operating as documented
维护者通常 1 天内回复
@chong-shao 已经在做这个了。
开始于 2022年3月30日。
评估
这个 Issue 还没有评估数据。
描述
[REQUIRED] Step 2: Describe your environment
- Operating System version: Windows 10 Enterprise
- Firebase SDK version: 2.3.0
- Firebase Product: Firebase Cloud Messaging
- .NET version: 6.0
- OS: Windows 0 Enterprise
[REQUIRED] Step 3: Describe the problem
The AndroidNotification::VibrateTimingMillis property is documented as follows:
Gets or sets a list of vibration timings in milliseconds in the array to use. The first value in the
array indicates the duration to wait before turning the vibrator on. The next value
indicates the duration to keep the vibrator on. Subsequent values alternate between
duration to turn the vibrator off and to turn the vibrator on.
Today I wanted to send a notification that would vibrate for 500 milliseconds, so I set this property as follows:
AndroidNotification notification = new
{
DefaultVibrateTimings = false,
VibrateTimingsMillis = new long[] { 0, 500 }
};
On the device though, this resulted in a very long vibration, that lasted for several seconds.
After experimenting, sending a value of { 0, 1 } results in a vibration lasting 1 second - I've reviewed the relevant code for this (in VibrateTimingsString) and tested it on its own, and the above code results in the value 0s, 0.500000000s being sent to the API, which appears correct.
I'm not sure if this is a fault on the device I was testing against as it is running a very dated version of Android unfortunately (we're stuck with it due to customer requirements and it's stuck on Android 7.1.1).
PS: I also noticed a few possible micro-optimisations that could be made to some of this new code, such as pre-sizing the list for the timingsStringList, I'm not sure if it's worth opening a PR for these changes.
- 主要语言
- C#
- 星标
- 407
- 派生
- 147
- 平均合并
- 2 天 10 小时
- 30 天内合并 PR
- 12
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
firebase/firebase-admin-dotnet 的其他 Issue
-
AbstractFirebaseAuth.cs has a typo (accound/account)可能重新可做 关联的 PR 已关闭且未合并。 未关闭needs-triage
难度 1/5 1 小时以内 新手友好度 72/100
firebase/firebase-admin-dotnet#334 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 42/100
firebase/firebase-admin-dotnet#591 · 1 个 reaction ·
维护者通常 1 天内回复
-
GetProjectId returns null on Compute Engine / Cloud Run with application default credentials可能已有人在做 @lahirumaramba 于 3 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 78/100
firebase/firebase-admin-dotnet#588 ·
维护者通常 1 天内回复
-
Sending FCM notification with Fids Return NotRegistered可能重新可做 @yvonnep165 于 80 天前认领,目前没有进行中的 PR。 未关闭
firebase/firebase-admin-dotnet#534 · 5 条评论 · 1 个 reaction · 已指派 1 人 ·
维护者通常 1 天内回复
-
Sending MulticastMessage does not work after replacing Tokens with Fids可能重新可做 @Doris-Ge 于 108 天前认领,目前没有进行中的 PR。 未关闭api: messaging
firebase/firebase-admin-dotnet#530 · 2 条评论 · 已指派 2 人 ·
维护者通常 1 天内回复
查看 firebase/firebase-admin-dotnet 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 73/100
维护者通常 1 天内回复
-
Bug: Needs Replicating
难度 2/5 1-3 小时 新手友好度 62/100
space-wizards/RobustToolbox#7189 ·
维护者通常 1 天内回复
-
affected/v17 area/frontend type/bug
难度 2/5 1-3 小时 新手友好度 68/100
umbraco/Umbraco-CMS#24491 · 1 条评论 ·
维护者通常 2 天内回复
-
enhancement needs-triage
难度 2/5 1-3 小时 新手友好度 78/100
microsoft/microsoft-ui-reactor#1460 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
CodeForFire/lagebuch#912 ·
维护者通常 1 天内回复