I have a location listener activity and I want to make toast notifications. But it will not let me pass this
as the context. How should I make toast work?
If the toast is located inside your activity class, you could use YourActiviy.this
where YourActivity
is the class name. If it's outside your class, you'll need to get your activity context (pass it in the constructor etc).