[SailfishDevel] qml dbus send SMS
Jonni Rainisto
jonni.rainisto at jolla.com
Tue Mar 17 19:16:20 UTC 2015
Just a reminder to people that harbour QA will most likely reject applications that send sms messages through dbus without opening official sms application. As recomended way is to open sms application with sms: tag (mailto: for email) where user can press send button himself. Like Qt.openUrlExternally("sms:123456789?body=XXX")
But ofcourse if your not aiming for harbour and are targeting openrepos then you can ignore that.
re, Jonni
________________________________________
From: devel-bounces at lists.sailfishos.org [devel-bounces at lists.sailfishos.org] on behalf of Michael Fuchs [michfu at gmx.at]
Sent: Tuesday, March 17, 2015 8:49 PM
To: devel at lists.sailfishos.org
Subject: [SailfishDevel] qml dbus send SMS
Hi there,
this is my first post in this list, so hello to everyone.
I want to write a small App, which helps writing SMS for booking a parking
ticket in Vienna/Austria and later other cities as well.
As i read the recommended way for sending messages from qml is using
dbus. I found this command for the command line, which works:
$ dbus-send --type=method_call --dest=org.nemomobile.qmlmessages / \
org.nemomobile.qmlmessages.startSMS array:string:"+358123456" \
string:"Hello world"
dbus-monitor shows:
method call sender=:1.41 -> dest=org.nemomobile.qmlmessages serial=2
path=/; interface=org.nemomobile.qmlmessages; member=startSMS
array [
string "+358123456"
]
string "Hello world"
So in qml I made a
DBusInterface {
id: smsIf
service: "org.nemomobile.qmlmessages"
iface: "org.nemomobile.qmlmessages"
path: "/"
}
and called the method
smsIf.call("startSMS", [[""], "smsText.text"])
The output of dbus-monitor say "no such method".
method call sender=:1.39 -> dest=org.nemomobile.qmlmessages serial=7 path=/;
interface=org.nemomobile.qmlmessages; member=startSMS
array [
variant string "+12312312312"
]
string "Hello World"
error sender=:1.32 -> dest=:1.39
error_name=org.freedesktop.DBus.Error.UnknownMethod reply_serial=7
string "No such method 'startSMS' in interface 'org.nemomobile.qmlmessages'
at object path '/' (signature 'avs')"
Is it just the wrong type of the first argument?
But how can I pass the proper type? (Array of strings)
Or is ther some general error?
Thanks for your help,
Michael.
_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org
More information about the Devel
mailing list