Results 1 to 7 of 7
  1.    #1  
    so sorry for my poor English.I am writing a ebook app and I wanna save the current read position to the html5 database.But how can I do that in the ebooks app's deactivate function.
    It says that there isn't enough time to save data when scene is deactivated on palm's website.But after reading Preader's code, I found this app saving data in the scene's deactivate function.Why? Could someone kindy guy help me?
  2. #2  
    Why not just save it on scroll? If you use a real HTML5 database, it's just updating one field with something like "y-position".
    Last edited by Planesdragon; 06/25/2010 at 09:23 PM. Reason: y, not x. Y is up and down, x is left to right...
    Doug Meerschaert
    NoInsultSoftware.com

    Apps: Scratch, GasMath, CheckMath
  3. pomokey's Avatar
    Posts
    526 Posts
    Global Posts
    540 Global Posts
    #3  
    if you save it with a cookie, there should be enough time. if you are using Mojo's depot, it is very slow, and there is not enough time.

    but yes, it would work better if it was saved as soon as the reader's position changed.
    neathings - neatˇthings and apps for webOS
  4.    #4  
    But if read more than one book by the ebook app, it needs to save all the books' information(include every book's current read position).so it's not enough to use cookie to save all the information.I think the database the better choice.And the preader does the same work.Could some one tell me the reason?Thank you so much.
  5.    #5  
    could somebody help me? Thanks a lot!
  6. pomokey's Avatar
    Posts
    526 Posts
    Global Posts
    540 Global Posts
    #6  
    instead of worrying about how to save it when the app exits, simply change how your app function. either save it when the user changes position, or use a cookie.

    When you say the cookie can't hold everything, I don't expect you to store the entire book into the cookie, just the page position. You can either use one cookie to store all of your books positions, (which will eventually hit a limit) or you can use one cookie per book.

    as a side note, I haven't looked through preader's source code, so I don't know how i functions, but perhaps it's doing something different that you are missing. perhaps you need to read it more carefully?
    neathings - neatˇthings and apps for webOS
  7.    #7  
    Somehow I agree with you,pomokey.I will attempt to use a cookie to store all the books' current read position

Posting Permissions