0
\$\begingroup\$

Is there a way to keep my app/game running in background even when my screen times out and goes to the lock screen on mobile (specifically Android)?

For my purposes, I prefer if it goes to the lock screen / time out screen - I don't want screen on the whole time, but I do want my app/game awake however.

\$\endgroup\$
4
  • \$\begingroup\$ What does your app need to do while the screen is off? Depending on the specific behaviours, there may be a variety of ways to allow them to keep up with real time, or catch up just in time when the screen turns back on. \$\endgroup\$
    – DMGregory
    Commented Feb 24, 2022 at 0:08
  • \$\begingroup\$ play music/sound tracks while screen is off, playing Audio clips with Audio Sources \$\endgroup\$
    – dutoit077
    Commented Feb 24, 2022 at 0:25
  • \$\begingroup\$ Ah, that might be easier. Want to edit your question to ask "How to continue playing music while mobile phone goes to lock screen?" ? \$\endgroup\$
    – DMGregory
    Commented Feb 24, 2022 at 0:34
  • 1
    \$\begingroup\$ Does this answer your question? How to play audio in Unity when a mobile game runs in the background or the screen is locked? \$\endgroup\$
    – liggiorgio
    Commented Feb 25, 2022 at 14:02

0

You must log in to answer this question.

Browse other questions tagged .