Hi, 

You can open messaging app with dbus call.  C++ code will look like this

void MyClass::composeSMS(const QString &number)
{
    if (!number.isEmpty()) {
        QDBusMessage message = QDBusMessage::createMethodCall(
               "org.nemomobile.qmlmessages",
               "/",
               "org.nemomobile.qmlmessages",
               "startSMS");
        QList<QVariant> arg;
        arg << number;
        message.setArguments(arg);
        QDBusConnection bus = QDBusConnection::sessionBus();
        if (bus.isConnected()) {
           bus.send(message);
        }
    }
}
for qml you should use qml dubs plugin to call dubs method

regards

On Jul 21, 2015, at 5:36 PM, neotericdevelo...@gmail.com wrote:

> Hello Sailors.. 
> 
> I tried to open default messaging app using the below code(qml). But its not 
> invoking the msg app.
> 
> Qt.openUrlExternally("sms:?body=msgtosend");
> 
> I also tried this one by providing dummy phone number.
> 
> Qt.openUrlExternally("sms:0123456789?body=msgtosend");
> Still not working.
> 
> How can i successfully open the messaging app with text to send from qml.
> 
> Any help.
> Thanks in advance.
> 
> _______________________________________________
> 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

Reply via email to