I am creating an Android class library that makes calls in the internal REST API, and also uses the Geocoder class for Android (specifically getFromLocation ()), which requires Context. I planned to make the IntentService library so that it runs asynchronously, but I cannot figure out how to handle the Context (the GeoLoc call is in a separate class that is part of the library that IntentService calls).
My question is: how do I get the context needed to instantiate android.location.Geocoder from an IntentService?
source share