if (Geocoder.isPresent()) {
geocoder = new Geocoder(MapActivity.this.getactivity,Locale.getDefault());
This is inside doitbackground
of asynctask
. It is inner class
of mapactivity.
But i cant do this. The error is:
mapactivity not enclosing class
When i make only this.
it says
in geocoder can not be applied context
"The constructor Geocoder(Context, Locale) is undefined"?
Error: The constructor Geocoder (Context, Locale) is undefined
those did not work because i am in inner class. I cant use constructor to initialize context?
Also putting inner class name as first parameter did not work.
Error:
no suitable constructor found for Geocoder(RetrieveFeedTask,Locale)
constructor Geocoder.Geocoder(Context) is not applicable
(actual and formal argument lists differ in length)
constructor Geocoder.Geocoder(Context,Locale) is not applicable
(actual argument RetrieveFeedTask cannot be converted to Context by method invocation conversion)