Search Unity

Unity 4.3 applications freeze Android after pressed the home button

Discussion in 'Android' started by baptisteLar, Nov 14, 2013.

  1. Groucho

    Groucho

    Joined:
    Dec 24, 2009
    Posts:
    73
    Me too!
     
  2. niko-belic

    niko-belic

    Joined:
    Sep 1, 2012
    Posts:
    67
    This problem exists almost unbelievable 6 months.
    I think that the repair will not be soon.

    it is a loss because
    *Android 2.3.x is still around 18%
    share market
     
  3. Sor

    Sor

    Joined:
    Sep 25, 2013
    Posts:
    19
    I have open issues for this report in fogbugs, too. Just no reply from Unity. This is rather piss-poor support, especially when I'm using a Pro version, already upgraded through Unity 5.

    Support from Unity for bugs like this that have a thread, plus bug submissions open (and not looked-at), is terrible.

    One thing that needs to be addressed is the terrible support given when a product is not doing what it is supposed to.

    Fogbugz: 'Case 598745'
     
  4. Sor

    Sor

    Joined:
    Sep 25, 2013
    Posts:
    19
    I received a reply from Unity on this and the original bug report (linked in the thread above).

    I just thought everyone with the issue would like to know that a future release addresses this issue, the bug report just does not reflect which release has the included fix.

     
  5. zoxmax1

    zoxmax1

    Joined:
    Dec 18, 2010
    Posts:
    154
    hello I use if (Input.GetKeyDown("escape") )
    Application.Quit(); and it work on galaxy S it is back button.
     
  6. QuinnWinters

    QuinnWinters

    Joined:
    Dec 31, 2013
    Posts:
    494
    We're having this problem as well. Tried the following and it didn't help a bit, though it seemed the most logical of any code posted in this thread. That horrendous hack posted a page or so back is so "horrendous" that I'm afraid to even try it, especially since I don't understand most of what's going on in it.

    Is this specifically a 4.3 issue? If my team downgraded to 4.2 or below would the problem disappear? We'll likely try doing just that but it would be nice to have an idea of exactly which version the problem started in.
    Code (csharp):
    1.     if (Application.platform == RuntimePlatform.Android) {
    2.  
    3.         if (Input.GetKey (KeyCode.Home) || Input.GetKey (KeyCode.Escape) || Input.GetKey (KeyCode.Menu)) {
    4.        
    5.             Application.Quit ();
    6.             return;
    7.        
    8.         }
    9.  
    10.     }
     
  7. RodrigoAbreu

    RodrigoAbreu

    Joined:
    Jan 29, 2013
    Posts:
    12
    I did it to solve my android problem:

    Code (csharp):
    1.  
    2. void Update(){
    3.    if(Application.platform.Equals(RuntimePlatform.Android)  
    4.      (Input.GetKey(KeyCode.Escape) || Input.GetKey(KeyCode.Home))){
    5.      System.Diagnostics.Process.GetCurrentProcess().Kill();
    6.    }
    7. }
    8.  
    This one above can result in an Activity rebound sometimes, so you can also try this workaround:

    Code (csharp):
    1.  
    2. void Update(){
    3.    if(Application.platform.Equals(RuntimePlatform.Android)  
    4.      (Input.GetKey(KeyCode.Escape) || Input.GetKey(KeyCode.Home))){
    5.      StartCoroutine("Quit");
    6.    }
    7. }
    8.  
    9. IEnumerator Quit(){
    10.    while(true){
    11.       yield return new WaitForSeconds(0.1f);
    12.       Application.Quit ();      
    13.    }
    14. }
    15.  
     
    Last edited: May 3, 2014
  8. ConjureScape

    ConjureScape

    Joined:
    Feb 14, 2013
    Posts:
    445
    This is no solution even if you manage to get it to work. My app got rejected, because when the home button is pressed the game is supposed to pause, not quit.
     
  9. raiden

    raiden

    Joined:
    Feb 8, 2009
    Posts:
    333
    This is terrible, I can't even release my game! Testing on Samsung Galaxy S, totally flakes out my phone, some times it even reboots. This is a pretty major bug, and if Unity has fixed this, they should act quick.
     
  10. Groucho

    Groucho

    Joined:
    Dec 24, 2009
    Posts:
    73
    Does anyone know if there's a minimum OS we can set that will keep this from happening? I.e. is this only a 2.3.x problem? I'm planning on releasing the Android version of my new game soon and it'd be great to have this working.
     
  11. Sor

    Sor

    Joined:
    Sep 25, 2013
    Posts:
    19
    We've just released for 4.0+. Had various 4+ devices to test on and it seems fine. Game's been running without process kill on multiple test devices and user personal devices without ending the process for 10+ days on some of them, as well.

    Losing ~20% of the market isn't the best, but we prefer higher-end devices, so cutting out 2.3.3 isn't that bad for us - as it alleviates a lot of potential problems.

    Hope this helps.
     
  12. Groucho

    Groucho

    Joined:
    Dec 24, 2009
    Posts:
    73
    Yeah, the game I'm working on isn't meant for old devices, so I'm happy to go 4.0+. I'll just go that route with it. For other games, it sure would be nice to support back to 2.3.x though.
     
  13. niko-belic

    niko-belic

    Joined:
    Sep 1, 2012
    Posts:
    67
    Yes, only 4.0 + + it seems reasonable solution.
    2.3xx share slowly declines. will be soon belong to history. ;)
     
  14. niko-belic

    niko-belic

    Joined:
    Sep 1, 2012
    Posts:
    67
    Unity 4.5 is here tested someone?
     
  15. Starya

    Starya

    Joined:
    Apr 7, 2014
    Posts:
    9
  16. TimThomas

    TimThomas

    Joined:
    Jul 2, 2014
    Posts:
    1
    I was seeing this issue too on Samsung Galaxy devices. My game was published using Unity 4.3. I updated to Unity 4.5 last night, republished, and the black screen / freezing problem is gone.
     
    niko-belic and Starya like this.
  17. razielstriker

    razielstriker

    Joined:
    Mar 4, 2015
    Posts:
    3
    any update on this? Have consistent crashes with Unity 5 on an Samsung Galaxy S running Gingerbread 2.3.3 whenever i press the home button and come back.