[Nook Touch Themes and Apps] nmyshkin:
3-19-24: updated to version 2.1

--restored one line of code that went missing during compiling!

--fixes erratic slider response

--uninstall previous version first

There is a beta (alpha?) version of the app for the NGL3 (BNRV520) in post #20 below.

I first saw this feature implemented when I was checking out Koreader on the CM11 ROM for the NST. If you are not familiar with it, the screen light is controlled by a slide of the finger (or thumb) up or down the left side of the screen. It's very simple and works really well (actually, Koreader as a whole works surprisingly well on the CM 11 ROM--except that you have to charge every other day...). I got to wondering if there might be some way to implement this feature (system-wide) on the NSTG (BNRV350).

The result is this app. When installed it can take the place of the long-press on the "n" button and the Glowlight control panel. Both of these continue to function, but you may not need/want them any longer.

To install

1. This is a Tasker-made app and like Tasker and it's kid apps it has a dependency on two small files (but does not require Tasker to run). If you already have one of my other Tasker apps, you can discard the two small files in the attached zip. Otherwise, place the files as shown below:

/system/etc/permissions/com.google.android.maps.xml

/system/framework/com.google.android.maps.jar

Set permissions for both files to rw-r--r-- and reboot. Without these files resident, the app will not install.

2. The app also uses sqlite3 to access settings.db. If you don't already have sqlite3 (provided in the zip below), move the file to /system/bin and set the permissions to rwx r-x r-x. Reboot.

3. Once the two dependencies and sqlite3 have been put in place, install the app either from a file manager or via ADB.

To use

Tap on the app icon. You will see a notification that the app has been activated.

There is now a narrow (20 px) transparent overlay on the left side of the screen, right up against the bezel. The strip is 510 px long and more or less vertically centered on the screen. It is swipe-sensitive (but only after a long-press), long-press-sensitive, but

not

tap-sensitive. This strip will always be there (unless the system kills the app for some reason) and will appear at each boot without any additional action by you. To give you an idea of the size/location of the swipe zone, I've made a screenshot with the rectangle colored in. Note, the actual swipe zone is

invisible

and it is system-wide, not just in the Reader.

View attachment 5891539

To turn the glowlight on, place your thumb against the bezel edge (sort of at an angle, partly touching the screen but also pressing against the edge of the bezel) . Hold it there until the light comes on. On first use you will be asked to approve root access. After a short delay the light should come on. This is equivalent to a long-press on the "n" button. Now swipe up, perhaps half-way up the screen at first. No need to be vigorous. A smooth slide should suffice if your thumb is in the right place. Up-swipes brighten the light while down-swipes will dim it. At some point a down-swipe might potentially turn off the light. To avoid this situation the app will bottom the intensity out at 10. Instead, to turn the light off execute another long-press to turn the light off at its current intensity. This convention solved several thorny programming issues. So, long-presses to turn the light on and off (just like the "n" button), and swipes to change the light intensity (just like the Glowlight control panel, except always available).

Edit: if you change the display to landscape mode, the swipe area moves to the left of the screen (the actual "top").

Stuff to know

It's important to know a few "technical" matters. First, the light always

starts

at whatever intensity was used last.

Second, the overlay is not a traditional "slider" but rather an "accumulator". That means it's not necessary to swipe the entire length to get full intensity on the light (or to dim it). It also means there is no spot on the zone where the intensity is 75 or 133. Rather, it's the

length

of the swipe that determines the light intensity. Once the light is on, each successive swipe is added to (or subtracted from) the current intensity value. The light intensity has a maximum value of 255 while the overlay is 510 px long. To avoid excessively fussy adjustment, each swipe length is divided by four before being applied to the current intensity reading.

Also, if you use a tap on the screen to change pages (like I do), you may have to adjust your reach just a tad to go back a page. To go forward a page I often use my thumb just about at the bezel. This will not work to go back because the overlay blocks that portion of the screen. So you need to reach over just a little (the overlay is only 20 px, after all) to go back a page by tap.

I experimented with a narrower overlay but the NST is so bad at scrolling and swipes that I found I needed something a little wider to make the behavior consistent.

If you are trying to select a word (to look up a definition, for example) and the word is at the left margin, there should still be enough of the word available beyond the overlay for you to select it.