Hi again :P
A few time ago i created application that receive SMS. It work great. But now, I have to do same but in deamon application, that run in background. So I created a new *.h and *.cpp file(in new project of course).
That file extends MMsvSessionObserver and override
HandleSessionEventL(TMsvSessionEvent aEvent, TAny *aArg1, TAny *aArg2, TAny *aArg3)
In E32Main I wrote:
In DoStartL() I create Scheduler
GLDEF_C TInt E32Main()
CTrapCleanup* cleanup = CTrapCleanup::New();
In MainL i created object to receive SMS
LOCAL_C void DoStartL()
// Create active scheduler (to run active objects)
CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
// CleanupStack::PushL(scheduler);//it crash my app
// Delete active scheduler
CDeamonEngine extends MMsvSessionObserver.
LOCAL_C void MainL()
TRAP(err, deamonEngine = CDeamonEngine::NewL());
How to pause main thread, but don`t invoke CDeamonEngine? If I don`t use while, program will end, and if I use While, my applicatin don`t receive SMS. Have I to use ActiveObject, or create new Thread?
And other question, can i check is my Deamon is running? Not necessarily in Symbian. maybe I can check in by phone application?