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
I have a short, runnable example that reproduces the issue
I reproduced the problem with the latest development version (p4a.branch = develop)
I used the grave accent (aka backticks) to format code or logs when appropriated
Versions
Python: 3.8
OS: Android 10
Kivy:
Cython: 0.29.19
OpenJDK: jdk1.8.0_301
Description
A.py including a global variable, say x = 1.
B.py: import A, then print(A.x), it's correct, but if sometime when A.x got updated in A.py, A.x in B.py didn't get updated.
The same code works correctly under windows but doesn't work on android.
buildozer.spec
Command:
// REPLACE ME: buildozer command ran? e.g. buildozer android debug
// Keep the triple grave accent (aka backquote/backtick) to have the code formatted
Spec file:
// REPLACE ME: Paste your buildozer.spec file here
Logs
// REPLACE ME: Paste the build output containing the error
// Keep the triple grave accent (a.k.a. backquote/backtick) to have the code formatted
The text was updated successfully, but these errors were encountered:
Python isn't running differently on Android in any way that I'd expect to cause this mismatch. I think it's more likely that there's an issue with your code that manifests differently for a reason other than the platform change.
If you want to prove this is a real issue, please provide a minimal app example that reproduces the issue. We'll certainly log the bug if we can see this way that something is wrong.
If you want to prove this is a real issue, please provide a minimal app example that reproduces the issue. We'll certainly log the bug if we can see this way that something is wrong.
You are right, it looks that it's not an issue of python for android, but for global variable sharing between android service and activity, though those are python code, but global variable is losing sync up between them.
Any suggestion for such situation?
The service and activity are running separate python processes that don't share memory, if you want to pass messages you should do so explicitly with e.g. oscpy.
Checklist
p4a.branch = develop
)Versions
Description
A.py including a global variable, say x = 1.
B.py: import A, then print(A.x), it's correct, but if sometime when A.x got updated in A.py, A.x in B.py didn't get updated.
The same code works correctly under windows but doesn't work on android.
buildozer.spec
Command:
Spec file:
Logs
The text was updated successfully, but these errors were encountered: