locked
How to start my application when device restart RRS feed

  • Question

  • Hi all ..

    I need to know how to start my application when the device wake up or restart ??

    I found this code for OpenNetCF but I don't know how to use it .

    If anyone can illustrate this with code , it will be appreciated.

    OpenNETCF.WindowsCE.NotificationEvent.Wakeup()

    Q: Is there a difference between Wake Up and Restart ??

     

    Many thanks in advance.

     

    Friday, March 26, 2010 1:13 AM

Answers

  • Autolaunching an Application on Windows Mobile:

    http://www.j2i.net/BlogEngine/post/2008/08/13/Autolaunching-an-Application-on-Windows-Mobile.aspx

    Difference between Wake-up and restart:
    - When the device goes to sleep, it enters powers saving mode by turning off display and probably putting some applications in suspend state too. Bringing back device from this state, for e.g by clicking a button, is called wake-up. So basically its a transition from low power state to full power. When the device is in sleep mode it is not completely dead, few critical processes are still running on the device and that is how the device automatically wakes up during an incoming call, without user intervention.

    - By restart I think you mean a soft restart. A soft reboot is just like a regular PC restart. You switch off the device and switch it on again, no settings are lost. A hard reboot on the other hand is like factory restore. If you hard boot a device then all the user settings on the device are lost, the device is as good as new, like when you bought it.



    Prabhu
    www.geekswithblogs.net/techtwaddle

    Friday, March 26, 2010 3:01 AM
  • Hi Ashraf,

    Please see link below for creating cab file.

    http://msdn.microsoft.com/en-us/library/aa446504.aspx

    Now for adding Startup folder do following

    In Solution Explorer ,

    Select Cab project --> File System Editor --> Right click "File System On Target Machine" --> Select "Add special folder"--> select "Start up Folder".

    After this Right Click on your appl exe & select "Create Shortcut to primary output". It will generate shortcut & drag-drop that shortcut to "Startup folder"

     

     

    Hope this will help you.

     


    Thanks, Mohsin Shaikh. If you find my post is helpful for you then mark it as answer.
    Monday, March 29, 2010 4:30 AM

All replies

  • Autolaunching an Application on Windows Mobile:

    http://www.j2i.net/BlogEngine/post/2008/08/13/Autolaunching-an-Application-on-Windows-Mobile.aspx

    Difference between Wake-up and restart:
    - When the device goes to sleep, it enters powers saving mode by turning off display and probably putting some applications in suspend state too. Bringing back device from this state, for e.g by clicking a button, is called wake-up. So basically its a transition from low power state to full power. When the device is in sleep mode it is not completely dead, few critical processes are still running on the device and that is how the device automatically wakes up during an incoming call, without user intervention.

    - By restart I think you mean a soft restart. A soft reboot is just like a regular PC restart. You switch off the device and switch it on again, no settings are lost. A hard reboot on the other hand is like factory restore. If you hard boot a device then all the user settings on the device are lost, the device is as good as new, like when you bought it.



    Prabhu
    www.geekswithblogs.net/techtwaddle

    Friday, March 26, 2010 3:01 AM
  • Many thanks Prabhuk for your reply and your help .

    I'm making a missed call reminder , so I need my program to be running all the time , so when

    the user switch off his device and turn it again , I want my program to start automatically just

    like we do in Windows . And if the device goes to sleep means that my program will close

    I need it to start again.

     

    So I need to know how to do that with OpenNetCF .... If you can help me that would be appreciated.

     

    Many thanks in advance.

    Friday, March 26, 2010 4:05 AM
  • Hi Ashraf,

    In cab file project you can put your  applications  shortcut in special folder named as "Startup Folder". It will automatically start your app. after restarting device.

     

    Hope this will help you.

     

     


    Thanks, Mohsin Shaikh. If you find my post is helpful for you then mark it as answer.
    Friday, March 26, 2010 4:53 AM
  • Many thanks Mohsin S ...

    But can you tell me how to create a Shortcut to my program.

    And how to put it into "Startup Folder"

    Many thanks in advance.

    Saturday, March 27, 2010 3:53 PM
  • Hi Ashraf,

    Please see link below for creating cab file.

    http://msdn.microsoft.com/en-us/library/aa446504.aspx

    Now for adding Startup folder do following

    In Solution Explorer ,

    Select Cab project --> File System Editor --> Right click "File System On Target Machine" --> Select "Add special folder"--> select "Start up Folder".

    After this Right Click on your appl exe & select "Create Shortcut to primary output". It will generate shortcut & drag-drop that shortcut to "Startup folder"

     

     

    Hope this will help you.

     


    Thanks, Mohsin Shaikh. If you find my post is helpful for you then mark it as answer.
    Monday, March 29, 2010 4:30 AM