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

How to navigation buttons #61

Closed
pkor opened this issue May 17, 2013 · 1 comment
Closed

How to navigation buttons #61

pkor opened this issue May 17, 2013 · 1 comment

Comments

@pkor
Copy link

pkor commented May 17, 2013

I have a kivy app that needs to close threads pythonically when exited, but when the user touches the back or home buttons on the navigation bar the app freezes because the python activity did not get a proper exit() call and thus the threads keep running. Since Android does not allow for the Nav bar to be disabled I need a work around for this. I'm thinking that using PyJnius I can have a 'os._exit(True)' called when the backbutton is pressed. The only thing is I have no idea how I would do this. I came here to ask the question because I don't know of a forum where I could ask. Thank you for any help!

@akshayaurora
Copy link
Member

kivy-users forum http://groups.google.com/group/kivy-users
You could also just use #Kivy on irc.

Take a look at the KivyApp
LifeCyclehttp://kivy.org/docs/guide/basic.html#kivy-app-life-cycle,
essentially you should be using on_pause and on_stop to clean up.
Probably on_resume to restart your threads. It's not guaranteed that
on_resume will be called though so you should be make preparations on
on_pause accordingly.

Best Regards

On Sat, May 18, 2013 at 1:07 AM, pkor notifications@github.com wrote:

I have a kivy app that needs to close threads pythonically when exited,
but when the user touches the back or home buttons on the navigation bar
the app freezes because the python activity did not get a proper exit()
call and thus the threads keep running. Since Android does not allow for
the Nav bar to be disabled I need a work around for this. I'm thinking that
using PyJnius I can have a 'os._exit(True)' called when the backbutton is
pressed. The only thing is I have no idea how I would do this. I came here
to ask the question because I don't know of a forum where I could ask.
Thank you for any help!


Reply to this email directly or view it on GitHubhttps://github.com//issues/61
.

@tito tito closed this as completed May 19, 2013
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

3 participants