Oh, yeah sorry about that :D
I hadn't realised that you can use the application context like that.
So, yes in my onPerformSync I am able to do:
FooApp app = (FooApp) getContext().getApplicationContext();
Thanks, I'm still unsure how to acheive what I'm after from here, but it's
a step forward..


On 17 July 2013 20:56, TreKing <[email protected]> wrote:

>
> On Wed, Jul 17, 2013 at 11:50 AM, fr1550n <[email protected]>wrote:
>
>> That leads to an error: Cannot make a static reference to the non-static
>> method getApplicationContext() from the type Context.
>>
>
> Well, sure. I was just showing you the class and method you needed.
>
>
>> Also, that call would only obtain the application context which is not
>> the same as the Application singleton
>>
>
> Yes it is. Try it. I just did.
>
>
> -------------------------------------------------------------------------------------------------
> 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
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Android Developers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/android-developers/KtvZ7D_EKfI/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to