Thread
:
[WiP] SkippingStones, Pebble Protocol Implementation and UI for Qt5/SailfishOS
View Single Post
Wonko
2014-04-04 , 18:03
Posts: 456 | Thanked: 1,580 times | Joined on Dec 2009
#
17
Alright, I couldn't stop myself from looking a little bit more into this.
After all, having an interesting technical problem may turn out to be a little bit addictive.
So, for the impatient ones:
I uploaded a new version that emits at least some information about new e-mails:
https://github.com/ruedigergad/Skipp...l.rpm?raw=true
But please be warned that this is a really crude hack and that the functionality is far from complete.
One known issue is that the e-mail body is not displayed at all.
Another known issue is that if more than one e-mail was received, only a sort of "summary" like "2 new e-mails" or so is sent.
For the technically interested:
Well, this hack is likely as dirty as it gets.
I started off by looking at this post:
http://stackoverflow.com/questions/2...r-method-calls
However, as the solution proposed there didn't work, I began to change the hack.
Essentially, what I did now is that my adapter class for interacting with dbus has a "Notify" method with the correct signature to match the dbus method.
The class also has the Q_CLASSINFO to match the involved interface ('Q_CLASSINFO("D-Bus Interface", "org.freedesktop.Notifications"') and the object registered itself at the appropriate path.
Additionally, I manually added a match for "interface='org.freedesktop.Notifications',member= 'Notify',type='method_call',eavesdrop='true'".
Overall, this way to get the info is very hackish and dirty.
Furthermore, things are very likely to break with further SailfishOS updates.
Nonetheless, I wanted to share my findings.
Outlook, for volunteers(?
):
One way for getting the body of the e-mail could be to fetch it from QMF.
It seems that the message ids as used by QMF are contained in the notification message.
So, this could be the entry point in fetching the body of the e-mail.
However, this could become complicated if multiple e-mail accounts are configured on the phone.
While talking about QMF.
Another way for getting notifications about new e-mails could be by directly using QMF.
Edit:
Wishlist, for the Jolla devs(?):
Offer an easier to use way to get the required information "out of the box".
Maybe by adding according signals that also contain, e.g., the email sender, subject, and body?
Similarly to the together.jolla.com request by Elleo, as linked above.
__________________
MeePasswords
---
Q To-Do
---
QZeeControl
Advanced Clock Plugin
---
Binary Clock
,
Desktop Version
---
libswt-hildon
Stultitia Simplex
---
To-Do-O
---
VU Meter
---
Zeecontrol
My homepage with assorted posts about my apps, Qt/QML, etc.:
http://ruedigergad.com
Last edited by Wonko; 2014-04-04 at
18:22
.
Quote & Reply
|
The Following 6 Users Say Thank You to Wonko For This Useful Post:
Bundyo
,
Dave999
,
kombipom
,
nokiabot
,
rotoflex
Wonko
View Public Profile
Send a private message to Wonko
Find all posts by Wonko