How to run Python script in background in android?

1.2k Views Asked by At

I want to run a specific Python file(for example, main.py) in android device even if my app is not running in the foreground using my android application made using Python, Kivy and Buildozer .

1

There are 1 best solutions below

0
On

Did you try this?:

import subprocess
subprocess.call(['python main.py'])