you need to use different method:
smsIf.typedCall("startSMS", [{"type":"as", "value":[""]}, {"type":"s",
"value":smsText.text}])
17.03.2015 23:49, Michael Fuchs пишет:
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-unsubscr...@lists.sailfishos.org
_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org