nearby_locations.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
PlacePicker.IntentBuilder builder = new PlacePicker.IntentBuilder();
startActivityForResult(builder.build(getApplicationContext()), PLACE_PICKER_REQUEST);
}
});
The getApplicationContext()
in builder.build is underlined with an error saying it is looking for an activity not a context. I've tried casting but no luck, what should I do?