0

Hy.
I am new to Android and I want to create an app that needs the user's current location. I am wondering which API should I use, specifically: the platform location API in android.location or the Google Location Services API, part of Google Play Services - http://developer.android.com/guide/topics/location/strategies.html. Basically I would like to know if most of the devices support the newer API.
Thank you in advance.

scarleth ohara
  • 357
  • 2
  • 12

1 Answers1

1

Yes, all the devices which have latest Google play services installed will work with the new API.

According, to sources the new API (Fused Location Provider) consumes very less amount of battery and will notify the change in location immediately to our app, if used with intent service even if the user not inside our app.

You can get an example with the name LocationUpdates in the latest android sdk's.

For further info, you can go through the following links:

https://developer.android.com/google/play-services/location.html

http://www.kpbird.com/2013/06/fused-location-provider-example.html

https://developer.android.com/training/location/retrieve-current.html

Fused Location Provider in Android

Community
  • 1
  • 1
Hariharan
  • 24,741
  • 6
  • 50
  • 54
  • So basically most devices will have the latest Google play services? As I said, I am really new to Android... – scarleth ohara Dec 03 '13 at 12:07
  • @scarlethohara ya mostly all the devices will have that installed since Google have pinned many of his features to revolve around it..But without knowing that some users may uninstall the app or updates thinking to preserve CPU usage.. – Hariharan Dec 03 '13 at 12:09
  • @scarlethohara if you feel my answer has explained your query, kindly accept it.. – Hariharan Dec 03 '13 at 12:19