May 13, 2013, 16:36
The event db (it is my naming) holds all events and actions that can be invoked to launch an app or fire some events.
NotificationList
The tool shows all known notifications on a WM device. You can browse the event db and examine the defined events. Additionally the tool shows power change notifications.
In the mid window above you can see there is a timed event that will occur at 0:00 and start \windows\calupd.exe. This will wake your device all night and update the calendar entries for re-occurring schedules etc.
The right window shows the power notifications on a suspend/resume cycle.
Using the options menu you can save a list of the defined notification events.
Continue reading ‘Mobile Development: manage the event db, what wakes up your device’ »
July 14, 2009, 14:55
Hello
for some reason you might want to rerun an application very day or every hour. In commercial applications, one may want to let the device sync data every 4 hours, So you need an application that runs periodically at specified times or intervals. As this first sounds easy, it is not as simple as you mean.You cannot simply use timers, timers will not continue to run within Suspend mode.
To have an application run at specific times, Windows Mobile supports a notification database. Your device will already wake up periodically to reschedule events and to clean up the notification database. Normally, Windows Mobile Phone devices will awake every night at 0:00.
There are also some other possible notifications that can launch an application, see my old web site.
How can we do a scheduled application ourself? At first run, the scheduler application has to delete all previous notification entries of the notification database. Then it has to create a new timed notification and in our sample, it will then launch another application. The scheduler application itself should be small and only care about the schedules. The worker application can be what you want and will be started by the scheduler application.
Continue reading ‘Howto run an application periodically’ »
Tags:
notification,
periodically,
power state,
resume,
schedule,
SetPowerRequirement,
SetSystemPowerState,
suspend,
SystemIdleTimerReset,
thread,
timer Category:
CodeProject,
Programming |
5 Comments
June 14, 2009, 08:09
A threaded form uploader app in C#
Recently I had to do an app that watches a dir for new files and then uploads them to a DocuShare server using http form post.
I was told, that it is very easy to use form post from code and decided to do the app in C#. Unfortunately, it was not that easy to find code that does uploads via form post, especially for Compact Framework (CF). Maybe it is easier in JAVA, but for JAVA I had to install a JAVA VM onto the windows mobile 6.1 device and for CF all runtimes are already on the device. I searched the internet for valuable form post code in C# and found one titled ‘C# is the better JAVA‘.
OK, this code looked good and i tried it within Compact Framework. After changing the functions to ones available in CF, the code runs fine. As you know, CF does not have the same full featured functions as the .Net Framework for PCs.
Continue reading ‘Windows mobile worker thread to post form data using a queue’ »