[SailfishDevel] Sending SMS Messages from Sailfish Alpha 2

"Thomas B. Rücker" thomas at ruecker.fi
Wed Aug 7 19:14:27 UTC 2013


let me join this conversation, as I have a similar use-case.

On 08/07/2013 06:19 PM, John Brooks wrote:
> On Aug 7, 2013, at 2:19 AM, christopher.lamb at thurweb.ch wrote:
>> Hi All
>> I am in the middle of migrating one of my apps "Landed" to the new Alpha 2.
>> The primary function of Landed is to send SMSes.
> Cool :)
>> In the good old days of the first Alpha and Qt4 to do this I used a bit of code modelled on the solution here:
>> http://www.developer.nokia.com/Community/Wiki/QML_SMShelper_Plugin
>> i.e. I was using QMessaging from Qt Mobility.
>> As Qt Mobility is not yet migrated to Qt 5 this begs the question, what is now the recommended way to Sends SMSes from Sailfish on Qt5?
>> The excellent porting page  https://sailfishos.org/wiki/Porting/Harmattan points me to Qt5 Additional Modules, but I couldn't find anything there of use.
> I don't expect we'll offer any API from Qt itself for this.
>> The same porting page also suggests Nemo Mobile QML Plugins, so I had a look at these.
>> In GitHub I found the following
>> https://github.com/nemomobile/nemo-qml-plugins
>> https://github.com/nemomobile/nemo-qml-plugin-messages
>> https://github.com/nemomobile/qmlmessages
>> The nemo-qml-plugin-messages initially sounds promising, but the readme (at the bottom of this mail) indicates that it si for internal use only. It points to nemo-qml-plugins. But this is an empty project!
>> I have downloaded all 3 projects, but before I spend too much time investigating these further I thought I would double check here that I am not barking up the wrong tree.
>> So is this the recommended way to Send SMSes, or is there a "better" approach?
> You're barking up the right tree. This is an area of the stack I want to change at some point, but for now, here's how it works:
> Telepathy is used for SMS messaging along with all IM; SMS is sent and received using text channels for the ring/tel/account0 account. The nemo-qml-plugin-messages plugin implements the basic parts of Telepathy functionality needed for an application (like qmlmessages) to send those messages.
> commhistory-daemon and libcommhistory monitor Telepathy and record events, including all sent and received messages. That's what qmlmessages and other clients are displaying.
> Unfortunately, the README is right: nemo-qml-plugin-messages is only usable from one application at a time, because it registers a Telepathy handler (and registers it under a static name). That problem could be easily fixed.
> After that, it would be possible to use the ConversationChannel API to establish a channel and send/receive messages on it from QML, like:
> property var currentChannel: handler.getConversation("/org/freedesktop/Telepathy/Account/ring/tel/account0", "12345")
> onClicked: currentChannel.sendMessage("Hello world")
> Those messages and any responses to them would appear normally in the messaging client, as if the user had sent them manually.
> So here's my question: What do you need in a basic messaging API? Is the above (once usable from multiple applications) sufficient, or do you need to prevent these messages from being in the user's message history? Would simple dbus calls somewhere be nicer to use?

My use case is related. I'm thinking about push notifications, generic
(although I have a specific use case too). As there is currently nothing
in that sense in Nemo/Sailfish I am pondering to base this on the XMPP
protocol, that's also available through Telepathy. Although technically
it could be interesting to be open to other protocols including SMS.
Here it would be good if my daemon could receive messages to a certain
Telepathy account and they would not appear in the UI, but would be
processed only by the daemon (e.g. triggering Feed events or dbus calls
or ...). In other situations it might be useful to listen in on messages
received by regular accounts though, too.

If you're wondering what prompted me to spin up this idea. I own a
Metawatch, a kind of smart watch, and want to use it with Sailfish/Nemo,
also to receive push notifications from my Irssi IRC client. This
currently works quite well with SOWatch under Harmattan already. Just
that the raw messages show up in the UI.

>> m.f.g
>> Chris
>> "
>> This QML plugin implements logic for the qmlmessages application and other UI
>> implementations. It is not meant to be used by any other applications, or by
>> more than one process simultaniously. It is installed as org.nemomobile.messages.internal.
>> For external API, see nemo-qml-plugins, which provides org.nemomobile.messages.
>> "



More information about the Devel mailing list