Contact custom incoming Call/Notification sound
-
Hi,
I'm starting to implement the custom sound for incoming sound and message.What we need:
A global storage path for the sounds files.
The custom ringtone and message should be settable and read from Address book / Messaging and Dialer app.
We could choose between default OS sounds and custom ones.What we have:
QContact provides a detail "ringtone" with 3 property fields:
FieldAudioRingtoneUrl
FieldVideoRingtoneUrl
FieldVibrationRingtoneUrlFieldAudioRingtoneUrl should be ok for the incoming call
But what for incoming message ? I would borrow the FieldVibrationRingtoneUrl property.Implementation:
We could use the standard sounds directory as specified in freedesktop :
~/.local/share/sounds
Telephony-service approver is the service responsible for playing the sound on incoming call, we already know the "contact" there, so it can just take the custom sound path if allowed and exist, otherwise play the usual sound.
Same should occur for incoming messaging sound, code is in another place.Address-book-app: creates shared components to allow editing the ringtone contact detail ( default sounds + custom ones + allow to import new )
There will probably need app-arrmor permission rules to add.
Any things to think more ?
--=========OBSOLETE===============
The below notes was for Xenial[EDIT]: testable ( devel only):
sudo ubports-qa install PR_telephony-service_65
sudo ubports-qa install PR_address-book-app_211
rebootIf you don't want to overwrite existing address-book-app, this can be built with clickable but you will not have custom sound preview and messaging-app and dialer-app won't benefit of the click package. just clone and run
clickable --arch yourarch
If someone can help me setup a CI click buildNote that currently only audio call ringtone is supported and you can only import custom sounds with address book app
Edit a contact, choose "Ringtone" in the dropdown, select a default system sound or import one.
Try an incoming call.... -
ready for testing ( devel ), see edited previous post
-
I transferred a couple of mp3 files which have been clipped to work as sound files, they are in my Downloads folder and from the sounds category in settings I can access and set them as ringtones or notification sounds.
Why all that?
-
@mw4jet Maybe i should rename the topic title.
I'm working on allowing to set a custom ringtone per contact -
@lduboeuf said in Contact custom incoming Call/Notification sound:
a custom ringtone per contact
... which is a super nice feature that many people will find useful
-
@lduboeuf said in Contact custom incoming Call/Notification sound:
ready for testing ( devel ), see edited previous post
Well lets pioritize the switch to the new contact backend. This is a huge gap again. Lots of tests needed and still some glitches.
Kudos to Alberto for continuing this effort, i think help would be appreciated: https://github.com/ubports/ubuntu-touch/issues/997
just switch to devel if not already the case.
In RC soon -
@lduboeuf Now that's a nice feature!
-
Hi, some news,
So the feature was working fine on my device!. But as we finally reverted back the new contact backend, it is not possible anymore...
Adding such possibility in current contact backend is not straight forward, and not sure if i should spend days on a backend that will be uncertain for the future.