omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Notification sounds

    Pythonista
    4
    7
    4359
    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.
    • ihf
      ihf last edited by

      Am I correct that without a jailbreak to add sounds to the standard set, there is no way to crate a notification (alarm) that will play a user supplied sound?

      1 Reply Last reply Reply Quote 0
      • JonB
        JonB last edited by

        I believe this should be possible with the objc_utils module, but I have not tried yet.

        1 Reply Last reply Reply Quote 0
        • ihf
          ihf last edited by

          I thought that Notifications could only use the system provided sounds but if there is a way to do it using obc_utils that would be great.

          1 Reply Last reply Reply Quote 0
          • JonB
            JonB last edited by JonB

            Reading a little deeper, the sound needs to be part of the main bundle. You can use the names of sounds that come with pythonista, but not outside of the readonly Bundle/Application folder

            1 Reply Last reply Reply Quote 1
            • shtek
              shtek last edited by shtek

              the sound needs to be part of the main bundle. You can use the names of sounds that come with pythonista, but not outside of the readonly Bundle/Application folder

              @JonB what does this mean?

              just tried this:

              import  notification
              notification.schedule(message='test', delay=5,sound_name='drums:Drums_15')
              

              always got a system default sound.

              is drums:Drums_15 in the readonly Bundle/Application folder?

              some webpage said need to hard reboot :
              http://www.ibtimes.sg/how-fix-ios-10-notifications-sound-alerts-sound-issue-whatsapp-others-3572

              tried but no effect

              1 Reply Last reply Reply Quote 0
              • JonB
                JonB last edited by

                >>> help(notification.schedule)
                schedule(message, delay=0, sound_name=None, action_url=None)
                    Note: Sounds from the 'digital' and 'game' collections are supported
                

                I tried these, and it didnt work, though the sound name does show up in the ObjC notification.... so, it is getting set, but ios is still playing the default. Not sure if this is an ipad thing (i feel like my ipad only ever plays default?) or a later ios version thing (this was depreciated i think in 10)

                @omz?

                1 Reply Last reply Reply Quote 0
                • omz
                  omz last edited by

                  I can confirm that this currently doesn't work as intended, but there's a workaround:

                  import notification
                  
                  notification.schedule('Test', delay=5, sound_name='Media/Sounds/drums/Drums_15')
                  

                  The same pattern ('Media/Sounds/<collection>/<name>') should work with any of the bundled sounds, not just the 'digital' and 'game' collections.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Powered by NodeBB Forums | Contributors