Search code examples
androidgoogle-location-servicesgoogle-awareness

Getting location with the Google Play Services Location API vs getting it with the Awareness API


I've read many good comparisons between Android's framework location API and the Google Play Services Location API. However, is there any benefit in using (exclusively to obtain location) the Google Play Services Awareness API over the Google Play Services Location API?


Solution

  • It really depends on your exact use case & requirements.

    • If you just need to know the location or want to receive locations updates regularly, go with the LocationServices.FusedLocationApi.

    • If you have more complex, contextual requirements, for example you need to know when a user starts walking, or when a user enters an area, or something else that is based on the context of the user, you want to use the Awareness API.

    To answer your question

    However, is there any benefit in using (exclusively to obtain location) the Google Play Services Awareness API over the Google Play Services Location API?

    No, none at all. The Awareness API was not created exclusively with the purpose of obtaining locations. LocationServices.FusedLocationApi was however, so use that.