Writing a program to solve this is not difficult, just a matter of finding the API to check the status of missed calls. With Google, that is easy. The Central Repository is supposed to held the information.
// We need to query the central repository CRepository* cRepository = CRepository::NewLC(KCRUidLogs); TInt num; // Get the number of missed calls User::LeaveIfError( cRepository->Get(KLogsNewMissedCalls, num));
But my copy of S60 3rd Edition SDK, Maintenance Release (with Carbide.c++ Express) doesn't has the definition of the constant KCRUidLogs . After some searches and guessing, it turns out that many functionalities of the S60 phones are not defined in the SDK. You will need to get the SDK API Plugin from Nokia.
Anyway, I tried to add the above code into a Hello World project that I have in Carbide. And it is working fine. I also used the CPeriodic class to set a timer to wake up the program periodically. It will beep when there are missed calls.
CPeriodic* iTicker; ...... const TInt KPeriodicTimerInterval5Sec(5000000); const TInt KPeriodicTimerInterval3Min(1000000 * 60 * 3); ...... iTicker = CPeriodic::NewL(CActive::EPriorityStandard); // start the timer iTicker->Start( KPeriodicTimerInterval5Sec, KPeriodicTimerInterval3Min, TCallBack(PeriodicTimerCallBack, this));
TO DO:
- Make the program to start automatically when the phone boot up. This will probably need me to request a developer certificate from Symbian Signed to sign the application.
- Stop the application from being killed. When there is not enough memory, the OS will just kill some background programs to free up some memory for the foreground application. Need to find a way to prevent the alert program from being killed.