View Single Post
Old 02-10-2016, 06:13 PM   #1
NatCh
Gizmologist
NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.NatCh ought to be getting tired of karma fortunes by now.
 
NatCh's Avatar
 
Posts: 11,615
Karma: 929550
Join Date: Jan 2006
Location: Republic of Texas Embassy at Jackson, TN
Device: Pocketbook Touch HD3
Lightbulb Nook Glowlight Plus Lightswitch App

I've been mostly pleased with my NGL+, once I got it rooted and managed to maneuver the default language of my Relaunch installation into "System" and out of Russian, anyway.

My final unhappy-maker was toggling the front light. The NST Glow and NGL both would toggle the light on or off with a long-press of the "n" button, but B&N inexplicably decided to remove that from the NGL+ in favor of an arcane approach involving menu navigation and working an on-screen slide — way too much effort and effectively impossible in the dark. While I've seen several folks expressing ... dissatisfaction with that design choice, I have yet to see anyone offer a way to address it, so I came up with one myself.

What I did was whip up a simple app with Tasker plus its "App Factory" plugin that toggles the front light level between 0 and 84 (of 255), 0% and roughly 33% respectively. Why? Because 2 X 42 = 84. I read in either well lit areas or total darkness, so the lower percentage works for me. Besides, once the light is actually on, finding and operating that slider is a much simpler prospect for those occasions I want a higher light level.

Unfortunately, not being an actual Android developer, the brightness level is hard-coded, so if someone wanted a different set-point they'd have to recompile with their preferred light setting. To that end, the attached zip file includes the apk as I use it, and the XML instructions for Tasker, should anybody want those.

This could be used with any Android device, I suppose, if anyone cared to do so.

While that got me a simple way to flip the switch, as it were, that's only so useful by itself. In order to get it to the point that I could toggle the light from inside a book I also used XPosed Additions Pro (which requires the XPosed Installer and framework be pre-installed -- click on the "Show older versions" link at the bottom, the current stable one is apparently 2.6.1). XPosed Additions Pro allowed me to re-map the "n" button at the bottom to do all sorts of things, but I set it up to run my Lightswitch program.

The other thing I had to do was to set Relaunch to run as a regular program, rather than a launcher, or it would dump back into Relaunch after running the toggler -- perhaps workable, but not what I was after.

I freely admit that this is a rather kludgey solution, but it does work, which is a pretty compelling argument in my experience. If somebody who can do so cares to whip up a more elegant one, I'd probably happily switch to it and thank them graciously besides.

Finally, since the precipitater of this little exercise was that I couldn't find a solution to do this thing, I decided to share it, and while I've been pretty dormant on MR for quite a while, this is about the only place I'd go to do that sharing, so here it is. Enjoy or ignore, as pleases you.
Attached Files
File Type: zip NGL+ LightSwitch.zip (1.67 MB, 837 views)
NatCh is offline   Reply With Quote