Page 3 of 3 FirstFirst 123
Results 41 to 50 of 50
  1. #41  
    I was poking around over at wiki dev and I found the following code:

    Code:
    [KeepAlive]
    Applications=com.palm.app.phone
    
    [KeepAliveUntilMemPressure]
    Applications=com.palm.app.browser
    I realize it might require a hack, but I bet if you put your app in there it might keep it from stopping occasionally.

    That stuff is on this page:
    pre dev wiki: Tidbits
  2. #42  
    sorry to hijack this thread, but i wanted to let people know about

    http://forums.precentral.net/web-os-...timer-app.html

    i am in no way affliated with timer on a stick

    i dont seem to have a problem with the timer or stopwatch stopping when the card is switched away or the screen turned off. as a matter of fact, i have the timer running in a minimized card and it's still going. so for anyone that thinks webos isn't multitasking, it really is. FYI, the reason other apps stop working (i.e. youtube) when minimized is because it's coded to behave that way to save on power. its a palm suggested best practice to reduce processing when not in context. i haven't done it with my app yet, and it may depend on user feedback. i actually like see the app update even when minimized.

    i just quickly glanced at your source code, and one suggestion. try something like this:

    this.interval = this.controller.window.setInterval(
    function(){
    DO WHATEVER YOU DO TO UPDATE YOUR DISPLAY
    }.bind(this), 1000);

    see if that gets your timer to keep working
    Last edited by sambao21; 07/09/2009 at 09:13 AM.
  3. phillipah's Avatar
    Posts
    95 Posts
    Global Posts
    96 Global Posts
    #43  
    nice app
  4. dsevil's Avatar
    Posts
    211 Posts
    Global Posts
    218 Global Posts
       #44  
    Quote Originally Posted by sambao21 View Post
    this.interval = this.controller.window.setInterval(
    function(){
    DO WHATEVER YOU DO TO UPDATE YOUR DISPLAY
    }.bind(this), 1000);

    see if that gets your timer to keep working
    This minor alteration to my existing window.setInterval call doesn't solve my problem, but thanks.

    Now that the SDK is out, I can install apps on my Pre again without wanting to rip my eyes out, and I'm gonna cook with gas!
  5. dsevil's Avatar
    Posts
    211 Posts
    Global Posts
    218 Global Posts
       #45  
    Quote Originally Posted by sambao21 View Post
    i dont seem to have a problem with the timer or stopwatch stopping when the card is switched away or the screen turned off.
    You're relying on JavaScript "new Date()" calls; I'm decrementing a counter each time the function passed to setInterval is called. That's why your app works.

    My only issue is that in the admittedly rare circumstance that the phone resyncs its time after having been out of sync for quite a while, the results will be a few seconds off (or how out of sync the clock got).

    I think I actually *like* your app better than mine.
  6. #46  
    Possible to add a day column?
  7. #47  
    Decrementing a counter each time the timer fires will make your clock run slow. You need to check the system clock every time. Timer events are never guaranteed to fire immediately.
  8. #48  
    Quote Originally Posted by dsevil View Post
    ...I think I actually *like* your app better than mine.
    Thanks man. Made my day.
  9. #49  
    need this thanks
  10. #50  
    Awsome app. Thank you very much.
Page 3 of 3 FirstFirst 123

Posting Permissions