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.
Pythonista 3.3 beta notification module
-
Hello! I'm trying out the new Pythonista beta, and the documentation for the new
notification
module seems a bit confusing. Specifically, I don't understand thetrigger
parameter.
Can anyone help me? -
Could you be a bit more specific, please? Which parts of the explanation in the documentation do you have trouble with? Do you have a use case in mind?
-
@Ichicoro for instance, if you set this trigger parameter, you'll get a notification when you arrive approximatively under the Eiffel Tower
trigger = {'latitude':48.858370, 'longitude':2.294481, 'entry':True}
-
-
@Ichicoro First off, you cannot combine time- and location-based triggers, so the scenario "monday to friday at a certain location" is simply not possible.
Maybe it'll help if you look at Apple's documentation for
UNCalendarNotificationTrigger
. You don't have to understand Swift/ObjC, but the behavior should be the same in Pythonista (though not all functionality may be available in Pythonista). -
What are the valid sound_names for the notification.schedule parameter? Also can Pythonista provide an arbitrary sound file, and if so, what is the format?
-
@ihf The same as for
sound.play_effect
, so things like'arcade:Coin_5'
. You can show a list of these sound effects by tapping the+
button in the bottom-right corner (while editing).For custom sound effects, I'd recommend a m4a file, and you'd just pass the filename. It should not be longer than 30 seconds though.