UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Contact custom incoming Call/Notification sound

    Scheduled Pinned Locked Moved OS
    8 Posts 3 Posters 922 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • lduboeufL Offline
        lduboeuf
        last edited by lduboeuf

        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
        FieldVibrationRingtoneUrl

        FieldAudioRingtoneUrl 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
        reboot

        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....

        lduboeufL 1 Reply Last reply Reply Quote 8
        • lduboeufL Offline
          lduboeuf @lduboeuf
          last edited by

          ready for testing ( devel ), see edited previous post

          lduboeufL 1 Reply Last reply Reply Quote 0
          • M Offline
            mw4jet
            last edited by

            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?

            lduboeufL 1 Reply Last reply Reply Quote 0
            • lduboeufL Offline
              lduboeuf @mw4jet
              last edited by

              @mw4jet Maybe i should rename the topic title.
              I'm working on allowing to set a custom ringtone per contact

              MoemM M 2 Replies Last reply Reply Quote 3
              • MoemM Offline
                Moem @lduboeuf
                last edited by

                @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 🔥

                Is currently using an Op5t
                Also owns an Op1, a BQ E4.5 and an Xperia X, as well as a BQ tablet and a Pinetab2. Please, someone... make it stop.

                1 Reply Last reply Reply Quote 2
                • lduboeufL Offline
                  lduboeuf @lduboeuf
                  last edited by lduboeuf

                  @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

                  1 Reply Last reply Reply Quote 0
                  • M Offline
                    mw4jet @lduboeuf
                    last edited by

                    @lduboeuf Now that's a nice feature!

                    lduboeufL 1 Reply Last reply Reply Quote 0
                    • lduboeufL Offline
                      lduboeuf @mw4jet
                      last edited by

                      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.

                      1 Reply Last reply Reply Quote 1
                      • First post
                        Last post