Petr Urban
Petr Urban

Reputation: 298

Is it possible for Android application that is running in background to use location or GPS services

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

android handler loop

Android: I want to obtain location using GPS in the background for use with a directions tool in my app, how?

Upvotes: 0

Views: 2271

Answers (2)

Orabîg
Orabîg

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

Raghav Sood
Raghav Sood

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

Related Questions