- Home /
Can unity run in the background on mobile for tracking purposes?
Hi there
I need to send/store GPS location of a user for instance, every hour (This will be done on mobile and with the user's consent of course).
The app will have an interface that can be opened by the user to change settings, view a log of locations etc etc but the tracking will need to happen whether the app is "open" or not.
Is it possible to do this with unity and if so, how?
Update:
've seen a few applications on android ask the user if they may "run in the background" on the install screen.
I don't have a device with iOS but I'm guessing it has something similar, so having an app report a location periodically should be quite possible. My question is:
is it possible with unity?
This thread will help you.
http://answers.unity3d.com/questions/344770/how-to-get-gps-coordinates-in-unity-3d.html
Thanks but that doesn't tell me whether the unity built app has to be open and running for me to track the user. I'm not worried about getting the location. I need to TRAC$$anonymous$$ the location even if the USER DOESN'T HAVE THE APP OPEN.
unity was designed to deploy games so i don't think it would run in the background, whats more any mobile OS kills off your background app if it ever needs memory so its not even sure it will be kept in memory at all
Aha. That makes sense. Though I've come a cross a few apps that issue re$$anonymous$$ders or give notifications about other various things which would imply some way of running in the background or at least telling the OS to run a specific bit of app related code every so often. Any ideas if something like that is achievable?
Answer by olegekbondar · Apr 30, 2017 at 05:30 PM
Hey, Here is an instruction: http://www.devhelp.me/unity-background-location-service-step-by-step/
Your answer
Follow this Question
Related Questions
How do I test my game in the web player? 1 Answer
Game launches as background process in windows 2012 0 Answers
iOS game - Run GPS in background? 2 Answers
App goes to the background when an external process causes error. How to keep app foreground? 0 Answers
run in background and Screen.showCursor dont works 0 Answers