×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Registered User
    Join Date
    Apr 2010
    Posts
    10

    Able to send MMS but not SMS using Qt Mobility Messenger

    I am using Qt Mobility Beta 1 for Symbian and deploying directly to my phone with self sign from Qt creator (i have also used open sign to test if that would help, but no luck)

    What i am trying to achieve is a simple app that just sends a hard coded message to a specified number, nothing fancy just trying out the functionality. The problem seems to be that Whenever sending a SMS it gets put into the draft folder and stays there, however MMS works just fine. I am not completely sure where the problem lies, i tried looking inside the QMessageService source file but didn't find anything unusual. It just seems to me that its probably not a coding error of some sort since then MMS would also not work.

    Here is some code to look at, and heres a topic about the same problem:
    http://bugreports.qt.nokia.com/browse/QTMOBILITY-64

    Code:
    QMap<QString, QPair<QMessage::Type, QMessageAccountId> > accountDetails;
    QMessageService theService;
    QMessageManager manager;
    foreach(const QMessageAccountId &id, manager.queryAccounts()){ QMessageAccount account(id); accountDetails.insert(name, qMakePair(type, account.id())); }
    QMessage theMessage;
    QPair<QMessage::Type,QMessageAccountId> details = accountDetails["SMS"];
    theMessage.setType(details.first);
    theMessage.setParentAccountId(details.second);
    theMessage.setTo(QMessageAddress(QMessageAddress::Phone,"0404242552"));
    theMessage.setBody("KUKKUUUULUUruu");
    bool success = theService.send(theMessage);
    pro file i used (needs to be signed with opensign when WriteDeviceData and ReadDeviceData are used however these are not required but yet they are also included in the pro file of mobility writemessage example)

    Code:
    TARGET = shaba
    TEMPLATE = app
    
    QT += network
    INCLUDEPATH += C:\S60\devices\S60_5th_Edition_SDK_v1.0\epoc32\include\middleware
    SOURCES += main.cpp\
    mainwindow.cpp
    
    HEADERS += mainwindow.h
    
    FORMS += mainwindow.ui
    CONFIG += mobility
    MOBILITY += systeminfo
    MOBILITY += messaging
    
    TARGET.CAPABILITY = NetworkServices \
    LocalServices \
    ReadUserData \
    WriteUserData \
    UserEnvironment

  2. #2
    Registered User
    Join Date
    Apr 2010
    Posts
    10

    Re: Able to send MMS but not SMS using Qt Mobility Messenger

    I'm not sure if this is worth mentioning but when i look inside the draft folder on my phone, the message which is created by my application has no body, i dont see the actual body/content of the sms this is the layout of the message:

    Code:
    04048252384
    11:00
    Once i then open the message i see the actual text, and after i close it, it asks me if i want to save or delete the message, i click save and after that the message looks like this:

    Code:
    04048252384
    11:00 Some testtext i have in the body.
    also when a message is created in the phones composer and saved to draft, you automatically see the text contained, so i was thinking that could there be something wrong with the body of the SMS which would cause this to happened, that is so far the only difference i have noticed.

  3. #3
    Registered User
    Join Date
    May 2010
    Location
    Finland
    Posts
    19

    Re: Able to send MMS but not SMS using Qt Mobility Messenger

    Ok, alot of failing later here is some more info:

    http://bugreports.qt.nokia.com/browse/QTMOBILITY-64

    So basically the error wasn't in my coding, rather in Nokias.

    I have now tested this on the following devices:

    5800, e75, e90, n97

    the problem remains on each phone, the SMS is put into the draft folder while the MMS can be sent successfully.

    I have also tested the fix publishes, without success however.

    So now i just got desperate and tried deploying my application to Maemo after i noticed it has fully mobility support, only to find out that the QT Mobility Messaging libraries were missing from the QT Nokia SDK: http://www.forum.nokia.com/info/sw.n...ia_Qt_SDK.html

    So any suggestions on how to actually send SMS on either phone are welcome, keeping in mind that the application is using Qt and this cannot be changed anymore. Im starting to get real desperate as the deadline for my application is closing up on me real fast.

  4. #4
    Registered User
    Join Date
    Mar 2010
    Posts
    7

    Re: Able to send MMS but not SMS using Qt Mobility Messenger

    Hi.

    I have encountered the this same problem and I decided to use the older Mobile Extension. The Mobile Extension third preview package contains simple Qt wrapper classes to handle sending and receiving SMS messages. The API of Mobile Extension isn’t compatible with Mobility API and hasn’t all Mobility API features but you can use it until the issues of SMS sending in Mobility API is fixed. In the end including the Mobility Extension to you project is not so big task. Here are the steps:

    1. Download the Mobile Extension third preview package and unzip it to a directory (<a_dir>).
    2. Copy “messaging” directory from <a_dir>\Mobile_extensions_preview_3\extensions\src\ to your project directory. E.g <myprojet_dir>\messaging.
    3. Edit the messaging.pri file in <myprojet_dir>\messaging directory. My .pri file looks like this:
    Code:
    symbian: {
    DEFINES += XQMESSAGING_NO_LIBRARY
    LIBS -= -lxqmessaging
    
    DEPENDPATH += messaging
    INCLUDEPATH += messaging
    
    HEADERS += xqmessaging.h \
        xqmessaging_s60_p.h \
        messaging_global.h
    
    SOURCES += xqmessaging.cpp \
        xqmessaging_s60_p.cpp
    
    LIBS += -lsendas2 \
            -lmsgs \
            -letext \
            -lefsrv \
            -lcharconv \
            -lgsmu \
            -limcm \
            -lbafl \
            -lmtur
    
    }
    4. In your project directory add these few lines to your .pro file
    Code:
    …
    include(messaging/messaging.pri)
    …
    # Don’t forget the capabilities
    symbian:TARGET.CAPABILITY = NetworkServices \
        LocalServices \
        ReadUserData \
        WriteUserData \
        UserEnvironment
    5. Use XQMessaging classes in your project.
    (6.) <a_dir>\Mobile_extensions_preview_3\doc directory contains API documentation in .zip file.

    By using Mobile Extension like this, the messaging classes are compiled into your project and no used as a lib. In Other words you do not need to Mobile Extension lib in the phone. You can even mix and match the Mobile Extension and Mobility API. I mean, sent SMS with Mobile Extension and use Mobility API to other tasks.

    Of course this is only a work around until we get fixed Mobility API.

  5. #5
    Registered User
    Join Date
    May 2010
    Location
    Finland
    Posts
    19

    Re: Able to send MMS but not SMS using Qt Mobility Messenger

    Thank you very much tomreini! I had attempted this method using various examples found online only to get General OS related errors. But now i did exactly as you mentioned and it finally worked. If anyone stumbles upon this before the 1.0.1 version is released which will fix the problem, i strongly recommend using this approach to temporarily fix the issue.

    I tried to build the qt mobility which i took from git which contains the fix, but it spit out errors:
    C:\qt-mobility-qt-mobility>make sis
    make -s -f Makefile fail_sis_nopkg
    Makefile:145: *** PKG file does not exist, 'sis' and 'installer_sis' target are
    only supported for executables or projects with DEPLOYMENT statement. Stop.
    C:\S60\devices\S60_5th_Edition_SDK_v1.0\epoc32\tools\make.exe: *** [sis] Error 2

    Don't know why i'm not able to create the SIS file.

  6. #6
    Registered User
    Join Date
    Mar 2010
    Posts
    7

    Re: Able to send MMS but not SMS using Qt Mobility Messenger

    Hi

    See the issue QTMOBILITY-64. Ted Mellin has faced the same problem.

  7. #7
    Registered User
    Join Date
    May 2010
    Location
    Finland
    Posts
    19

    Re: Able to send MMS but not SMS using Qt Mobility Messenger

    I am Ted Mellin.


    Quote Originally Posted by tomreini View Post
    Hi

    See the issue QTMOBILITY-64. Ted Mellin has faced the same problem.

  8. #8
    Registered User
    Join Date
    May 2010
    Posts
    1

    Re: Able to send MMS but not SMS using Qt Mobility Messenger

    Quote Originally Posted by Zeddeh View Post
    I am Ted Mellin.
    Haha this is funny .

  9. #9
    Registered User
    Join Date
    Mar 2010
    Posts
    7

    Re: Able to send MMS but not SMS using Qt Mobility Messenger

    Nice to meet you Ted

  10. #10
    Nokia Developer Expert
    Join Date
    Jan 2010
    Posts
    6

    Re: Able to send MMS but not SMS using Qt Mobility Messenger

    A fix for the symbian sms message sending issue will be included in the mobility 1.0.1 release, as discussed in QTMOBILITY-64.

  11. #11
    Registered User
    Join Date
    Aug 2010
    Posts
    38

    Re: Able to send MMS but not SMS using Qt Mobility Messenger

    hey i am able to send sms...using qt mobility,...and i dont think we need qt extensions for that purpose...but i am facing problem when sending mms...so please can you mail me your code...to ranjit220614@yahoo.in....thanks

Similar Threads

  1. Qt for Symbian development resources
    By liuxg in forum [Archived] Qt General ( Qt技术)
    Replies: 55
    Last Post: 2011-01-26, 04:06
  2. Is it possible to send concatenated sms in text mode.
    By Thirunavukarasu in forum General Messaging
    Replies: 1
    Last Post: 2009-05-22, 09:57
  3. Send sms and mms
    By gaurav.gupta in forum Symbian
    Replies: 6
    Last Post: 2009-03-27, 04:40
  4. send mms through sms
    By fightingnow in forum General Messaging
    Replies: 0
    Last Post: 2006-06-08, 01:59
  5. how to send MMS via persnal wap server?
    By jiangpo in forum General Messaging
    Replies: 4
    Last Post: 2003-06-05, 10:06

Posting Permissions

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