I have created a console application which will autostart when the device reboots. (using Startup List Management API)
I have created a CConsoleBase object in it. Now, the main functionality of this application is to receive SMS.
I have created a class which inherits from MMsvSessionObserver and I have implemented the HandleSessionEventL() method of MMsvSessionObserver class.
I have used console object and used it as follows to keep the application running. Look at the following method...
//create an object which will receive the SMS...
CICESMSObserverClass *ReceiveSMS = CICESMSObserverClass::NewL(console);
TKeyCode k = console->Getch();
while(EKeyDevice0 != k)
if(k == EKeyDevice0)
k = console->Getch(); //Keep the application waiting here...
Now the problem is...
1.) I am not able to receive the SMS. (Please see the application is waiting at the last line above)
2.) What is the flow of the execution when the SMS arrives. There is no other thread running...
3.) I don't want console in my application. I don't need the console or in other words I don't want any UI for this application. So, the above approach needs to be changed in the production version. So, how do I keep my application running without the console?
4.) What if I put an infinite while() loop? I don't want my application to terminate at all. It will be running continuously. What is the best design for this implementation?
Your help and time is much appreciated.