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

Freeze on app resume from sleep #2

Closed
slime73 opened this issue Dec 28, 2013 · 14 comments
Closed

Freeze on app resume from sleep #2

slime73 opened this issue Dec 28, 2013 · 14 comments
Labels
bug Something isn't working

Comments

@slime73
Copy link
Member

slime73 commented Dec 28, 2013

Original report by kyle_emmerich (Bitbucket: kyle_emmerich, ).


To reproduce:

Open the app, turn your phone screen off, then turn it back on. Often times, the phone will freeze right before hiding the unlock screen (if you have unlock on) and may take a long time before continuing, if at all.

It seems that it only happens when the app is actually active and on the foreground when resuming.

Tested on a Moto X, Android version 4.4.

@slime73
Copy link
Member Author

slime73 commented Dec 28, 2013

Original comment by kyle_emmerich (Bitbucket: kyle_emmerich, ).


In the meantime, you can use a camera shortcut on your unlock screen if you have one if you forget to exit the app before letting the phone sleep.

@slime73
Copy link
Member Author

slime73 commented Dec 29, 2013

Original comment by Martin Felis (Bitbucket: MartinFelis, GitHub: MartinFelis).


It should be fixed as of eaf4e6d. I have uploaded a new package to http://fysx.org/~martin/shared/love_android_sdl2_fixresume.apk. Please test and let me know if it fixes your problem.

@slime73
Copy link
Member Author

slime73 commented Jan 5, 2014

Original comment by Pavol Rusnak (Bitbucket: prusnak, GitHub: prusnak).


I think putting back

android:screenOrientation="landscape"

and adding

android:configChanges="orientation|screenSize"

would be a better fix. But I am not sure because I can't reproduce the issue with landscape orientation in the first place.

@slime73
Copy link
Member Author

slime73 commented Jan 6, 2014

Original comment by Martin Felis (Bitbucket: MartinFelis, GitHub: MartinFelis).


With recent versions I cannot reproduce the problems either on 3 different devices. The bug itself is fixed IMO.

Can you explain to an android layman as me what the benefit if your configuration is?

@slime73
Copy link
Member Author

slime73 commented Jan 6, 2014

Original comment by Pavol Rusnak (Bitbucket: prusnak, GitHub: prusnak).


With android:screenOrientation="undefined" my game starts in portrait mode which is undesired. Most of the games require screen wider than higher, so landscape seems like a sane default.

@slime73
Copy link
Member Author

slime73 commented Jan 7, 2014

Original comment by Landon “Karai” Manning (Bitbucket: karai17, GitHub: karai17).


Exposing such configuration to love would probably be the ultimate solution. Allowing people to configure love in conf.lua for android devices would be terrific.

#!lua
function love.conf(t)
  t.android = true
  t.android.orientation = "landscape"
  t.android.* = *
end

@slime73
Copy link
Member Author

slime73 commented Jan 7, 2014

Original comment by Martin Felis (Bitbucket: MartinFelis, GitHub: MartinFelis).


@karai17 yes, that is a good suggestion and would be the ultimate solution, however it is only indirectly related to this issue. Feel free to open another issue for that.

@slime73
Copy link
Member Author

slime73 commented Jan 7, 2014

Original comment by Martin Felis (Bitbucket: MartinFelis, GitHub: MartinFelis).


As others and me do not experience the bug anymore I see this issue as fixed.

@slime73
Copy link
Member Author

slime73 commented Jan 7, 2014

Original comment by Martin Felis (Bitbucket: MartinFelis, GitHub: MartinFelis).


@prusnak unfortunately

#!java

screenSize

is not available in the targeted targeted API level (10) with the result that the screen stays stuck in landscape mode. Any suggestions how to deal with it?

@slime73
Copy link
Member Author

slime73 commented Jan 10, 2014

Original comment by Martin Felis (Bitbucket: MartinFelis, GitHub: MartinFelis).


Orientation will have to be specified individually for each game in the AndroidManifest.xml, also if you want the game to automatically rotate the screen.

@slime73 slime73 closed this as completed Jan 10, 2014
@slime73
Copy link
Member Author

slime73 commented Jan 10, 2014

Original comment by Pavol Rusnak (Bitbucket: prusnak, GitHub: prusnak).


You claim that orientation will have to be specified individually. Wouldn't it be better to have "landscape" as default, which is OK in 95% of the cases instead of "unspecified" which will have to be changed in all cases (both portrait and landscape)?

Also comment with API level (10) is now irrelevant since you bumped that to level 12, is that right?

@slime73
Copy link
Member Author

slime73 commented Jan 10, 2014

Original comment by Martin Felis (Bitbucket: MartinFelis, GitHub: MartinFelis).


Yes, I agree landscape will be best in most cases. Will change that soon.

targetSdkVersion is 12, however minSdkVersion is still 10 so it does run perfectly fine on 2.3.X. I would prefer to keep this compatibility.

@slime73
Copy link
Member Author

slime73 commented Mar 4, 2014

Original comment by Pablo Mayobre (Bitbucket: PabloMayobre, GitHub: PabloMayobre).


May I add that you can just rotate the scene with love.graphics.rotate?

We just need some kind of gyroscope support and we are done

@slime73
Copy link
Member Author

slime73 commented Mar 5, 2014

Original comment by Pablo Mayobre (Bitbucket: PabloMayobre, GitHub: PabloMayobre).


I made this today. I'm not sure whether it works in every phone or just mine so please tell me if it works right

OrientationFull.love

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant