02-24-2010 01:51 AM
02-24-2010 01:55 AM
ya i did lik that only...
now not getting exception........... but application is struct ..
when ever it receives new mail,application is structed
i need to restart handset every time
02-24-2010 04:54 AM
I suspect a lot of the problems you are having are related to the fact that you are attempting to process a message in a listener, that is not actually running in your own process. This has a number of impacts, for example access to shared static variables and the User through the UI.
So instead I suggest you use the much safer mechanism of only having your listener forward the information to your Application using a Global Event, then your applicatin can deal with it and manage the UI interaction without screwing up the email processing on the device.
Here is a KB article that talks about Global Events.
What Is - Global Events and Global Event Listeners
Article Number: DB-00145
BTW I have no idea what this means:
"when ever it receives new mail,application is structed"
03-04-2010 10:19 PM - edited 03-04-2010 10:22 PM
thanks for the reply....
now the application is working fine...
but on exiting the application,the listener continues to listen incoming mails.
does anyone knows how to stop listening ?
i overrided the OnClose() method.
i used this code for listening mails and updating foreground ..
03-04-2010 10:24 PM