×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Aug 2004
    Posts
    13

    Question Comparing received mobile number to defined number

    Hi,

    I have been reading other colleques same questions & answers, but not been succesfull implementing them.

    I want compare received sms message sender phone
    number to defined number.

    // Here I get sender phone number
    TBuf<40> tempMessage1;
    tempMessage1.Copy(msvEntry.iDetails);

    // here i define the number where to I want compare
    _LIT(KOikeaNro,"+358501234567");
    TBuf<15> str(KOikeaNro);

    // Here I dump the received phone number into ibuf
    TBuf<15> ibuf; //(KVastOtettu);
    ibuf.Append(tempMessage1);

    // This should return 0 if True, it want work
    TInt apu = str.Compare(ibuf);
    if(apu == 0)
    {
    // do something
    }

    No error messages, but It wont match evethough
    I see that the sender Phone numder is exactly correct

    Where should I look ??

    BR - j

  2. #2
    Registered User
    Join Date
    Aug 2004
    Posts
    13

    Hi solution

    Hi,

    I found the solution.

    I need to copu both of them same manner into TBuf
    after that make comparison, that is doing the job.

    Thank you

    J

Posting Permissions

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