Hi,
I'm trying to make my first Android application with Kivy.
It's almost working.
I have no problem launching my application on android.
It seems to work fine, except that when Android resume the application, after switching between application or just turn the tablet on/off, I get a black screen.
I can reproduce this behavior with a very simple application:
main.py:
import kivy
kivy.require('1.10.1')
from
kivy.app import App
from kivy.uix.boxlayout import BoxLayout
try:
from android.permissions import request_permissions, Permission
request_permissions([Permission.READ_EXTERNAL_STORAGE])
request_permissions([Permission.WRITE_EXTERNAL_STORAGE])
except:
pass
class ABugLayout(BoxLayout):
pass
class ABugApp(App):
def build(self):
root = ABugLayout()
return root
def on_pause(self, *args, **kwds):
return True
if __name__ == '__main__':
app = ABugApp()
app.run()
abug.kv:
#: kivy 1.10.1
<ABugLayout>:
orientation: "vertical"
Label :
text : "Just a bug"
size_hint: None, None
size : self.texture_size
Image:
source: "./icons/test.png"
I've build my application on linux with the following configuration:
- Ubuntu 20.04 LTS
- Buildozer 1.2.0
- Python 3.8.1
- Kivy 1.11.1
I have a very simple buildozer.spec file with default configuration.
I've tested this on an android Samsung Galaxy Tab A (Android 9) and on a One Plus 7 phone (Android 10).
Is there anything to configure to prevent that black screen on resume ?
Regards,
Elby
It seems I'm