Skip to content Skip to sidebar Skip to footer

Handling App Suspend/resume On Android In Kivy

I started developing an app with Kivy for Android and managed to build and run an APK today. Couldn't find a straight answer on how to handle my app being suspended and resumed by

Solution 1:

I have never used Kivy or developed for android, but I was able to find:

This

From the link:

If you just want your app to not be closed completely (so that it doesn't restart entirely with the splash screen etc. every time), you just have to add an on_pause method to your App class, and it should return True. You can also do any pre-pause stuff in this method. However, the app doesn't really keep running, it just keeps memory state.

If you want it to do computations in the background you can use Python-for-android.


Solution 2:

Kivy has an on_pause and on_resume methods that you can use to handle these events. These are methods of the main App class that are called automatically for you.


Post a Comment for "Handling App Suspend/resume On Android In Kivy"