try this. I misunderstood what you wanted to do... there is a function which checks if you are in the background. You may need to play with the first sleep to ensure you are in the bg. or have a loop that sleeps while not in background, then second that sleeps while it is..
import console,time #launch you app time.sleep(1) while console.is_in_background(): time.sleep(1) #launch your app time.sleep(1) while console.is_in_background(): time.sleep(1)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.