[SailfishDevel] Notifications API
Thomas Amler
armadillo at penguinfriends.org
Wed Jul 9 07:06:12 UTC 2014
I got it working now. Just to complete some missing steps:
Additionally you need to add this to the harbour-<app>.pro:
QT += dbus
This to the harbour-<app>.yaml:
- Qt5DBus
And finally this to the main cpp file_:
#include <QtQml>
#include <notification.h>
Then everything should work.
Btw: The only documentation of the notifications plugin I found is here
(currently beginning at line 55):
https://github.com/nemomobile/nemo-qml-plugin-notifications/blob/master/src/notification.cpp
Just in case somebody doesn't know how to use it, like me. ;-)
Am 07.07.2014 21:28, schrieb Piotr Tworek:
> This might not be the best solution, but for YTPlayer I've basically
> added nemo-qml-plugin-notifications as a git submodule. To compile the
> code I've created qmake pri file that I include in my main .pro file
> (See:
> https://github.com/tworaz/sailfish-ytplayer/blob/master/third_party/notifications.pri).
> To make the module available in my app I've than register the
> Notification type with qml in my main function
> (https://github.com/tworaz/sailfish-ytplayer/blob/master/src/YTPlayer.cpp#L92).
> The important part is to register it under harbour.<myapp>. Other
> prefixes might violate harbour qml import restrictions.
>
> /ptw
>
>> Thanks for the clarification. :-)
>>
>> Can you give me a hint, how this could be done?
>>
>>
>> Am 05.07.2014 23:06, schrieb Piotr Tworek:
>>> It's not forbidden however to ship your own copy of
>>> nemo-qml-plugin-notifications as part of your app :)
>>>
>>>> Be aware, that nemomobile notifications API ist not allowed in
>>>> harbour
>>>> at the moment.
>>>>
>>>> Am 29.06.2014 17:54, schrieb Jonni Rainisto:
>>>>> https://github.com/nemomobile/mlite/blob/master/src/mnotification.h
>>>>> https://github.com/nemomobile/nemo-qml-plugin-notifications
>>>>>
>>>>> ________________________________________
>>>>> From: devel-bounces at lists.sailfishos.org
>>>>> [devel-bounces at lists.sailfishos.org] on behalf of Tomasz Sterna
>>>>> [tomek at xiaoka.com]
>>>>> Sent: Sunday, June 29, 2014 6:26 PM
>>>>> To: devel at lists.sailfishos.org
>>>>> Subject: [SailfishDevel] Notifications API
>>>>>
>>>>> How do I send a notification that appears as that thin, blue line
>>>>> at the
>>>>> top of the launcher?
>>>>>
>>>>> i.e. the one after connecting USB, with lightning icon saying that
>>>>> the
>>>>> device is charging.
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Tomasz Sterna :(){ :|:&};:
>>>>> Instant Messaging Consultant Open Source Developer
>>>>> http://abadcafe.pl/ http://www.xiaoka.com/portfolio
>>>>> _______________________________________________
>>>>> SailfishOS.org Devel mailing list
>>>>> To unsubscribe, please send a mail to
>>>>> devel-unsubscribe at lists.sailfishos.org
>>>> _______________________________________________
>>>> SailfishOS.org Devel mailing list
>>>> To unsubscribe, please send a mail to
>>>> devel-unsubscribe at lists.sailfishos.org
>>>
>>> _______________________________________________
>>> SailfishOS.org Devel mailing list
>>> To unsubscribe, please send a mail to
>>> devel-unsubscribe at lists.sailfishos.org
>> _______________________________________________
>> SailfishOS.org Devel mailing list
>> To unsubscribe, please send a mail to
>> devel-unsubscribe at lists.sailfishos.org
>
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to
> devel-unsubscribe at lists.sailfishos.org
More information about the Devel
mailing list