×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Nov 2007
    Location
    Dhaka
    Posts
    110

    TMsvId of SMS to SMS index

    We can easily get the TMsvId of SMS by providing the parent TMsvId and the SMS index.
    Is there any way to get the sms index by providing the TMsvId of the SMS (and or TMsvId of the parent)?

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: TMsvId of SMS to SMS index

    there is no way, only way is to get the index is via reading all SMSs and comparing TMsvId to get index

  3. #3
    Regular Contributor
    Join Date
    Nov 2007
    Location
    Dhaka
    Posts
    110

    Re: TMsvId of SMS to SMS index

    I think so. Well, i'm trying.

  4. #4
    Regular Contributor
    Join Date
    Nov 2007
    Location
    Dhaka
    Posts
    110

    Re: TMsvId of SMS to SMS index

    Actually i was trying to catch the sms index by HandleSessionEventL while deleting.

    But its not working. can u pls find out the error for me?

    case EMsvEntriesDeleted:
    {
    TInt mySMSIndex;

    // Entry id is obtained from the session event arguments.

    TMsvId* entryId = STATIC_CAST( TMsvId*, aArg2 );

    // We take the created entries into a selection

    CMsvEntrySelection* newEntries =STATIC_CAST( CMsvEntrySelection*, aArg1 );

    // Process each created entry.
    for ( TInt i( 0 ); i < newEntries->Count(); i++ )
    {
    TMsvId smsID=(*newEntries)[i];

    TMsvSelectionOrdering sort;
    sort.SetSorting(EMsvSortByDateReverse);

    CMsvEntry* inboxContext=CMsvEntry::NewL(*iSession,KMsvGlobalInBoxIndexEntryId,sort);
    CleanupStack::PushL(inboxContext);

    CMsvEntrySelection* entries = inboxContext->ChildrenWithMtmL(KUidMsgTypeSMS);
    CleanupStack::PushL( entries );
    for (TInt j=0; j<entries->Count(); j++)
    {

    TMsvId entryID = (*entries)[j];
    if(smsID==entryID)
    {
    mySMSIndex=j;
    break;
    }
    }

    CleanupStack::PopAndDestroy(2);
    }

    break;

    }

  5. #5
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: TMsvId of SMS to SMS index

    as the EMsvEntriesDeleted name suggests you will get this event only after sms is deleted so might not get more info then just the MsvID

  6. #6
    Regular Contributor
    Join Date
    Nov 2007
    Location
    Dhaka
    Posts
    110

    Re: TMsvId of SMS to SMS index

    i have a list of inbox sms. i want to update the listbox after deleting any sms by other application while my application is open and in foreground. so that i need the index of the deleted sms.

  7. #7
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: TMsvId of SMS to SMS index

    i suggest you move for ( TInt i( 0 ); i < newEntries->Count(); i++ ) .. from HandleSessionEventL by just reading deleted msvid after some time you can re-read total sms inbox or use msvid to update your listbox. depending your logic.

  8. #8
    Regular Contributor
    Join Date
    Nov 2007
    Location
    Dhaka
    Posts
    110

    Re: TMsvId of SMS to SMS index

    can u pls tell me elaborately?

Similar Threads

  1. Replies: 1
    Last Post: 2009-07-08, 13:00
  2. Replies: 3
    Last Post: 2008-04-23, 18:24
  3. How to open sms/mms with TMsvId
    By bill-wang in forum Symbian
    Replies: 3
    Last Post: 2007-12-24, 08:48
  4. Replies: 2
    Last Post: 2007-04-17, 12:00
  5. problem in reading sms index
    By hosam2010 in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2005-06-12, 17:39

Posting Permissions

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