QtMobility::QMessageService sending mms failed no error Symbian



  • Hi

    I am having some problems using QtMobility::QMessageService. I am able to compose and sand a mms but if the user specifies a invalid phone number or has some network issues the message fails to sand but I get no error from the QtMobility::QMessageService
    instance. The funny thing is that the QtMobility::QMessageService instance emits a state changed signal with the FinishedState instantaneously when according to the documentation this should only happen on WindowsMobile and MeeGo.

    @
    QtMobility::QMessage message = composeMsg();
    if(messageService->send(message))
    {
    ui->editor->startWaiting();
    }
    else
    ui->editor->showError();
    @

    @void MainWindow::messageStateChanged(QMessageService::State state)
    {
    if(state == QtMobility::QMessageService::FinishedState)
    {
    if(messageService->error() == QtMobility::QMessageManager::NoError)
    {
    ui->editor->noError();
    //.....-
    }
    else
    ui->editor->showError();
    }
    }@



  • I have the same problem and I cannot figure out how to solve it. I did a workaround and used compose() function instead of send() which opens a new message composer window and let the user modify the message and hit send for actually sending it.

    If someone solves the issue, please let us know :)


  • Moderators

    Just a guess: Did you add the required capabilities to your application and used a appropriate signing method for those capabilities?

    Most of these issues come down to capabilities on Symbian. We are working to make those issues more easy to spot.

    PS: compose() does not need the capabilities since the your application is not sending the message and the default sms sending application does have the required capabilities. So using compose() is the way to go if you can not get the required capabilities yourself.



  • Tobias,

    Here are the capabilities that I used:

    @ TARGET.CAPABILITIES = LocalServices ReadUserData WriteUserData NetworkServices UserEnvironment Location TrustedUI ReadDeviceData
    @

    As far as I've read on the documentation these are the capabilities needed for the messaging api.



  • @TARGET.CAPABILITY += NetworkServices
    ReadUserData
    WriteUserData
    UserEnvironment
    LocalServices@
    Those are the ones I use in my project I also tried adding Read/WriteDeviceData and using openSigned, but the issue was still there. I will give it a second try but can You please tell me how to get on-device debugging with the package I get from OpenSigned? And thank You Tobias for trying to help us solve our issue. It's also nice to know that I'm not the only one having those problems. Unfortunately compose will not work for me as I need to provide a fully custom editing widget.


  • Moderators

    Sorry, I am out of my depth now:-) I only ever program demo apps for Symbian to test Qt Creator integration with:-) I'll try to find a coworker tomorrow who knows the platform better than me.



  • Thank you Tobias for your help, it can be also a bug, in which case we should report it, but lets wait for someone with better experience on the platform.


  • Moderators

    OK, found someone:-)

    QtMobility messaging is said to require: LocalServices ReadUserData WriteUserData NetworkServices UserEnvironment ReadDeviceData WriteDeviceData. The Read/WriteDeviceData ones seem to be missing from your list. Could you try with all those capabilities?



  • I tried adding them but I still get an instant FinishedState form QMessageService. I think it assumes it has finished once it puts the message in the outbox.



  • Well I found a workaround by checking the sentbox for new messages and timingout aftere about 20[s]. It works but I know this is not an elegant nor the best solution.



  • Unfortunatly my workaround leads me to having some problems with message counting. It seems that if I call QMessageMannager::queryMessages or QMessageService::countMessages somewhere in the code i get an error when I exit the application.
    @Process 630, thread 631 stopped at 0x89ed4c: A code abort exception has occurred@



  • Still after adding the required capabilities, the sent function doesn't send the SMS message... is anything else we can try?



  • [quote author="Milot Shala" date="1290033219"]Still after adding the required capabilities, the sent function doesn't send the SMS message... is anything else we can try?[/quote]

    O so You are having a different issue than me. Send works for my I just need to keep track if the message was relay sent and not just put in the outbox.--


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.