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.
Comments (18)
-
reporter -
reporter - edited description
-
repo owner 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.
-
repo owner -
assigned issue to
-
assigned issue to
-
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.
-
repo owner 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?
-
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. -
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.
function love.conf(t) t.android = true t.android.orientation = "landscape" t.android.* = * end
-
repo owner @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.
-
repo owner - changed status to resolved
As others and me do not experience the bug anymore I see this issue as fixed.
-
repo owner @prusnak unfortunately
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?
-
repo owner - changed status to open
-
repo owner 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.
-
repo owner - changed status to resolved
-
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?
-
repo owner 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.
-
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
-
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
- Log in to comment
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.