Home > Software design >  How i can run unity app in background on Android?
How i can run unity app in background on Android?

Time:11-23

I have a problem, I need my Android app to stay active when it's in the background.

Application.runInBackground = true;

CodePudding user response:

From this unity question:

Project Settings, Player, Resolution and Presentation, check the Run in Background option.

CodePudding user response:

Android application created by Unity can't run in background. Application.runInBackground is ignored on Android and iOS platforms. In case of Android, Unity app extend Activity class which run only when app in the focus. If you want run something in background you should extend and write logic in Service class. It`s good described here. But for it need to write you own plugin or something similar to this.

  • Related