Results 1 to 3 of 3
Like Tree4Likes
  • 2 Post By jonwise80
  • 2 Post By Misj'
  1.    #1  
    One of the best features of the Kindle platform is its integration with public libraries. You can "check out" a huge number of books and consume them on your Kindle for free -- until your check out period (aka: temporary license) expires. Sometimes you need a little more time to read the book. On an actual Kindle eReader device, there's an easy work-around -- put the Kindle in Airplane mode. Turns out the license expiry is enforced on the server side, so as long as your Kindle can't talk to the WhisperSync server, it can't "expire" your content.

    Eventually, of course, you'll want to get a new book, and you'll want to re-enable the synchronization -- at which time you'll find that your library book has expired. They'll catch up with you at some point. But getting those couple extra days or weeks can be really nice.

    On a Touchpad, its probably not practical to leave it in Airplane mode. There's plenty of other reasons for a device like that to be connected. Of course, you could remember to toggle Airplane mode on whenever you have the Kindle app running, and turn it back off again after you've killed the app. But if you make a mistake or forget just once, your book is gone! The app is pretty persistent about trying to sync!

    So, I've been hacking an "Offline Mode" into the Kindle app. Its presented as a new menu option, and when its on, its sets a bit that is checked on every sync attempt. If the bit says to be offline, sync will be cancelled -- and your borrowed content will stay safely borrowed!
    kindle_2018-03-12_211600.jpg

    This is my first exploration of Enyo (to date, I've been programming against the Mojo framework), so I don't really know what I'm doing. But everything seems to work as I'm intending. The only thing I don't know how to do is persist the option between launches. For now, I've set Offline Mode to be hard-coded as "On" by default, and if I want to do a sync, I have to turn it off. At the next launch, it will be back on again. I can see the code where they load settings, but haven't figured out how to inject a new setting into the DB yet.

    In theory, this could be released as a .patch file -- although I don't know how to make those yet. In practice, for myself, I've just done this as a "re-pack."
    Last edited by jonwise80; 12/03/2018 at 09:17 PM.
    Preemptive and kataran like this.
  2. #2  
    For now, I've set Offline Mode to be hard-coded as "On" by default, and if I want to do a sync, I have to turn it off. At the next launch, it will be back on again. I can see the code where they load settings, but haven't figured out how to inject a new setting into the DB yet.
    Personally I tend to use enyo.setCookie() and enyo.getCookie() (Enyo API Reference) for small things like settings...as they're very easy to use, and more than capable for this specific purpose. (although I don't mind the 'sync only manually' solution)
    Preemptive and jonwise80 like this.
  3.    #3  
    Quote Originally Posted by Misj' View Post
    enyo.setCookie() and enyo.getCookie()
    Cookies are exactly what I need. The Amazon code has a very comprehensive database of states and settings that was totally overkill. Thanks!
    Looking forward to learning more Enyo - I added the resource you provided to the documentation project repo.
    Last edited by jonwise80; 12/04/2018 at 10:46 PM.

Similar Threads

  1. Why is Palm beaten to the punch -- again?
    By Daedalus in forum The 'Off Topic' Lounge
    Replies: 5
    Last Post: 04/27/2005, 07:52 PM
  2. New photos of the BenQ P50 - the only real threat to the Treo 6xx rule
    By zehubert in forum General News & Discussion
    Replies: 5
    Last Post: 10/08/2004, 09:26 AM
  3. App to send an SMS at a scheduled time??
    By ziphem in forum Palm OS Devices & Apps
    Replies: 3
    Last Post: 07/25/2004, 01:56 PM
  4. Added to treo1.com!
    By treo1 in forum Marketplace
    Replies: 2
    Last Post: 11/18/2003, 07:23 PM
  5. How to have two Palms at the same time
    By mgauss in forum Other OS's and Devices
    Replies: 3
    Last Post: 07/19/2003, 10:58 PM

Posting Permissions