-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App close when device is flipped #732
Comments
Possible duplicate of #730. |
This means |
The bug happens in all the kivy app i have tested that use pygame as backend. test code:
Full logcat log and my buildozer.spec: |
Having the same issue, but rears it's head differently. The app is set to portrait and runs fine. You can switch between apps and it works. When it wakes up from sleep, it crashes without any useful logs. When run in portrait mode, it wakes up without problems. There is an orientation change request just before the crash. https://gist.github.com/Zen-CODE/d83fdd00d83b4e3721fa69d28a241745 |
Can confirm that setting 'android.minapi = 13' in the buildozer.spec file worked for me. |
@Zen-CODE I tested right now and not work for me :( Always the same problem. When i flip the device, the app is closed (with no relevant error log) |
Well, believe it or not, the close behavior is actually by design. :( See the "Caution" note on the Android Activity lifecycle about how it closes and restarts the app each time the app changes rotation: https://developer.android.com/training/basics/activity-lifecycle/recreating.html I guess completely reloading the app is one way to ensure it will load properly in the current rotation.... ;-) Doesn't explain the crash, but perhaps it relates to the app closing at an unexpected time? One other weird thing is that it seems Android has a Bundle instance object which saves certain app state and restores it automatically, and if it only partially restores the state or the app isn't expecting Android to do any restoration, it may be creating weird effects. |
@Tungsteno74. Please could you test and give some feedback using trunk (given kolliviers' merge: #797). |
@Zen-CODE Hello. Sorry for late reply. I tried just now the master 0.33dev with pygame and given me the same issue. |
Okay. And does setting 'android.minapi = 13' in the spec file work? This is still not clear. |
Unfortunately no. At the moment the problem remains even with android.minapi = 13. |
@Zen-CODE Ok i re-installed all; the OS, buildozer and all dependencies and now work correctly with 0.33dev and android.minapi = 13. |
Awesome :-) |
The
on_pause
method is present. The app work well when the device is flipped in sdl2, but is closed with pygame backend.kivy 1.9.1
It just happens to me?
thanks
The text was updated successfully, but these errors were encountered: