×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jul 2003
    Posts
    37

    How to get sms sender number?

    Hi all,
    I've tried gdsms example for Nokia series 60 phone (that ajaykapur gave in this forum).
    It's can receive incoming sms. But it compare the content of sms to catch incoming sms.
    How to get the sender number from incoming sms? Does anyone can help me to solve this problem?

    Thank you very much...

  2. #2
    Super Contributor
    Join Date
    May 2005
    Location
    Hyderabad,India
    Posts
    704
    void CMsgObserverAppUi::HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* /*aArg3*/)
    {
    switch (aEvent)
    {
    case EMsvServerReady:
    // Initialise iMsvEntry
    if (!iMsvEntry)
    {
    iMsvEntry = CMsvEntry::NewL(*iMsvSession, KObservedFolderId, TMsvSelectionOrdering());
    }
    // notify the user with a InfoWin
    iMtmReg = CClientMtmRegistry::NewL(*iMsvSession);
    break;

    case EMsvEntriesCreated:
    // Only look for changes in the Inbox
    if (*(static_cast<TMsvId*>(aArg2)) == KObservedFolderId)
    {
    CMsvEntrySelection* entries = static_cast<CMsvEntrySelection*>(aArg1);
    iNewMessageId = entries->At(0);
    }
    break;


    case EMsvEntriesChanged:
    // Only look for changes in the Inbox
    if (*(static_cast<TMsvId*>(aArg2)) == KObservedFolderId)
    {

    CMsvEntrySelection* entries = static_cast<CMsvEntrySelection*>(aArg1);

    if (iNewMessageId == entries->At(0))
    {
    // It's the same message we received the EMsvEntriesCreated event for

    // Set entry context to the new message
    iMsvEntry->SetEntryL(iNewMessageId);

    CSmsClientMtm* specificMtm = STATIC_CAST(CSmsClientMtm*,iMtmReg->NewMtmL(KUidMsgTypeSMS));

    specificMtm->SwitchCurrentEntryL(iNewMessageId);
    specificMtm->LoadMessageL();

    iEikonEnv->AlertWin(specificMtm->SmsHeader().FromAddress());

    }



    this code will help you

    eswar

Posting Permissions

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