Search Unity

Game is preventing the lock screen from appearing

Discussion in 'Android' started by GermyGames, Oct 17, 2013.

  1. GermyGames

    GermyGames

    Joined:
    May 20, 2012
    Posts:
    38
    I'm running into an issue where the lock screen won't appear at all while my game is running on a device. If I hit the power button to put the device to sleep, pressing it again will immediately take me to the game instead of showing the lock screen. The same goes for when the device goes to sleep normally.

    Is there some sort of setting that could cause this to happen? I've already made sure that I'm not requesting the wake lock permission in the manifest. It's pretty frustrating :neutral:
     
  2. Agent_007

    Agent_007

    Joined:
    Dec 18, 2011
    Posts:
    899
    Do you have any plugins that might alter the manifest?
     
  3. Deathbyhugs

    Deathbyhugs

    Joined:
    May 20, 2013
    Posts:
    1
    I am having the same problem i make sure wake lock is not in permissions Application.runInBackground is false but i never see the lock screen just right back to my app. Help please!
     
  4. bitter

    bitter

    Unity Technologies

    Joined:
    Jan 11, 2012
    Posts:
    530
    If you are in "Development Mode" this is the default behavior of the application.
     
    Gazu, chrismarch, wu_nan_nan and 5 others like this.
  5. NathanWarden

    NathanWarden

    Joined:
    Oct 4, 2005
    Posts:
    663
    I know this is a very old thread, but it's also the first one to come up in a search. Is there a way to disable this behavior?

    When the game plays ads instead of showing the ad it shows the lock screen and ends up giving us lots of bug reports from our playtesters. We need these builds to be dev builds, but also be as close to release in behavior as possible. Thanks! :)
     
    Katunator and Donghun-Lim like this.
  6. Katunator

    Katunator

    Joined:
    Oct 23, 2018
    Posts:
    5
    Hi! Have the same issue, but after lock screen ad starts working and all is ok. May be you have found the answer? Would be cool :)
     
  7. santhosh_kumar_15

    santhosh_kumar_15

    Joined:
    Nov 12, 2019
    Posts:
    2
    if i press the power button mobile went to sleep if i press again it directly get me into game its bypassing mobile lock i want to lock the mobile if user press the power button any way plz?
     
  8. Katunator

    Katunator

    Joined:
    Oct 23, 2018
    Posts:
    5
    Sorry, but we don't have such a problem, our problem was described a post above :)