[android-developers] Re: Application context

2009-10-09 Thread Gopal Biyani
If you want to call getApplicationContext in your Foo class, it better to pass Context reference as a parameter in method DoSomethingWithCurrentContext() or you can pass in constructor while instantiating the Foo class. I think there is no other way to access the context object. On Thu, Oct 8,

[android-developers] Re: Application context

2009-10-08 Thread Mark Murphy
Phillip wrote: I'm trying to retrieve the current application's context indirectly from an object that my application uses. For example, I have a MyApp class that extends Activity which itself extends Context. From within MyApp I declare a variable of type Foo, where Foo is a utility class

[android-developers] Re: Application Context

2008-12-04 Thread Dianne Hackborn
Nope, there is no current context. You need to explicitly supply the context. On Wed, Dec 3, 2008 at 4:02 PM, Cezar Augustus Signori [EMAIL PROTECTED] wrote: Hi! It would be pretty good to obtain the application context from a static method, without the use of an Activity object. I