![]() ![]() what process will get shut down first on android depends on a lot of factors like that, including supposedly memory use. If you want to make it less likely that android will kill your app you can connect a service from your android process or keep something on display all the time(like an invisible floater, whatever), post an ongoing notification or like that. (what tseng said, while technically being what google tells you, isn't strictly how android and dalvik/adt lifecycles work). after that you have to import to some ide or build from the command line, but before that go edit the unityactivity. It will continue to run as long as the activity isn't killed.Įasiest manual method is to export the project from unity (choose "google android project" when building and the export button appears). Of course it will use battery, if you consider it a waste is another thing though of course, but there are times you would want it to happen.Īll you need to do is edit out the calling of unity players paused method from the activity your unity app is running in. ![]() don't always assume the google beginner "this is how it must be" beginner docs are true, because they're not. it will run until the os kills the app though if you just leave a thread running in there - you could leave it running even if you remove the activity(and still don't have a service).Īnd you can have an UI without having an activity, like the fb floaters. the "service" normally is just that, except it hooks up to the android api to tell that it's running and can receive messages and would rather not get shut down by the OS. You can run stuff in background simply by creating a java thread(which creates a linux thread.). A service however, can't have any visible parts, hence running a game or even unity as a service is impossible." is not true at all. the setting is supposed to work.Īnd strictly speaking, "The only way to run stuff in background on Android is through a Service. ![]() ![]() (some mobile vr like gear depends on it). It's supposed to work in android now too. ![]()
0 Comments
Leave a Reply. |