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 -

Laravel mail error `Swift_TransportException in StreamBuffer.php line 269: Connection could not be established with host smtp.gmail.com [ #0]` -

c# SetCompatibleTextRenderingDefault must be called before the first -