Hi,
I would like to develope some application which traces outgoing sms. The application will work in background and some AO object will listen on outgoing sms events. Which API should I choose? Is there any available example?
Regards,
john
Hi,
I would like to develope some application which traces outgoing sms. The application will work in background and some AO object will listen on outgoing sms events. Which API should I choose? Is there any available example?
Regards,
john
See FN SMS example v2. By modifying it a little bit you can observe, for example, the sent items.
One thing to remimber is the log engine. You can use it to retrieve information also. I can't tell you how "realtime" it is but I don't think there's a big time gap for a send SMS to appear in the log.
Thanks for quick answer pkosonen. I tried to use log engine with no success. I set variouse gap time for receiving new event in database but still I got nothing.
I whould like to see the example code which solved my problem using log engine. Outgoing calls mechanism works like charm but at outgoing sms I stack.
Regards,
JM
Hi, FN has a log example
http://www.forum.nokia.com/info/sw.n..._v1_0.zip.html
It shows pretty much all log events.
In my opinion the capability WriteDeviceData is not needed so self signing is enough.
Hi again,
I have noticed two things. I use HandleSessionEventL method for notification of events from a Message Server session. I handle EMsvEntriesMoved, but this event isn't work in emulator. All sent messages are failed and occured at Outbox, that why my solution won't work. How can I configure emulator to emulate sending sms properly? Nevertheless, solution for outgoing sms I metioned isn't good enought becouse when I disable option for leaving sent items my program won't count outgoing sms anymore. As I metioned, I tried to use logview mechanism but doesn't work properly. Below it is some pseudo output code from AO, maybe I do something wrong.
void
MyAO::RunL()
{
case TNotify:
{
TBool bRet = EFalse;
iAsyncStatus = TViewLog; // informs observer that
//refreshes the view for the specified recent event list
TRAPD (err, (bRet =
iLogViewRecent->SetRecentListL(KLogNullRecentList,iStatus)) );
if (err == KErrNone && bRet != EFalse)
{
SetActive();
}
else
{
Notify();
}
}
break;
case TViewLog:
// check here what event occured in log database and inform observer
// and change iAsyncStatus to Idle
break;
}
void
MyAO::Notify()
{
if ( IsActive() )
{
Cancel();
}
iAsyncStatus = TNotify;
iLogClient->NotifyChange(0, iStatus); // <- I thing the problem is right here in
// request notification of changes to the
// Log Engine database. I set first argument to 1000000 as
// example shown from nokia forum and no success
SetActive();
}
Regards,
JM