Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 09-18-2013, 03:42 AM   #1
Aeris
Developer's Corner Mascot
Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.
 
Aeris's Avatar
 
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
To programmers: help for a little "battery Report" app improvement

Hi there!

I'm not a programmer so I need a little help for a Kual App...

I really like the Battery Report app (it is the only one that shows me the battery charge percentage at the moment)... but I don't like one thing of it: it creates a status text report in the documents folder and you must check it from here, like a book.

I'd really prefer not having these information logged, or at least not in documents folder, and automatically displayed on the screen for a while (as "Back Door Lock -> Lock state" does, for example).

Can anybody help? Thank you!

Link to Battery Report:
https://www.mobileread.com/forums/sho...5&postcount=11

Link to Back Door Lock:
https://www.mobileread.com/forums/sho...7&postcount=25
Aeris is offline   Reply With Quote
Old 09-18-2013, 04:07 AM   #2
brianinmaine
Evangelist
brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.
 
brianinmaine's Avatar
 
Posts: 456
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
I don't see an automatic display in the back door hack, but in this line:
mv $LOG '/mnt/us/documents/'$RPT'.txt'
just change it to:
mv $LOG '/mnt/us/'$RPT'.txt'
and it won't show up as a book. you can still read it if you want by sshing in or whatever.
brianinmaine is offline   Reply With Quote
Old 09-18-2013, 04:23 AM   #3
Aeris
Developer's Corner Mascot
Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.
 
Aeris's Avatar
 
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
Quote:
Originally Posted by brianinmaine View Post
I don't see an automatic display in the back door hack, but in this line:
mv $LOG '/mnt/us/documents/'$RPT'.txt'
just change it to:
mv $LOG '/mnt/us/'$RPT'.txt'
and it won't show up as a book. you can still read it if you want by sshing in or whatever.
Thank you, I'll change the folder with this hint. But ssh isn't too much handy xD I'd like to waste less time possibile to know how much battery power is left, I'm used to check it quite often...

The script used from Back Door Lock to display the status is named lockstat.sh

Last edited by Aeris; 09-18-2013 at 04:26 AM.
Aeris is offline   Reply With Quote
Old 09-18-2013, 04:26 AM   #4
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210807
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by Aeris View Post
The script used from Back Door Lock to display the status is named lockstat.sh
And does not work consistently across the various devices/firmwares.

Although your welcome to find/fix its problems and submit the changes.
knc1 is offline   Reply With Quote
Old 09-18-2013, 04:29 AM   #5
Aeris
Developer's Corner Mascot
Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.
 
Aeris's Avatar
 
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
Yes I know... it was just an example. I only would like to have the battery file report shown instantly when i press the Kual app link, also an "hello world" approach would be great for me if I was be able doing it xD
Aeris is offline   Reply With Quote
Old 09-18-2013, 04:34 AM   #6
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Code:
eips 1 2 "Hello World"
Yes, I know that this is an extremely short example... But it's the command that you want. Now you only need to find out how to make it display what you want to display, and adjust the x and y coordinates (in the above example:x=1, y=2) to suit your need.

Learning by doing!

PS: You can also use
Code:
eips 1 2 "Hello World" -h
for inverted text color (white on black), if that suits you better.

Last edited by ixtab; 09-18-2013 at 04:47 AM.
ixtab is offline   Reply With Quote
Old 09-18-2013, 04:39 AM   #7
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210807
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
And what you want displayed is the output of:
Code:
gasgauge-info -c
perhaps with some leading and/or trailing text.

I think that Amazon's gasgauge-info script already munges the percentage sign into the numeric string on all firmware versions,
If so, then

Code:
eips 1, 2 `gasgauge-info -c`
With changes in the x, y starting position of your choice should 'just work'.
Note: Those are back-ticks, not single quotes.

And since it is a single command, you don't need a bin/shell-script.sh to get it done, just put it as the 'action: ' in the menu.json of your new button.
(Unless the version-2 KUAL parser broke that feature. The version-2 parser is a bit annal in the things it will accept.)

Last edited by knc1; 09-18-2013 at 04:53 AM.
knc1 is offline   Reply With Quote
Old 09-18-2013, 05:03 AM   #8
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
I may have something for that... *rummages around*
twobob is offline   Reply With Quote
Old 09-18-2013, 05:12 AM   #9
Aeris
Developer's Corner Mascot
Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.
 
