RunAppAtTime

Discussion in 'Questions (Windows Mobile)' started by Cableguy, May 25, 2007.

  1. Cableguy

    Cableguy Expert Licensed User

    Hi,

    I had an idea for an app but need to shed some light on a few questions.

    In order to fire an event or app in a speciffic time, the app must be running...right?

    How to implement a run on startup, but on background, not showing any form?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    The application doesn't need to run in order to be launched at a specific time or after a specific event.
    Note however that not all devices support RunAppAtEvent / RunAppAtTime methods.
     
  3. Cableguy

    Cableguy Expert Licensed User

    I tried a simple example and got this error:

    hrd.runappattime("iazip.exe",t)
    error description:
    cannot set notification handler

    Does this mean that my device doesnt support runappattime event?
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    I'm not sure.
    Your arguments may be wrong.
    Where is iazip located?
    Is t a legal time?
    Try this:
    hrd.RunAppAtTime(AppPath & "\iazip.exe",TimeAdd(now,0,5,0))
     
  5. Cableguy

    Cableguy Expert Licensed User

    Im thinking about my next project...
    Something like a "bill reminder"...That would run in background and at given times would pop-up and alert the user...and then go background again...
    In v4 an app that didn't show a form by the end of the app_start sub would be ended, is this true in v5?This make my idea almost impossible to achieve...Any workaround?
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    You will need to use RunAppAtTime each time to set a notice for the next time.
     
  7. Standa

    Standa Member Licensed User

    Qtek 9000 and RunAppAtEvent problem

    Hi, when I try

    hw.RunAppAtTime(AppPath & "\program.exe", TimeAdd(Now,0,0,20))

    everything is ok, but when I try this...

    hw.RunAppAtEvent(AppPath & "\program.exe", hw.evOnACPower)

    nothing happens, when I connect charger. Does it mean, that in Qtek 9000 is not this feature supported?
     
  8. Erel

    Erel Administrator Staff Member Licensed User

    Apparently it is not supported.
     
  9. Standa

    Standa Member Licensed User

    Ok. And is here some way, how to fix it? In dzHw.dll, GetACLineStatus works good for me, so I think, that this is possible, right?
     
  10. Erel

    Erel Administrator Staff Member Licensed User

  11. Standa

    Standa Member Licensed User

    Good idea :)
    With Check Notification, I found, that this event is stored successufully (Notify Type: CNT_EVENT, Event Type:ON_AC_POWER, Argument: AppRunAtAcPowerOn).
    Does it mean, that my pda ignores it?
    (For example - event evWakeup works good)
     
    Last edited: Feb 15, 2008
  12. Erel

    Erel Administrator Staff Member Licensed User

    Unfortunately yes.
     
Loading...