I have a basic SMS interception application on a windows mobile phone, currently this is a console application that hooks up the MessageReceived event of the MessageInterceptor class.
Once i've done that my program runs to compleation, my Phone will then display the 'busy circle' untill I do something else but my event handlers still get fired when i recive an SMS that match my filter.
I've tried a few other approches;
- ManagedServicesWM project from Codeplex - this was overly complicated for what I needed and turned out to be an infinite loop with a Thead.Sleep(200) so was also a waist of battery power for my applicaion.
- Doing a Console.ReadLine(); - but it seems that standard input is null for WM console apps so this did nothing.
- Using a forms applicaion - this just made my basic applicaion more complex and multithreaded with no gain, and gave my a usless form.
But none of these alternitives seem as good as my hanging console app, but that doesn't feel like the right anwser ether.
So I was wondering if any one had some other ideas on ways to implement this style of app and if I may find that at some point my application will be ended by the windows memory manager?