<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>Hi, </div><div><br></div><div>You can open messaging app with dbus call.  C++ code will look like this</div><div><br></div><div>
<pre style="margin-top: 0px; margin-bottom: 0px;"><!--StartFragment--><span style=" color:#808000;">void</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">MyClass</span>::composeSMS(<span style=" color:#808000;">const</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">QString</span><span style=" color:#c0c0c0;"> </span>&number)</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;">{</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#808000;">if</span><span style=" color:#c0c0c0;"> </span>(!number.isEmpty())<span style=" color:#c0c0c0;"> </span>{</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;">        </span><span style=" color:#800080;">QDBusMessage</span><span style=" color:#c0c0c0;"> </span>message<span style=" color:#c0c0c0;"> </span>=<span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">QDBusMessage</span>::createMethodCall(</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;">               </span><span style="color: rgb(0, 128, 0);">"org.nemomobile.qmlmessages"</span>,</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;">               </span><span style="color: rgb(0, 128, 0);">"/"</span>,</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;">               </span><span style="color: rgb(0, 128, 0);">"org.nemomobile.qmlmessages"</span>,</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;">               </span><span style="color: rgb(0, 128, 0);">"startSMS"</span>);</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;">        </span><span style=" color:#800080;">QList</span><<span style=" color:#800080;">QVariant</span>><span style=" color:#c0c0c0;"> </span>arg;</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;">        </span>arg<span style=" color:#c0c0c0;"> </span><<<span style=" color:#c0c0c0;"> </span>number;</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;">        </span>message.setArguments(arg);</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;">        </span><span style=" color:#800080;">QDBusConnection</span><span style=" color:#c0c0c0;"> </span>bus<span style=" color:#c0c0c0;"> </span>=<span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">QDBusConnection</span>::sessionBus();</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;">        </span><span style=" color:#808000;">if</span><span style=" color:#c0c0c0;"> </span>(bus.isConnected())<span style=" color:#c0c0c0;"> </span>{</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;">           </span>bus.send(message);</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;">        </span>}</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;"><span style=" color:#c0c0c0;">    </span>}</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;">}<!--EndFragment--></pre><div>for qml you should use qml dubs plugin to call dubs method</div></div><div><br></div><div>regards</div><br><div><div>On Jul 21, 2015, at 5:36 PM, <a href="mailto:neotericdeveloper@gmail.com">neotericdeveloper@gmail.com</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hello Sailors.. <br><br>I tried to open default messaging app using the below code(qml). But its not invoking the msg app.<br><br>Qt.openUrlExternally("<a href="sms:?body=msgtosend">sms:?body=msgtosend</a>");<br><br>I also tried this one by providing dummy phone number.<br><br>Qt.openUrlExternally("<a href="sms:0123456789?body=msgtosend">sms:0123456789?body=msgtosend</a>");<br>Still not working.<br><br>How can i successfully open the messaging app with text to send from qml.<br><br>Any help.<br>Thanks in advance.<br><br>_______________________________________________<br><a href="http://SailfishOS.org">SailfishOS.org</a> Devel mailing list<br>To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.sailfishos.org</a><br></blockquote></div><br></body></html>