有没有办法通过官方API提升Android设备的背光?

有没有办法通过官方API提升Android设备的背光?,第1张

概述我所看到的似乎表明,唯一的方法是使用在Cupcake(1.5)中被锁定的非官方API.这是真的?解决方法:看起来答案是“直到蛋糕”.从AndroidDevelopersBlog:Future-ProofingYourApps开始:TechniquetoAvoid,#1:UsingInternalAPIsEventhoughwe’vealwaysstronglyadvised

我所看到的似乎表明,唯一的方法是使用在Cupcake(1.5)中被锁定的非官方API.这是真的?

解决方法:

看起来答案是“直到蛋糕”.

从Android Developers Blog: Future-Proofing Your Apps开始:

Technique to AvoID, #1: Using Internal APIs

Even though we’ve always strongly
advised against doing so, some
developers have chosen to use
unsupported or internal APIs. For
instance, many developers are using
the internal brightness control and
bluetooth toggle APIs that were
present in 1.0 and 1.1. A BUG — which
is Now fixed in AndroID 1.5 — allowed
apps to use those APIs without
requesting permission. As a result,
apps that use those APIs will break on
1.5. There are other changes to unsupported APIs in 1.5 besIDes these,
so if you’ve used internal APIs in
your apps, you need to update your
apps to stop doing so. Even if they
don’t break on AndroID 1.5, there’s a
good chance they will on some later
version. (There’s some good news,
though: because “flashlight” apps are
so popular, we’ve added the
“screenBrightness” fIEld on the
WindowManager.LayoutParams class just
for that use case.)

总结

以上是内存溢出为你收集整理的有没有办法通过官方API提升Android设备的背光?全部内容,希望文章能够帮你解决有没有办法通过官方API提升Android设备的背光?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1118590.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存