On Fri, Mar 4, 2011 at 8:38 AM, Jake Colman <[email protected]> wrote:
> I am creating a class that is not an Activity or a Service. I need that > class to be able to get a hold of, for example, the Location Manager. > If I had a context I would call > > (LocationManger)context.getSystemService(...) > > How do I obtain a context in this situation? > Is there a reason you can't pass the Context as a parameter to the function that actually needs it? Or get access to the LocationManager at a higher level, where you have a Context, and then pass that a parameter? ------------------------------------------------------------------------------------------------- TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

