Reputation: 298
I just want to make sure that it is possible for the application (or all the applications) that are running at the moment in the background (as a background service or anything like that) to access location services (GPS etc.) on Android.
I would also like to know if that is correct behaviour of Android application (links to specifications etc.) and if Google is going to approve such an application for download on Google Play Store?
Is this the same for all versions of Android?
The answer seems to be YES, but I want to be 100% sure I get it right.
I had a look at following threads but I am not sure if they can answer exactly my question (availability, correct behaviour by design in Android etc.)
Location tracking in background in android
Android: How to periodically send location to a server
Send Current Location to server periodically in android
Upvotes: 0
Views: 2271
Reputation: 11992
The answer is yes, and Google will accept your app in the Play Store without any problem (as long as you do not hide to the user what your app is doing in background)
And to adress the battery-related issues that Bradly and Raghav pointed out, I strongly recommend the reading of the following article from Google : http://developer.android.com/training/efficient-downloads/index.html
Upvotes: 0
Reputation: 82533
Yes. The location services (both via GPS and Network provider) can be used in a Background service. However, keep in mind that the GPS is quite battery intensive, and prolonged use in the background could have a drastic affect on the user's battery life.
Additionally, Google Play does not have a review process for applications.
Upvotes: 2