Freeze on app resume from sleep

Issue #1 resolved
kyle_emmerich created an issue

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)

  1. kyle_emmerich reporter

    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.

  2. Pavol Rusnak

    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.

  3. Martin Felis 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?

  4. Pavol Rusnak

    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.

  5. Landon “Karai” Manning

    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
    
  6. Martin Felis repo owner

    @Pavol Rusnak 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?

  7. Martin Felis 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.

  8. Pavol Rusnak

    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?

  9. Martin Felis 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.

  10. Pablo Mayobre

    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

  11. Log in to comment