Android / Java: Show GUI on “off-screen” (Always-On Display…)

回眸只為那壹抹淺笑 提交于 2019-12-07 15:29:24

问题


I saw new Android devices coming out, that show things (clock etc.) once the display "turns off". That feature is called an Always-On Display, and since my Samsung Galaxy S6 edge already features an AMOLED screen, and a night-clock, I believe there is a way, to make it show something, when the display is "turned off". Is there a way using Java on Android, to display something, once display is meant to turn off? (Like just a normal GUI, I could do the rest then.) Like, to tell your app, to show something, when the screen turns off, that is still visible somehow? (without root permissions)

That would be useful, thanks in advance.

UPDATE: I found some apps on the Google Play Store, which seem do to, what I want (not that specialized though): https://play.google.com/store/apps/details?id=com.thsoft.glance&hl=de https://play.google.com/store/apps/details?id=com.orthur.always_on_display&hl=de

So it is definetely possible, I just need to know, how.


回答1:


If you are not using root, then you can only use the Android APIs. Here is a list for example for the display: http://developer.android.com/reference/android/view/Display.html I don't see anything there for the Ambient Display mode or Always-On.

Samsung provides APIs also for the features of it's phones here: http://developer.samsung.com/galaxy Here I can find the Look API that has something close to what you want, but for Edge.



来源:https://stackoverflow.com/questions/35814910/android-java-show-gui-on-off-screen-always-on-display

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!