koreader / android-luajit-launcher

Android NativeActivity based launcher for LuaJIT, implementing the main loop within Lua land via FFI
MIT License
130 stars 83 forks source link

EPD & Lights drivers for Xiaomi RK3566 based devices #478

Closed jkl16 closed 4 months ago

jkl16 commented 4 months ago

I have provided more details in https://github.com/koreader/android-luajit-launcher/issues/477


This change is Reviewable

jkl16 commented 4 months ago

Since complexity check is failing, should I split out EPD and light changes to a separate PRs?

Frenzie commented 4 months ago

Nah, that check seems kind of dumb, at least in the context of this PR.

pazos commented 4 months ago

Added Lights & Warmth driver implementing getting & setting values, however setting is not enabled since it requires root.

I'm not very fan of this. It would be better to use an Intent to launch the native dialog used by the system, if something like this exists. Gestures won't work but at least the dialog would be useful to change levels.

Until now all drivers rely on our own widget, so we need a little change to make possible to call external widgets instead.

What do you think, @jkl16?

jkl16 commented 4 months ago

In the device that I own, brightness & warm levels can only be controlled from native Android notification panel. It looks as on the following photo: 20240425_000245

The panel can be accessed when running KOReader at any time by pulling it down from the top edge. From UX perspective that seems good enough, so maybe there is no need to implement that part at all. The biggest issue is the fact that the notification panel gesture collides with KOReader top menubar.

Frenzie commented 4 months ago

From UX perspective that seems good enough, so maybe there is no need to implement that part at all.

Better not indeed.

jkl16 commented 4 months ago

Then based on the discussion I removed all lights related code from the branch.

pazos commented 4 months ago

The biggest issue is the fact that the notification panel gesture collides with KOReader top menubar.

You can setup KO top menu to be activated only when tapping and use the swipe gesture to activate system menu.