0

I need to know the application status i.e app is in resume state,active or any..programatically in windows mobile 5,6,7 OS phones.

Please help me for that...

venky
  • 49
  • 1
  • 8
  • Not sure I understand. If the application checks it's own state, it has to be running to do so. Do you mean from a separate process? – ctacke Aug 09 '12 at 10:53
  • in a same process i need to know the app status if it in running state or pause state or dormant state etc.. – venky Aug 09 '12 at 11:07
  • Simply not possible. An app can't check anything without running code, so the process of checking would require that the app be running. Effectively this would work, just check IsRunning when you want to know. public const bool IsRunning = true; – ctacke Aug 10 '12 at 14:24
  • How to know app status in a seperate process? – venky Aug 16 '12 at 09:07

1 Answers1

0

Like Chris pointed out, you are not going to be able to check a devices state and have it tell you what it was in. If the device is dormant or not running, your code is not going to run.

However, if you are using Windows Mobile 6, you can elect to receive notifications through the State and Notifications Broker whenever your device goes from one state to another by using the RegistryNotifyApp.

There is a Using the State and Notifications Broker in Native Code example that goes into details.

This tool was not available prior to version 6 of Windows Mobile.

The newer Windows 7 Phone OS is drastically different, and I have no experience with what it is capable of.