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.


    Notifications Python 3.x

    Pythonista
    actionurl 3.x notification
    3
    8
    5971
    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.
    • Phuket2
      Phuket2 last edited by

      Maybe I am doing something wrong. No experience with this, did not want to put it in the Python 3.x thread.
      But I am calling -

      x = notification.schedule(msg, delay = delay, action_url = 'foodpanda://' )
      

      In the notifications settings section, I have set Pythonista to notify me with a "alert"

      So the alert notification appears with a 'open' button. I hit the open button, I am taken to Pythonista, then after about 5 secs I am taken to the foodpanda application. But it also kills my Pythonista 3.x session.

      I have no idea what the foodpanda app supports in terms of url schemes. However I got the same result doing the exact same thing substituting 'contacts' for foodpanda.

      I am not sure if it's a bug or I am just mis using the action_url.
      Ideally, the open button would just launch the app 'foodpanda' in this case.

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

        This is probably an iOS limitation that notifications can only open the app that they come from and can't link to arbitrary URLs, so Pythonista needs to be launched to open the URL. I checked, this behavior existed in Pythonista 1.5 (on iOS 7) too, so it's not a recent change in Pythonista or iOS.

        Phuket2 1 Reply Last reply Reply Quote 0
        • Phuket2
          Phuket2 @dgelessus last edited by

          @dgelessus , ok thanks. I guess @omz is doing the magic to pass on the url. But it's around a 5 sec delay. As well as the crash to Pythonista. There is something wrong. If it just stopped in Pythonista, that would make sense from what you said. I think @omz pass through idea has a problem.

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

            Depending on how long you've waited since you've last opened Pythonista, the app may not be running anymore. Then when you tap the notification, it first has to launch Pythonista, start up the two Python interpreters, and then opens the URL. That could take a few seconds.

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

              Something seems to be going wrong when you have the "alert" notification style selected for Pythonista. I can reproduce the crash and the unusually long delay here. On a somewhat modern device, it should almost never take 5 seconds for the app to launch, and obviously, it shouldn't terminate after opening the URL.

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

                @omz , no problems. I thought there was some sort of problem. But I thought maybe I was using the url incorrectly and somehow causing the crash and the timeout. I was trying to get something together to use as a today widget. But of course , just test normally before trying to use it as a widget. In this case i was using alert specifically as I don't want to miss it. The Notification Center is a great feature of iOS

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

                  @Phuket2 It might be worth noting that scheduling notifications is not possible from the widget (you can launch apps via webbrowser.open(url) though).

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

                    I think I found a fix for this (will be in the next beta).

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