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 should be ok for the incoming call
But what for incoming message ? I would borrow the FieldVibrationRingtoneUrl property.
We could use the standard sounds directory as specified in freedesktop :
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 ?
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
If 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 build
Note 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....