×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Registered User
    Join Date
    Nov 2009
    Posts
    15

    QDesktopServices on Maemo

    Hi,

    I am trying to generate an email draft through the QDestopServices on Maemo, like this:

    QDesktopServices::openUrl("mailto:?body="+text);

    This works fine on my desktop, but on Maemo the browser starts first, the "mailto:" link is opened as URL and then another window opens with the new mail. Is there any plan to change this behaviour in future Qt releases? Is there currently another possibility to start a new mail with a predefined text?

    Also: I want to use the same call for SMS:

    QDesktopServices::openUrl("sms:?body="+text);

    This does not work at all without recipient, the message can not be sent. Like with mail, the browser is started, then a SMS appears but there is no possibility to add a recipient. Again: Will this work sometimes? What are the alternatives?

    Peter

  2. #2
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: QDesktopServices on Maemo

    Quote Originally Posted by p.bouda View Post
    Hi,

    I am trying to generate an email draft through the QDestopServices on Maemo, like this:

    QDesktopServices:penUrl("mailto:?body="+text);

    This works fine on my desktop, but on Maemo the browser starts first, the "mailto:" link is opened as URL and then another window opens with the new mail. Is there any plan to change this behaviour in future Qt releases?
    I do not observe such behaviour.

    Quote Originally Posted by p.bouda View Post
    Is there currently another possibility to start a new mail with a predefined text?
    You can use DBus.

    Quote Originally Posted by p.bouda View Post
    Also: I want to use the same call for SMS:

    QDesktopServices:penUrl("sms:?body="+text);

    This does not work at all without recipient, the message can not be sent. Like with mail, the browser is started, then a SMS appears but there is no possibility to add a recipient. Again: Will this work sometimes? What are the alternatives?

    Peter
    Like with email only messaging UI is started and actually this is messaging UI problem as you can verify it with DBus call:
    Code:
    dbus-send --dest='com.nokia.MessagingUI' \
               --type='method_call' --print-reply \
               /com/nokia/MessagingUI \
               com.nokia.MessagingUI.messaging_ui_interface_start_sms \
               string:"sms:?body=Test sms"

  3. #3
    Registered User
    Join Date
    Nov 2009
    Posts
    15

    Re: QDesktopServices on Maemo

    Thanks for the hint, maybe I will just try the dbus calls for e-mails. Maybe the browser is started because I use Qt 4.5.3?

    Peter

  4. #4
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: QDesktopServices on Maemo

    Quote Originally Posted by p.bouda View Post
    Thanks for the hint, maybe I will just try the dbus calls for e-mails. Maybe the browser is started because I use Qt 4.5.3?

    Peter
    Using raw DBus calls is an asking for troubles. I'm using 4.6 and didn't have time to check Qt 4.5.3.

  5. #5
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: QDesktopServices on Maemo

    Quote Originally Posted by divanov View Post
    Like with email only messaging UI is started and actually this is messaging UI problem as you can verify it with DBus call:
    Code:
    dbus-send --dest='com.nokia.MessagingUI' \
               --type='method_call' --print-reply \
               /com/nokia/MessagingUI \
               com.nokia.MessagingUI.messaging_ui_interface_start_sms \
               string:"sms:?body=Test sms"
    Ok, in fact there is no problem with messaging UI.
    Uri you used is invalid according to the standard draft:
    http://tools.ietf.org/html/draft-wil...12#section-2.2

  6. #6
    Registered User
    Join Date
    Sep 2009
    Posts
    24

    Re: QDesktopServices on Maemo

    Quote Originally Posted by divanov View Post
    Ok, in fact there is no problem with messaging UI.
    Uri you used is invalid according to the standard draft:
    http://tools.ietf.org/html/draft-wil...12#section-2.2
    Hi,

    is there a better way to send a predefined sms to a predefined number on the maemo platform rather than me having to call the dbus directly ?

    Can I do it using QDesktopServices and not have the ui brought up each time ?


    That apart ,I tried to bring up the messaging UI with the dbus command mentioned below
    and uri as

    string:"sms:61759?body=testing this interface"

    though the ui window opens up and displays the number to send fine , I dont find my predefined text.
    is there something im doing wrong here.

    It works when the messaging UI is already up.
    so that means when I execute the same command twice I can see my predefined text appearing, wierd, is that a bug ?

    thanks for taking time.
    Last edited by rkurvakat; 2010-02-05 at 16:00.

  7. #7
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: QDesktopServices on Maemo

    You should want to have a look at this thread:
    http://discussion.forum.nokia.com/fo...d.php?t=187477

  8. #8
    Registered User
    Join Date
    Sep 2009
    Posts
    24

    Re: QDesktopServices on Maemo

    Quote Originally Posted by divanov View Post
    You should want to have a look at this thread:
    http://discussion.forum.nokia.com/fo...d.php?t=187477
    thanks Ive checked that thread already.
    and Im aware of qt mobility as well, but what I really wanted is some reliable method to do it now.
    So as I understand it , dbus is the only way to do it ATM.

  9. #9
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: QDesktopServices on Maemo

    Quote Originally Posted by rkurvakat View Post
    thanks Ive checked that thread already.
    and Im aware of qt mobility as well, but what I really wanted is some reliable method to do it now.
    So as I understand it , dbus is the only way to do it ATM.
    There are at least three ways to do it at the moment (including what QDesktopServices does).

  10. #10
    Registered User
    Join Date
    Sep 2009
    Posts
    24

    Re: QDesktopServices on Maemo

    Quote Originally Posted by divanov View Post
    There are at least three ways to do it at the moment (including what QDesktopServices does).
    the thing is my app needs to send some sms'es(multiple) in the background , if I use the Dbus or the QDesktopService, the UI will open up and my app will be minimized automatically in maemo , right ?

    I dont want this to happen, I wanted the ability to send the sms in the background when I click on a button in my QT app.

    I dont know what is the third way you hinted at. does it do what i need.

    also as Ive mentioned below when I provide the following uri to the dbus command it doesnt bring up the text , it brings up the text only if the messaging ui is already open

    string:"sms:61759?body=some body text"

    the number is appearing fine

    appreciate your help.
    Last edited by rkurvakat; 2010-02-05 at 16:47.

  11. #11
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: QDesktopServices on Maemo

    Quote Originally Posted by rkurvakat View Post
    the thing is my app needs to send some sms'es(multiple) in the background , if I use the Dbus or the QDesktopService, the UI will open up and my app will be minimized automatically in maemo , right ?
    Exactly.

    Quote Originally Posted by rkurvakat View Post
    I dont want this to happen, I wanted the ability to send the sms in the background when I click on a button in my QT app.

    I dont know what is the third way you hinted at. does it do what i need.
    Third method is to read wiki
    http://wiki.maemo.org/Documentation/..._in_Freemantle

    Quote Originally Posted by rkurvakat View Post
    also as Ive mentioned below when I provide the following uri to the dbus command it doesnt bring up the text , it brings up the text only if the messaging ui is already open

    string:"sms:61759?body=some body text"
    This will be fixed in next release.

  12. #12
    Nokia Developer Expert
    Join Date
    Aug 2007
    Posts
    82

    Re: QDesktopServices on Maemo

    Quote Originally Posted by rkurvakat View Post
    I dont want this to happen, I wanted the ability to send the sms in the background when I click on a button in my QT app.
    Perhaps you'd like to try this out:

    http://blogs.forum.nokia.com/blog/ka...api-to-maemo-5

    (it's using Telepathy).

Similar Threads

  1. RTcom
    By LAS_VEGAS in forum Nokia N9
    Replies: 8
    Last Post: 2010-01-20, 15:12
  2. Installing Maemo SDK+ on a 64 bit system.
    By frostybeard in forum Tools and SDK Feedback (Closed)
    Replies: 1
    Last Post: 2009-11-24, 21:51
  3. Replies: 0
    Last Post: 2009-11-18, 12:18
  4. Maemo 6 UI and Orbit
    By svdwal in forum Nokia N9
    Replies: 0
    Last Post: 2009-10-12, 13:54
  5. Forum Nokia Supports maemo
    By Nokia Ron in forum News, Announcements and Job Listings
    Replies: 3
    Last Post: 2007-10-23, 09:33

Posting Permissions

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