×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Feb 2009
    Location
    India
    Posts
    123

    Listening for sms

    Hi,

    I want to develop an application in which when I send SMS from mobile my application should listen for it when message is sent. And want to retrive that sms text ,So is this posssible in Qt without using native symbian api ??
    Can any one guide me on this issue

    Regards,
    Vishal

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,347

    Re: Listening for sms

    Nokia Developer Wiki Moderation team

  3. #3
    Regular Contributor
    Join Date
    Feb 2009
    Location
    India
    Posts
    123

    Re: Listening for sms

    Quote Originally Posted by kiran10182 View Post
    Hi,

    Kiran thanks for reply,I have tried the code provided in link but nothing happens .
    I have tested the code in following way:
    I started the application and then I sent the message to this mobile , but it didn't react to it .I have placed Message box to read sms body .

    Code:
    void SmsNotify::messageAdded(const QMessageId &id, const QMessageManager::NotificationFilterIdSet &matchingFilterIds) 
    	{
        if(id.isValid()) {    
            QMessage msgReceived(id);
            QMessageContentContainer bodyPart = msgReceived.find(msgReceived.bodyId());
            // bodyPart.isContentAvailable() : returns true if there is message body
            QString bodyText = bodyPart.textContent();
            QMessageBox::information(this,"Username",bodyText);
            QString msgSender = msgReceived.from().recipient();
            QMessageBox::information(this,"Username",msgSender);
            }
        else {
            // Ignore this state
            }
        }

    And another thing QMessageStore is not working I have used QMessageManager instead.

    Code:
        private:
        QMessageManager* msgStore;
        QMessageFilter msgFilter;
        QMessageManager::NotificationFilterId msgFilterId;

    So am I doing it wrong way or I have to put some more code to get it work??,Plz can u help me ...

    Regards,
    Vishal

  4. #4
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,347

    Re: Listening for sms

    I haven't worked on that messaging API yet but I will try to get in touch with the creator of that article and he may help you further.
    Nokia Developer Wiki Moderation team

  5. #5
    Regular Contributor
    Join Date
    Feb 2009
    Location
    India
    Posts
    123

    Re: Listening for sms

    Quote Originally Posted by kiran10182 View Post
    I haven't worked on that messaging API yet but I will try to get in touch with the creator of that article and he may help you further.
    Ok kiran no problem,, I will be waiting for reply,,

    Regards,
    Vishal

Similar Threads

  1. client socket in listening mode
    By rahul.shalik.makode in forum Symbian
    Replies: 4
    Last Post: 2009-09-07, 08:58
  2. Replies: 5
    Last Post: 2008-12-07, 13:03
  3. TCP Listening Socket WLAN
    By jmeier in forum Symbian Networking & Messaging (Closed)
    Replies: 9
    Last Post: 2007-12-28, 11:42
  4. Replies: 1
    Last Post: 2007-12-10, 14:41
  5. Replies: 1
    Last Post: 2006-10-15, 12:38

Posting Permissions

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