05-16-2014, 05:39 PM | #181 |
Enthusiast
Posts: 44
Karma: 6550
Join Date: May 2013
Location: Bosnia & Herzegovina
Device: Kindle Paperwhite 1 WiFi
|
I have just found out the code for hiding the options is in place and runs every time the menu is called (kindlemenu.sh calls a different Bash script):
Code:
/mnt/us/extensions/kindlemenu/bin/sh/clean_launchers.sh & |
05-16-2014, 06:44 PM | #182 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
So check if it is being run more than once at a time, or not checking that the prior invocation has completed, or ..... All/Any of those things that can go wrong with the logic of an async task and the main task. |
|
05-16-2014, 06:55 PM | #183 |
Enthusiast
Posts: 44
Karma: 6550
Join Date: May 2013
Location: Bosnia & Herzegovina
Device: Kindle Paperwhite 1 WiFi
|
Yes, I've just recently learned the meaning of ampersand symbol. The interpreter doesn't wait for the command to finish execution, but instead continues to the next section of code, something like that.
What appears to be the problem here is the script executing too soon, before the Kindle is able to render kindlemenupage.html, the task set by this code: Code:
(usleep 250000; lipc-set-prop com.lab126.pillow customDialog '{"name": "../../../../mnt/us/extensions/kindlemenu/bin/kindlemenupage", "clientParams": {"dismiss": true}}') & So what happens if we delay the job responsible for starting clean_launchers.sh? Code:
(usleep 300000; /mnt/us/extensions/kindlemenu/bin/sh/clean_launchers.sh ) & I would like to hear if there's a better way to achieve the same result, because this doesn't seem too robust (relying on the performance of the Kindle when timing background jobs). Does calling cleanup_launchers.sh via javascript once the DOM elements have loaded sound like a good idea? Last edited by Cykotitan; 05-16-2014 at 07:03 PM. |
05-16-2014, 08:12 PM | #184 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Until we hear from Aeris on why she did this the way she did (she may have a good reason) . . . .
Perhaps take the '&' out of the lipc-set-prop command (it is probably already async or waits for user input; in either case it probably doesn't need the '&') With that taken out - Try with and without the new 'usleep 30000' (and maybe take the '&' out of that command also). - - - - I am guessing she was trying to make the menu system as responsive as possible - but there may be other reasons. She did put in a lot of time on this project - so it would be nice to hear from her about this problem. |
05-16-2014, 08:50 PM | #185 |
Enthusiast
Posts: 44
Karma: 6550
Join Date: May 2013
Location: Bosnia & Herzegovina
Device: Kindle Paperwhite 1 WiFi
|
This is what remains after the modifications:
Code:
#!/bin/sh # Clean the screen lipc-set-prop com.lab126.pillow customDialog '{"name": "../../../../mnt/us/extensions/kindlemenu/bin/html/blank"}' # Launch Kindle Menu html page (usleep 250000; lipc-set-prop com.lab126.pillow customDialog '{"name": "../../../../mnt/us/extensions/kindlemenu/bin/kindlemenupage", "clientParams": {"dismiss": true}}') # kill already running clean_launchers.sh processes, if any killall clean_launchers.sh # If Kindle Touch, disable light tray buttons. Disable also # launcher of Midori and KOreader, if not installed /mnt/us/extensions/kindlemenu/bin/sh/clean_launchers.sh Results are as follows: KUAL > Kindle Menu > Enable status bar shortcut > (screen swipe starting from top towards bottom) Didn't work the first time, worked the second (KOReader and Midori gone) On the contrary, opening the menu directly yields correct results (KUAL > Kindle Menu > Show Kindle Menu). This is somewhat expected, since the initial problem was only observable in cases where menu is called using the shortcut (gesture). Edit: I might have found a way to cover all the aspects of the problem, and the fix requires you to use the code above but add an ampersand to the last job thus making it go to background: Code:
/mnt/us/extensions/kindlemenu/bin/sh/clean_launchers.sh & Last edited by Cykotitan; 05-16-2014 at 09:21 PM. |
05-18-2014, 06:30 AM | #186 |
Developer's Corner Mascot
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
Sorry for the waiting (I've been a little busy)... I'm over it, gonna fix the issue soon!
Thank you all for reporting! |
05-18-2014, 09:21 AM | #187 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
|
05-18-2014, 01:29 PM | #188 |
Developer's Corner Mascot
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
Here you go! Both the issues should be gone now... please test if the new version is ok!
1) The topbar did disappear because after removing it I assumed that koreader was installed and so that it would put it back when closed (in fact, it would have been true if the Koreader icons was properly hidden). How did I fix it: I added this line to koreader_launcher.sh: Code:
lipc-set-prop com.lab126.pillow disableEnablePillow enable Code:
/mnt/us/extensions/kindlemenu/bin/sh/clean_launchers.sh & Code:
nativeBridge.setLipcProperty("com.lab126.system", "sendEvent", "; sh -c '/mnt/us/extensions/kindlemenu/bin/sh/clean_launchers.sh &'"); Spoiler:
Let me know if it is everything ok now! And thanks again for reporting, it was a quite annoying bug for users Last edited by Aeris; 05-19-2014 at 06:23 AM. |
05-18-2014, 08:29 PM | #189 |
Enthusiast
Posts: 44
Karma: 6550
Join Date: May 2013
Location: Bosnia & Herzegovina
Device: Kindle Paperwhite 1 WiFi
|
That is quite the way I imagined, except I couldn't find the exact way to invoke external scripts via JS.
You can avoid getting the delay by moving the nativeBridge code outside of function custom_init, thus making it execute sooner (and hopefully, neither too late or too soon). |
05-19-2014, 06:21 AM | #190 |
Developer's Corner Mascot
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
You are definetly right, and there's no risk to execute it too soon (because the elements to hide are static)... released a new tiny bugfix
|
07-20-2014, 08:20 PM | #191 |
Developer's Corner Mascot
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
Maybe it could be useful to UP this thread for new kindle users...
|
09-06-2014, 04:27 PM | #192 |
Junior Member
Posts: 6
Karma: 10
Join Date: Dec 2011
Device: none
|
Thanks for this app. I love it!
|
03-21-2016, 03:25 PM | #193 |
Connoisseur
Posts: 66
Karma: 200233
Join Date: Aug 2013
Device: Kindle Paperwhite
|
Native Kindle Menu for Paperwhite (1 & 2) and Touch
Hi,
I tried Native Kindle Menu today on firmware 5.7.3.1 on my PW3? There are these problems on my device: -The status bar shortcut does not work. -Launching apps seems broken: when I tap on an app like GCalculator, the menu closes and the Kindle Home Screen is displayed. I made sure that the apps themselves do work when started via their KUAL menu item, i.e. GCalculator runs fine when started via KUAL. What does work is displaying the Native Kindle Menu itself when triggered via its KUAL menu item, turning Wifi on/off works too. Launching apps seems broken. Has anyone else noticed these problems on current firmware versions? |
03-21-2016, 07:05 PM | #194 |
BLAM!
Posts: 13,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Most likely affects 5.6.5 too, stuff moved around a lot on the UI front (and it's way over my head).
|
02-10-2017, 01:59 AM | #195 |
Connoisseur
Posts: 69
Karma: 10
Join Date: May 2016
Location: Gold Town
Device: kindle paperwhite 3, kindle oasis 2
|
seems interesting...
|
Tags |
launcher add-ons |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kindle Touch 5.3.2 - almost Paperwhite! | Vroo | Amazon Kindle | 23 | 01-21-2013 12:34 PM |
here's how to compile a gtk native app for the kindle touch | chris_c | Kindle Developer's Corner | 9 | 12-21-2012 12:01 AM |
Kindle Touch sudoku with menu | blackkbot | Kindle Developer's Corner | 6 | 05-31-2012 05:58 PM |
Troubleshooting kindle touch menu button not response | zenmindlei | Amazon Kindle | 4 | 03-26-2012 09:28 PM |