×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    24

    [moved] sms counter

    i am a new to symbian C++. i would like to know if it is possible to do a sms counter application for s60 3rd ed.

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: sms counter

    Welcome to the DiBo :-)

    Yes it is possible, a nice starting point would be the wiki,

    http://wiki.forum.nokia.com/index.php/SMS_Operations
    Cheers,
    Mayank

  3. #3
    Registered User
    Join Date
    Jun 2008
    Location
    India
    Posts
    1,048

    Re: [moved] sms counter

    Quote Originally Posted by CLX21 View Post
    i am a new to symbian C++. i would like to know if it is possible to do a sms counter application for s60 3rd ed.
    what do you mean by sms counter application? Is it a universal name for some kind of application? please tell me i want to know. Remember one thing always be specific on your problem .

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,737

    Re: [moved] sms counter

    If you want to count the SMS-s in your Inbox, the following snippet may already do that
    Code:
    CMsvSession *session=CMsvSession::OpenSyncL(*this);
    CleanupStack::PushL(session);
    CMsvEntrySelection *selection=new(ELeave)CMsvEntrySelection;
    CleanupStack::PushL(selection);
    CMsvEntryFilter *filter=CMsvEntryFilter::NewLC();
    filter->SetMtm(KUidMsgTypeSMS);
    session->GetChildIdsL(KMsvGlobalInBoxIndexEntryId,*filter,*selection);
    TInt count=selection->Count();
    CleanupStack::PopAndDestroy(3); // filter, selection, session
    and count will contain the number of SMS-s in the Inbox.

  5. #5
    Registered User
    Join Date
    May 2009
    Posts
    24

    Re: [moved] sms counter

    oh sorry. i want to noe how to calculate the amount of sms have been sent out.

  6. #6
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: [moved] sms counter

    Quote Originally Posted by CLX21 View Post
    oh sorry. i want to noe how to calculate the amount of sms have been sent out.
    Well you just need to modify the code by wiz to use KMsvGlobalOutBoxIndexEntryId for reading messages in the outbox and KMsvSentEntryId for reading from the sent folder.
    Cheers,
    Mayank

  7. #7
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,737

    Re: [moved] sms counter

    Note that there is a setting in the Messaging application which limits the number of messages saved in the Sent folder.

  8. #8
    Registered User
    Join Date
    May 2009
    Posts
    24

    Re: [moved] sms counter

    ok. thx guys. but wat if i deleted some sent msg , will it affect e counter?

  9. #9
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: [moved] sms counter

    Yes it will, coz the counter will read only what is there in those folders,maybe you can write a watcher which notifies you when a message has been deleted/is being deleted from the sent folder, though I havent written code for this one so I am not sure how that would work, but something worth trying.
    Cheers,
    Mayank

  10. #10
    Registered User
    Join Date
    May 2009
    Posts
    24

    Re: [moved] sms counter

    ok. but i do not know how to do a watcher. do u have example?

  11. #11
    Registered User
    Join Date
    May 2009
    Posts
    24

    Re: [moved] sms counter

    need help for a sent sms watcher that mointer sent sms.

  12. #12
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,737

    Re: [moved] sms counter

    Track/log events in HandleSessionEventL, and you will see what events you get when sending an SMS.

  13. #13
    Registered User
    Join Date
    May 2009
    Posts
    24

    Re: [moved] sms counter

    hi, i have place some codes in HandleSessionEventL but is not working. need help. thx.

    Code:
    case EMsvEntriesMoved:
    			{
    			// Entry id is obtained from the session event arguments.
    			TMsvId* entryId = STATIC_CAST( TMsvId*, aArg2 );
    			// We are interested in messages that are moved to Sent Item Folder
    			if (*entryId == KMsvSentEntryId)
    				{
    						CAknGlobalNote* dialog = CAknGlobalNote::NewLC();
    						TBuf<250> msg;
    						msg.Append(_L("Sent"));
    						dialog->ShowNoteL(EAknGlobalInformationNote, msg);
    				}
    			break;
    			}
    is this right?

  14. #14
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,737

    Re: [moved] sms counter

    When I suggested "Track/log events", I meant getting a debugger or creating a logfile and checking what was happening. Instead of that you decided to try a single possible combination out of many. You say it does not work, and I have no reason to doubt your words.

Similar Threads

  1. Replies: 1
    Last Post: 2009-03-29, 15:04
  2. [moved] Register a sms command in the interceptor??
    By newbie2201 in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2009-01-18, 11:04
  3. [moved] SMS Delivery
    By ssn.kishore in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2008-06-24, 08:59
  4. Replies: 1
    Last Post: 2005-12-01, 23:57

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×