Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 09-11-2013, 05:58 PM   #1
hemna
Junior Member
hemna can extract oil from cheesehemna can extract oil from cheesehemna can extract oil from cheesehemna can extract oil from cheesehemna can extract oil from cheesehemna can extract oil from cheesehemna can extract oil from cheesehemna can extract oil from cheese
 
Posts: 5
Karma: 1000
Join Date: Sep 2013
Device: Kindle Paperwhite
Question when is kindle sleeping?

Hello,
I'm trying to get my weather hack working only when the kindle is in sleep mode. I have a cron job that runs the weather update shell script.

Is there a way I can tell from the cmdln/bash when the kindle is sleeping? I don't want the weather shell script to display the weather png when I'm reading a book
hemna is offline   Reply With Quote
Old 09-11-2013, 06:20 PM   #2
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: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Would lipc-get-prop -s com.lab126.powerd state do the job?
NiLuJe is offline   Reply With Quote
Advert
Old 09-11-2013, 06:27 PM   #3
hemna
Junior Member
hemna can extract oil from cheesehemna can extract oil from cheesehemna can extract oil from cheesehemna can extract oil from cheesehemna can extract oil from cheesehemna can extract oil from cheesehemna can extract oil from cheesehemna can extract oil from cheese
 
Posts: 5
Karma: 1000
Join Date: Sep 2013
Device: Kindle Paperwhite
That looks good. thank you!
hemna is offline   Reply With Quote
Old 09-11-2013, 06:29 PM   #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: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by hemna View Post
Hello,
I'm trying to get my weather hack working only when the kindle is in sleep mode. I have a cron job that runs the weather update shell script.

Is there a way I can tell from the cmdln/bash when the kindle is sleeping? I don't want the weather shell script to display the weather png when I'm reading a book
Sure - Simple.

When the Kindle is sleeping, the CPU is halted, and anything software will not respond.
I.E: Like the command line shell.

And - the CPU may (can) go to sleep while you are reading a page of a book.
It is a meta-static display - it needs neither cpu nor power to continue to display the page.

A better solution -
Use dos1's event hooks to capture "going to screensaver" event and use that to start your weather display.
Similarly, capture the "coming out of screensaver" event to stop the weather display.
knc1 is offline   Reply With Quote
Old 09-11-2013, 06:34 PM   #5
hemna
Junior Member
hemna can extract oil from cheesehemna can extract oil from cheesehemna can extract oil from cheesehemna can extract oil from cheesehemna can extract oil from cheesehemna can extract oil from cheesehemna can extract oil from cheesehemna can extract oil from cheese
 
Posts: 5
Karma: 1000
Join Date: Sep 2013
Device: Kindle Paperwhite
Do you have the url for the info on those hooks?
hemna is offline   Reply With Quote
Advert
Old 09-11-2013, 06:44 PM   #6
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: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by hemna View Post
Do you have the url for the info on those hooks?
We have an "advanced search" box in the upper right corner of every page.

When logged in -
Leave the search text box empty, click 'search' -
That will take you to the advanced search page.

I gave you the author's name and the keywords of the topic, go for it.
knc1 is offline   Reply With Quote
Old 09-11-2013, 07:27 PM   #7
hemna
Junior Member
hemna can extract oil from cheesehemna can extract oil from cheesehemna can extract oil from cheesehemna can extract oil from cheesehemna can extract oil from cheesehemna can extract oil from cheesehemna can extract oil from cheesehemna can extract oil from cheese
 
Posts: 5
Karma: 1000
Join Date: Sep 2013
Device: Kindle Paperwhite
https://www.mobileread.com/forums/sho...d.php?t=198484

found it thanks
hemna is offline   Reply With Quote
Reply

Tags
weather


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Free (Kindle) Sleeping Night by Barbara Samuel [Racism-Exploring Historical Romance] ATDrake Deals and Resources (No Self-Promotion or Affiliate Links) 1 12-23-2012 10:01 AM
My new e-book 'The Sleeping Land' is available on Kindle JamesG83 Self-Promotions by Authors and Publishers 0 05-15-2012 04:41 AM
Powering off BUT Sleeping Instead! What the...? pokee Kobo Tablets 12 11-18-2011 11:38 PM
The Sleeping God williemeikle Self-Promotions by Authors and Publishers 0 11-23-2010 08:23 PM


All times are GMT -4. The time now is 06:46 AM.


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