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

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -