Using the second method here for creating a service, I simply have a file named main.py containing
if __name__ == "__main__":
print 'service started'
when I pass --service=myservice:/data/data/my.package.name/files/app/service/main.py to p4a
and try to run it on android, the output is as follows without loggin what the error is
I/python ( 8970): Initialize Python for Android
I/python ( 8970): Changing directory to the one provided by ANDROID_ARGUMENT
I/python ( 8970): /data/data/org.test.community/files/app
I/python ( 8970): Preparing to initialize python
I/python ( 8970): crystax_python does not exist
I/python ( 8970): Initialized python
I/python ( 8970): AND: Init threads
I/python ( 8970): Setting up python from ANDROID_PRIVATE
I/python ( 8941): [WARNING] [Base ] Unknownprovider
I/python ( 8941): [INFO ] [Base ] Start application main loop
I/python ( 8970): AND: Ran string
I/python ( 8970): Run user program, change dir and execute entrypoint
I/python ( 8970): Python for android ended.Also if I intentiaoly pass an invalid path, it raises
Entrypoint not found (.py), abort.Is it related to whatPy_Finalize();does here in line 276?
I believe --service=myservice:/path/to/myservice.py is meant as a path from your current directory to the python file when packaging. So try e.g. --service=myservice:./service/main.py if you have a service folder in your current directory.
Most helpful comment
I believe
--service=myservice:/path/to/myservice.pyis meant as a path from your current directory to the python file when packaging. So try e.g.--service=myservice:./service/main.pyif you have aservicefolder in your current directory.