On Sat, Apr 3, 2010 at 4:01 AM, Vladimir <[email protected]>wrote:

> "this" here points to your OnClickListener instance, while you need
> Context. Try "new Intent(getApplicationContext(), ...)" instead
>

No, DO NOT use getApplicationContext() ... EVER. It causes nothing but
problems.
Use whatever context is currently available and valid. In this case, you
have a view coming in to the function so you can use v.getContext().
Of if this code is an inner class inside an Activity, you can do
MyActivity.this.

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 
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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to