Skip to content
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 doesn't support pause mode' when using on_pause method #1518

Closed
fr3nzy opened this issue Dec 10, 2018 · 2 comments
Closed

App doesn't support pause mode' when using on_pause method #1518

fr3nzy opened this issue Dec 10, 2018 · 2 comments

Comments

@fr3nzy
Copy link

fr3nzy commented Dec 10, 2018

Versions

  • Python: 3.60
  • OS: Ubuntu 18.04
  • Kivy:1.10.1

Description

Apk created using p4a, command used:

p4a apk --private $HOME/Documents/Code/Kivy/kivytest --package=org.example.myaasdqpp --name "My appliasacation" --version 0.1 --bootstrap=sdl2 --requirements=kivy,python3crystax,pyjnius,android,sdl2 --ndk-dir $HOME/Documents/Code/crystax-ndk-10.3.2 --android-api 28 --arch=armeabi-v7a

Whenever the home button is pressed or the screen is switched off, report for the app crash appears and according to the logs, python for android ends:

12-10 20:47:23.996  6150  6150 I python  : [INFO   ] [WindowSDL   ] App doesn't support pause mode, stop.
12-10 20:47:23.997  6150  6150 I python  : INFO:kivy:[WindowSDL   ] App doesn't support pause mode, stop.
12-10 20:47:23.998  6150  6150 I python  : [INFO   ] [Base        ] Leaving application in progress...
12-10 20:47:23.998  6150  6150 I python  : INFO:kivy:[Base        ] Leaving application in progress...
12-10 20:47:24.201  6150  6171 I python  : Python for android ended.

The back button does not mention App doesn't support pause mode, stop., but ends right away.

Code and Logs

import kivy
kivy.require('1.10.1')

from kivy.app import App
from kivy.uix.relativelayout import RelativeLayout

class Root(RelativeLayout):
	def __init__(self):
		super().__init__()


class WhatToday(App):
	def build(self):
		 return Root()
	def on_pause(self):
		pass

WhatToday().run()

This occurs whilst using the crystax ndk and sdl2 as the bootstrap. I am unable to run the android ndk or pygame to test as a comparison because both bring about errors that have no mention on the internet. Since using the crystax ndk and sdl2 are the only ways I can successfully create an apk.

@jtoledo1974
Copy link
Contributor

I believe on_pause should return True so that the app doesn't stop. See https://stackoverflow.com/questions/20719383/run-the-application-in-background

@jtoledo1974
Copy link
Contributor

Having said that there is something really wrong with SDL2, as I've been able to check with python3:
See kivy/kivy#6075.
I understand this is a critical bug as it is basic functionality in the default configuration.

@fr3nzy fr3nzy closed this as completed Dec 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants