Hi Pavel,
On 06/03/2020 14:21, Pavel Machek wrote:
> Hi!
>
>>> You have demo where you display sms notification. I had it working at
>>> some point, but I can not find it now. I expect some kind of dbus-send
>>> can be used, if you could share it, it would be interesting.
>>
>> I believe you will find such a notification example here:
>>
>> https://maemo-leste.github.io/maemo-leste-fifth-update-september-october-2018.html
>>
>> It's not exactly like the SMS notification, as clicking it won't bring
>> you anywhere, I think.
>
> Thanks a lot for the pointer. This one works (on both desktop and Maemo):
>
> #python2
> import dbus
> bus = dbus.SessionBus()
> proxy = bus.get_object('org.freedesktop.Notifications', '/org/freedesktop/Notifications')
> interface = dbus.Interface(proxy,dbus_interface='org.freedesktop.Notifications')
> interface.Notify('Notification', 0, 'control_bluetooth_paired', 'Testing 123', 'Hello World', [], {}, 0)
>
> I tried getting sound to work, using stuff such as:
>
> hints = {}
> hints["sound-name"] = "phone-incoming-call"
> hints["sound-file"] = "file:///usr/lib/python2.7/dist-packages/pygame/examples/data/boom.wav"
> hints["icon-path"] = "file:///usr/share/icons/freedoom1.png"
> interface.Notify('Notification', 2, 'device', 'Testing 123', 'Hello World', [], dbus.Dictionary(hints, signature='sv'), 0)
>
> ...but I did not have any success. I'm not sure 'hints' are
> passed correctly.
>
> I can get very short click using
>
> interface.SystemNoteDialog("Hello", 0, "ok")
>
> (but that only works on Maemo and is not really suitable for SMS).
Honestly, I haven't tested the notifications with sound. I'd probably
try to dig up C example, verify if that works, and then see if there is
a problem with the Python bindings, or python code above.
Feel free to create an issue on the bugtracker for this.
>> You can find images here:
>>
>> https://maedevu.maemo.org/images/droid4/
>>
>> But they have various issues, outlined here:
>>
>> https://github.com/maemo-leste/bugtracker/issues/302
>>
>> We are hoping to make new images soon, maybe with 3D working, even. But
>> you might not want to wait for that.
>
> If you get 3D to work, can I ask for an announcement? :-)
Absolutely. I am planning to try the new work this weekend. I am not
sure how stable it is, but if it is stable enough, perhaps we can try to
package it. But I'll leave that up to Arthur, who's been spearheading
the effort together with Tony.
>>> Plus, do we have some melodies (under reasonable license) that would
>>> be suitable for ringtones, sms tones etc?
>>
>> I don't really know. I personally would worry about finding the right
>> melodies/ringtones only after stuff works. I think Maemo Leste can use
>> the ones provided by Fremantle, as long as they as hosted on maemo.org.
>> But I'm happy with other ringtones. I'm sure maemo.org has community
>> contributed tones too.
>
> Would you have pointers to some kind of melodies I could use? So far
> I'm using
>
> https://github.com/pavelmachek/unicsy_demo/tree/master/tones
>
> and looking for something better.
Sorry to disappoint, but I am (currently) completely clueless when it
comes to this. I just haven't dived into any of this at all.
I've searched around for a bit just now but couldn't find much beyond
the maemo ones: maemo-ringtones-*
I still use the default ringtone, and I don't recall trying to change it
before.
Cheers,
Merlijn