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

android: using gps app cannot resume from pause #112

Closed
pat1 opened this issue Feb 5, 2015 · 5 comments
Closed

android: using gps app cannot resume from pause #112

pat1 opened this issue Feb 5, 2015 · 5 comments

Comments

@pat1
Copy link

pat1 commented Feb 5, 2015

if I use gps the app is stalled every times android go to sleep mode.
If I put gps.stop() in on_pause method the app is stalled too.

I/python (29483): [INFO ] [Android ] Must go into sleep mode, check the app
I/python (29483): >>>>>>>>> called on appication pause
I/python (29483): going to save status
I/python (29483): [INFO ] [Android ] App paused, now wait for resume.
I/WindowManager( 2038): Input event dispatching timed out sending to org.test.rmap/org.renpy.android.PythonActivity
E/ActivityManager( 2038): ANR in org.test.rmap:python (org.test.rmap/org.renpy.android.PythonActivity)
E/ActivityManager( 2038): 0.3% 26952/org.test.rmap:PythonService: 0.1% user + 0.2% kernel / faults: 54 minor

@trivedigaurav
Copy link
Member

@pat1 I assume you are talking about the example gps app. I didn't implement on_resume for the app (http://kivy.org/docs/api-kivy.app.html#kivy.app.App.on_resume) so you can expect this behavior. This can be fixed.

I am not sure what exactly you mean when you say: "If I put gps.stop() in on_pause method the app is stalled too.".

@pat1
Copy link
Author

pat1 commented Feb 6, 2015

I have my own app (not the example gps app). I have implemented on_stop on_pause on_resume.
The app works well; the app works if I use gps (gps.configure; gps.start; gps.stop). The app works if the phone go to sleep mode after I have called gps.stop. The app flash il I call gps.configure, gps.start and the the phone go to sleep. The app flash with or without gps.stop in on_pause method.
I can try to write a test case starting from gps example

@pat1
Copy link
Author

pat1 commented Feb 7, 2015

I found a problem in my app; I can replicate the freeze in modified gps example:
https://gist.github.com/7f74e5158c49974fc557
how to reproduce:
activate gps by button
go with the phone to sleep mode
exit from sleep mode
the app is frozen

there is a bug in my main.py ; uncomment line 74 and all work well.
So it's not a true plyer bug but you can take in account this condition.
Paolo

@kiok46
Copy link
Contributor

kiok46 commented Dec 8, 2016

@pat1 your gist link doesn't exist anymore. please update it for future references.
I think this issue could be closed?

@kiok46 kiok46 closed this as completed Dec 8, 2016
@pat1
Copy link
Author

pat1 commented Dec 9, 2016

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