其他分享
首页 > 其他分享> > 有没有办法通过官方API提升Android设备的背光?

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

作者:互联网

我所看到的似乎表明,唯一的方法是使用在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.
)

标签:android,mobile,backlight,android-1-5-cupcake
来源: https://codeday.me/bug/20190701/1344847.html