Good day all,
I was exploring the world of kindle development, and as a simple introductory project (and potentially useful application) I thought I would make a clock app that periodically shows the time on the e-ink screen. (This would be nice to replace a digital alarm clock as the e-ink screen does not produce any ambient light). However, I've run into some difficulties.
Namely, the kindlet library Timer class does not seem to be firing its scheduled tasks. I've tried several variations of the schedule methods and different assumptions about the value it is accepting for delay/period arguments, but nothing seems to be working. It will run its task once, but won't update on the period it is supposed to and only runs subsequent updates when the kindle is awoken from the lock screen. Specific snippets of my code will be at the bottom of this post.
More than a simple solution for this, though, I'd like to know if there are any additional resources available for learning the kindle libraries. They don't seem to have any javadocs (in the case of the timer, since the API is the same I would assume it would work the same as the java util class of the same name, though my problems would indicate otherwise) and examples are sparse. I do appreciate the number of kindlets posted here which are open sourced on github, but these can be difficult to read through and are typically based around a very event-oriented control flow as far as I can tell.
Thanks for your time,
Andrew
My main class:
I was exploring the world of kindle development, and as a simple introductory project (and potentially useful application) I thought I would make a clock app that periodically shows the time on the e-ink screen. (This would be nice to replace a digital alarm clock as the e-ink screen does not produce any ambient light). However, I've run into some difficulties.
Namely, the kindlet library Timer class does not seem to be firing its scheduled tasks. I've tried several variations of the schedule methods and different assumptions about the value it is accepting for delay/period arguments, but nothing seems to be working. It will run its task once, but won't update on the period it is supposed to and only runs subsequent updates when the kindle is awoken from the lock screen. Specific snippets of my code will be at the bottom of this post.
More than a simple solution for this, though, I'd like to know if there are any additional resources available for learning the kindle libraries. They don't seem to have any javadocs (in the case of the timer, since the API is the same I would assume it would work the same as the java util class of the same name, though my problems would indicate otherwise) and examples are sparse. I do appreciate the number of kindlets posted here which are open sourced on github, but these can be difficult to read through and are typically based around a very event-oriented control flow as far as I can tell.
Thanks for your time,
Andrew
My main class:
Spoiler: