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 block Phone calls / WhatsApp call
-
There is also an automation, when App is open.
-
@7upser yes but perhaps you don't want it each time you open Pythonista, for instance during development.
-
good argument
-
@7upser finally, when you work on Pythonista and you don't want To be interrupted by a phone call, why not use control center, this one does not interrupt your Pythonista App.
-
@7upser I read one more time your initial post, and you speak also about WhatsApp, and this one works in wifi, thus will still function if Airplane mode is activated.
-
@cvp It wasn't my Thread 😛
But you are right Phone calls and WhatsApp are different things.
Maybe there is a url scheme for whats app, or a action for Shortcuts.But back to what i'm interested in (call shortcut and return to pythonista)
This could work:import ui import webbrowser class cUIView(ui.View): def __init__(self, *args, **kwargs): self.width, self.height = 200, 200 self.background_color = 'silver' self.vBtn = ui.Button(title = 'test', name = 'btntest') self.vBtn.frame = (50, 50, 100, 100) self.vBtn.background_color = 'white' self.vBtn.action = self.btnAction self.add_subview(self.vBtn) def btnAction(self, vSender): url = 'shortcuts://x-callback-url/run-shortcut?name=testBluetoothOff&x-success=pythonista3://' webbrowser.open(url) vView = cUIView() vView.present('sheet')
-
-
@7upser said:
This could work:
Sure but as you can start the same app normally or launched by Shortcuts, you have to check arguments to differentiate both types of calls
-
-
@7upser said:
@cvp It wasn't my Thread 😛
But you are right Phone calls and WhatsApp are different things.
Maybe there is a url scheme for whats app, or a action for Shortcuts.But back to what i'm interested in (call shortcut and return to pythonista)
This could work:import ui import webbrowser class cUIView(ui.View): def __init__(self, *args, **kwargs): self.width, self.height = 200, 200 self.background_color = 'silver' self.vBtn = ui.Button(title = 'test', name = 'btntest') self.vBtn.frame = (50, 50, 100, 100) self.vBtn.background_color = 'white' self.vBtn.action = self.btnAction self.add_subview(self.vBtn) def btnAction(self, vSender): url = 'shortcuts://x-callback-url/run-shortcut?name=testBluetoothOff&x-success=pythonista3://' webbrowser.open(url) vView = cUIView() vView.present('sheet')
Thats nice xD
Thanks -
This post is deleted!