×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    26

    how to send sms message?

    me again, with semi-stupid questions...

    how to send sms using qt mobility?

    i followed this:
    http://wiki.forum.nokia.com/index.ph...ng_Qt_Mobility

    but, on build i get some weird errors - QMessageServiceAction and QMessageId does not define typename. when i include <QMessageId>, second error is gone, but first remains...

    I have nokia qt sdk with mobility installed, and on other pc i have latest symbian sdk (4.7.1) and mobility 1.1.0, same error....

  2. #2
    Regular Contributor
    Join Date
    Dec 2010
    Posts
    142

    Re: how to send sms message?

    Do as you done with first case. include required header files.

  3. #3
    Registered User
    Join Date
    Jan 2009
    Posts
    26

    Re: how to send sms message?

    yes, i did everything, just like in wiki...
    i tried to remove QMessageServiceAction (and slot), but then compiler returns error for QMessage :S

    now i am trying to reinstall sdks - 5th ed and qt sdk...

  4. #4
    Registered User
    Join Date
    Jan 2009
    Posts
    26

    Re: how to send sms message?

    anyone?
    i reinstalled entire qt sdk - i uninstalled everything, then i intalled perl (strawberry), then 5th ed sdk, then nokia qt sdk package (930 mb)...
    then i ran updater, and installed qt creator 2.1 rc

    and i changed QMessageServiceAction to QMessageService (everything else is like in wiki link i posted earlier), and i get this errors:
    Code:
    In file included from ..\smstest\main.cpp:1:
    ..\smstest\/mainwindow.h:41: error: 'QMessageService' does not name a type
    ..\smstest\/mainwindow.h:42: error: 'QMessageId' does not name a type
    ..\smstest\/mainwindow.h:45: error: 'QMessageService' has not been declared
    ..\smstest\/mainwindow.h:45: error: expected ',' or '...' before 's'
    first error - QMessageService msgAction;
    second - QMessageId msgId;
    third - void messageStateChanged(QMessageService::State s);
    fourth - same line as third...

    it's a bit urgent now...

    or does anyone have FUNCTIONAL code to send sms message using "oldschool" symbian c++?

  5. #5
    Regular Contributor
    Join Date
    Dec 2010
    Posts
    142

    Re: how to send sms message?

    Did you included the necessary headers in your mainwindow.h file?

    if not, include following in mainwindow.h

    Code:
    #include <QMessageService>
    #include <QMessageId>

  6. #6
    Registered User
    Join Date
    Jan 2009
    Posts
    26

    Re: how to send sms message?

    yes, i did.
    it is not underlined yellow (when i intentionally misstype some of includes, i got yellow underlines)...

  7. #7
    Registered User
    Join Date
    Jan 2009
    Posts
    26

    Re: how to send sms message?

    ok, i forgot to use qtm_namespace

    but now i get this error:
    \mainwindow.cpp:198: error: expected primary-expression before '.' token

    in first line of snippet:
    Code:
    if(QMessageService.send(msg) == true){
            msgId=msg.id();
            QMessageBox::information(this,"","success");
    
        }else{
            QMessageBox::critical(this,"","error");
        }

  8. #8
    Regular Contributor
    Join Date
    Dec 2010
    Posts
    142

    Re: how to send sms message?

    Use QMessageService instance variable from class. Suppose in class header you have

    QMessageService msgService;

    Than your code will look like

    if(msgService.send(msg) == true)

  9. #9
    Registered User
    Join Date
    Jan 2009
    Posts
    26

    Re: how to send sms message?

    thanks, works like a charm...

    wiki example is pretty much outdated :/
    Last edited by blackbird700; 2011-01-16 at 12:19.

Similar Threads

  1. send sms using SMS Utility API without inputing Message Center number
    By kuddy_abc in forum Symbian Networking & Messaging (Closed)
    Replies: 5
    Last Post: 2010-07-31, 04:04
  2. -4623 Unable to send message - SMS send error
    By CowbellSoftware in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2009-09-19, 10:59
  3. Send message / send sms
    By slave89 in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2008-05-04, 11:02
  4. How can I connect to SMS message gateway to send bulk SMS
    By sonydaniel in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2004-02-27, 09:27
  5. Replies: 1
    Last Post: 2002-07-10, 09:51

Posting Permissions

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