I am downloading a file in python code which returns me progress of the file downloaded in percentage. Is there any way i can send back these percentage values back to android java code?
Assuming percentage values are returned from a callback function every second.
From the Chaquopy FAQ:
There are many ways of doing this: here’s one example from the Electron Cash project:
- Kotlin code passes a method reference to Python.
- The Python code creates a background thread which later calls the method using normal Python syntax.