Aeris's Avatar
 
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
Ahah it a bit sh*tty but it works, thanks xD But if i change the x and y doesn't display at all o.O

Does it leave a terminal opened after executing the command? (I'd like it to close after showing me what I want). I've tryed to append:

sleep 5
exit

but didn't work
Attached Files
File Type: zip BatteryStatus.zip (906 Bytes, 233 views)

Last edited by Aeris; 09-18-2013 at 05:21 AM.
Aeris is offline   Reply With Quote
Old 09-18-2013, 05:21 AM   #10
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
OSD thingy. Not shitty. Well... less shitty..

https://www.mobileread.com/forums/sho...d.php?t=222781
twobob is offline   Reply With Quote
Old 09-18-2013, 05:33 AM   #11
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 12,509
Karma: 22226370
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2 & PW5; Kobo H2O, Forma, Elipsa & Sage
Wee, everyone tried something different, so, here's my take, with eips

Tested on a K2/3/4/Touch/PW/PW2 .

@knc1: What's the issue and and on which devices with Backdoor Lock's eips calls?

PSA: All downloads have been moved to the Snapshots thread!

Last edited by NiLuJe; 06-04-2019 at 01:33 PM. Reason: Bump to 1.1.N
NiLuJe is offline   Reply With Quote
Old 09-18-2013, 05:39 AM   #12
Aeris
Developer's Corner Mascot
Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.
 
Aeris's Avatar
 
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
Thank you all guys, you are so kind! I think that aOSD will be useful to me, Twobob! Only have to understand how make it work with terminal outputs and not simple strings..

Niluje, that's exactly what i wanted to do! Thank you

Last edited by Aeris; 09-18-2013 at 05:41 AM.
Aeris is offline   Reply With Quote
Old 09-18-2013, 05:53 AM   #13
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by Aeris View Post
Thank you all guys, you are so kind! I think that aOSD will be useful to me, Twobob! Only have to understand how make it work with terminal outputs and not simple strings..
Well... exactly like the above examples did: either using $(command) or `command` to use the output of executing command, or by piping it in like twobob did: echo "Hello world" | ... aosd_cat ...

There are more possibilities, but all of them are "standardized", so once you know how to use them, you can apply that for pretty much any situation. You should find information about these in any decent shell programming tutorial.

hth
ixtab is offline   Reply With Quote
Old 09-18-2013, 06:01 AM   #14
Aeris
Developer's Corner Mascot
Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.Aeris ought to be getting tired of karma fortunes by now.
 
Aeris's Avatar
 
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
@ixtab: Perfect! I hope to make some nice kindlet too, soon or later Now I've something to start with!

@niluje: I've modified something (eips) to make it show better on kindle paperwhite (don't know on others...)
Attached Thumbnails
Click image for larger version

Name:	screenshot_2013_09_18T11_59_52+0200.png
Views:	938
Size:	10.6 KB
ID:	111417   Click image for larger version

Name:	screenshot_2013_09_18T11_58_25+0200.png
Views:	887
Size:	10.7 KB
ID:	111418  
Attached Files
File Type: zip BatteryStatus.zip (2.2 KB, 283 views)
Aeris is offline   Reply With Quote
Old 09-18-2013, 06:18 AM   #15
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 12,509
Karma: 22226370
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2 & PW5; Kobo H2O, Forma, Elipsa & Sage
@Aeris: I was wondering if centering it wouldn't work better .

I have a bit of something that auto-centers eips calls somewhere, let me try something...
NiLuJe is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pocket Pro 5" Is the battery "Nokia" compatible for real?? wayamauro Astak EZReader 76 02-24-2020 03:48 AM
"This American Life" retracts its Apple/Foxconn report Andrew H. News 4 03-16-2012 10:15 PM
SONY pocket edition: "Device locked" + "charge battery" obstacles? hermes Devices 3 06-02-2011 03:32 AM
British report takes aim at copyright "lobbynomics" GA Russell News 3 05-22-2011 02:06 PM
"Meditations", a unique self improvement book vminniti Self-Promotions by Authors and Publishers 16 10-05-2010 12:21 PM


All times are GMT -4. The time now is 10:14 AM.


MobileRead.com is a privately owned, operated and funded community.