locked
How can I get startupreason on Window Mobile RRS feed

  • Question

  • Hi all

          I'm implementing an application on Window Mobile. I don't know to get the startupreason by using platform APIs. Please help me if you have experience on this issue.

          On Symbian platform, I can use Symbian APIs to get this value. And returned value is "Cold" or "Warm".

          I've checked Window Mobile APIs and I don't see any APIs support to get this value.

    Thanks
    Monday, August 24, 2009 8:56 AM

Answers

  • Hi,

    You could implement your own mechanism for this. If you create a file the first time your application runs then if you run your application after a cold boot then this file may not exist therefore you know your device has cold boot (on older devices running pre WM5 a cold boot would remove files from your devices). If you run your application and the file does exist then you know your device has warm booted.

    Hope this helps.

    Paul Diston
    http://www.smartmobiledevice.co.uk/
    Monday, August 24, 2009 9:04 AM

All replies

  • Hi,

    You could implement your own mechanism for this. If you create a file the first time your application runs then if you run your application after a cold boot then this file may not exist therefore you know your device has cold boot (on older devices running pre WM5 a cold boot would remove files from your devices). If you run your application and the file does exist then you know your device has warm booted.

    Hope this helps.

    Paul Diston
    http://www.smartmobiledevice.co.uk/
    Monday, August 24, 2009 9:04 AM
  • Hi Paul

            I'd like to describe your idea again. Do you mean I should catch an event from system when I reset device by "cold" or "warm" and create or delete a file. If the file does exists, my device has warm booted. Otherwise, my device has cold booted.

    Is it right?

    Thanks

    Nam
    Monday, August 24, 2009 9:10 AM
  • Hi,

    This is a basic way to achieve what you are after. It is just a case of checking the existance of a file when your application first starts.

    Thanks

    Paul Diston


    http://www.smartmobiledevice.co.uk/
    Monday, August 24, 2009 9:13 AM
  • Hi Paul

    Your idea looks good to me.

    Thanks for your help :)

    Nam Phan

    -------------------

    http://www.globalcybersoft.com



    Monday, August 24, 2009 9:16 AM