You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This already somewhat exists in APython_PyApp as a template. It's unfortunately not bundled as a library, but all the code you need would be in here and you could just copy and paste it into your app for now. You could start a new activity in a new process and then do what the app template does, but instead of passing a path to a file to the interpreter, give it your code via the -c command line argument.
You could use RPC for that : udp on localhost is really very fast.
RPC was an option I initially considered, but the approach I endet up using in the APython_PyApp executes the code as part of the apps process, so there is no need for RPC. This also means that the Python code has access to the permissions of the calling App, instead of the permissions of the Python host.
I am aware that there are restrictions on executing native code which isn't bundled in your own app on newer Android versions (Termux has a similar problem which I think applies to us as well), so we might have to revert to RPC at some point. For now, if you target an old enough sdk version, it should work.
I do plan to update to the latest version, as mentioned in #23, but I'm currently also busy with other projects. I will try to look into it over the next week, no promises though.
@Abestanis as much as what i see, I need your library seriously for running my python code
But, main issue is : I want your implementation to be available as a library (
That can run python code provided as a string)It would be really helpful to me