View Single Post
Old 10-12-2016, 04:20 AM   #5
zxczxc
Addict
zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.zxczxc knows how many angels can dance on the head of a pin.
 
Posts: 229
Karma: 136002
Join Date: Apr 2013
Device: PW
Quote:
Originally Posted by BiliBug View Post
This extension provides exactly the functionality I was searching for. I too can not believe that Amazon did not include such a setting on the Voyage.

I have run into one issue, though.... I use a passcode to lock my Kindle. If the Kindle falls asleep or I close the cover while the extension is activated, I can not type in my password to unlock the device. Because it is not unlocked, the page turn buttons do not work, so I can't deactivate the extension.

The only workaround I've found is to restart the device using the power button, which in turn disables the extension completely requiring opening KUAL to reenable it. Is there a more elegant solution?
The creator could check if the device is in screensaver mode, and if so, disable the touch disabling until it is awake again?
Something like that at least! I do something a little similar in KindleLazy.
Here is some code for the author:
Code:
//runs and returns output of a command
std::string exec(const char* cmd) {
    char buffer[128];
    std::string result = "";
    std::shared_ptr<FILE> pipe(popen(cmd, "r"), pclose);
    if (!pipe) throw std::runtime_error("popen() failed!");
    while (!feof(pipe.get())) {
        if (fgets(buffer, 128, pipe.get()) != NULL)
            result += buffer;
    }
    return result;
}



        std::string state = exec("lipc-get-prop com.lab126.powerd state");
        state.pop_back(); //remove newline from string
        if(state.compare("screenSaver") == 0){
            //we are sleeping so STOP disabling the touch, so we can use it for the password
            //and when we are awake again, feel free to reactivatate
        }
zxczxc is offline   Reply With Quote