java - Initializing Context class in an Android application (for OSMdroid) -


how initialize "context context" correctly in case. android studio tells me should initialized, dont know how. if set null, app crashes @ start.

this @ top of class:

mylocationnewoverlay mlocationoverlay; 

this on over create method:

context context = null;     this.mlocationoverlay = new mylocationnewoverlay(new gpsmylocationprovider(context),map);     this.mlocationoverlay.enablemylocation();     map.getoverlays().add(this.mlocationoverlay); } 


Comments

Popular posts from this blog

sql - can we replace full join with union of left and right join? why not? -

javascript - Parallax scrolling and fixed footer code causing width issues -

iOS: Performance of reloading UIImage(name:...) -