I want to use the Android Geofencing API on a custom hardware running Android.

The Geofencing API itself holds an Apache 2.0 license (https://github.com/googlesamples/android-play-location/tree/master/Geofencing)

Still, the API comes as a part of Google Mobile Services for which one must pay.

Knowing the API Licensing condition, can one use it without GMS?

  • That license looks like only the license of the sample project, not the API itself. Most APIs aren't licensed in this way. Dec 7, 2016 at 7:47

2 Answers 2


There is nothing in the Apache license that would restrict the usage of the API code. For instance, this means you could use this API code and possibly substitute GMS for another service. Whether this is technically possible or not is not the point (and I do not know the answer to this).


Technically google-s geofencing-api is implemented on google-servers so you cannot use google-s api without their service.

But you can use the alternatice opensource implementation lost-geofences which has a local implementation without the need for gms

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.