Pregunta

I have a mobile application on a windows ce 6.0 device. The device sometimes is sent to suspend by a hardwarebutton. I want to do some tasks, as soon, the device is resumed.

Is it possible to check in a .net cf-program, if the device was resumed?

Thanks!

¿Fue útil?

Solución 3

Thanks for your answers...

On further reasearching I found a event in OpenNETCF, fitting just my needs.

The event OpenNETCF.WindowsCE.PowerManagement.PowerUp is fired, when resuming a device - everything works fine here...

Otros consejos

According to this previous question, it's not possible without resorting to P/Invoke or a 3rd-party library.

Yep. you have to subscribe to the PowerNotification queue and then watch for the resume event that is fired after the suspend/resume cycle. Here is a CF class that implements this without the OpenNetCF monster: http://win-mobile-code.googlecode.com/svn/trunk/NotificationList/NotificationsList/PowerNotifications.cs

The above is part of my 'What wakes up your device' article at http://www.hjgode.de/wp/2013/05/13/mobile-development-manage-the-event-db-what-wakes-up-your-device/

But use OpenNetCF if you need more of the functionality implemented by OpenNetCF.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top