[android-developers] Re: Dynamically getting application context

2009-05-14 Thread jrgraf...@googlemail.com
Thanks guys, didnt think of sending a broadcast, seems like the best idea, since then I wont need to do any context caching (: On May 13, 1:40 pm, adamphillips12 wrote: > Well there's a few things you can do in this situation. > > You can do this: > > public class MyClass { >   public void doPro

[android-developers] Re: Dynamically getting application context

2009-05-13 Thread adamphillips12
Well there's a few things you can do in this situation. You can do this: public class MyClass { public void doProviderEnabledStuff(String provider){} MyLocListenerClass myListner = new MyLocListenerClass() { public void onProviderEnabled (String provider) { doProviderEnabledStuff

[android-developers] Re: Dynamically getting application context

2009-05-13 Thread ellipsoidmob...@googlemail.com
You can cache the calling context in your extended LocationListener class when it is created, e.g. add a constructor that does something like: public class LocListen implements LocationListener { protected Activity m_CA; public LocListen(Activity CA) { sup