Notifications Python 3.x
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.
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.
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.
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.
@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
@Phuket2 It might be worth noting that scheduling notifications is not possible from the widget (you can launch apps via
I think I found a fix for this (will be in the next beta).