NativeScript / NativeScript/plugins
[@nativescript/brightness] Obtained values bigger than allowed
未关闭
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 206
- 派生
- 123
- 平均合并
- 2 天 1 小时
- 30 天内合并 PR
- 1
描述
Manually setting my brightness to a 100% using the system UI and just running this on an Android device:
const brightness = new Brightness();
console.log(brightness.get());
console.log(brightness.getNative());
returns the following values:
JS: 803
JS: 2047
Aren't the allowed values from 0-100 and 0-255? (from the docs)
As a consequence, setting the value programatically to the highest allowed value (100) in my case results in the following brightness indicator, which should be on 100%:
This might probably be related 🤔
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 @nativescript/brightness 的 Android 实现开始,跟踪生成所报告值的 get() 和 getNative() 路径。将这些结果与文档中规定的 0–100 和 0–255 范围进行比较,然后验证在 Android 上设置文档中规定的最大值是否能达到预期的系统亮度。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- android, typescript
- 领域
- mobile-dev
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100