Creating Android Location Object -


i using geocoder class fetch multiple location objects using following code:

geocoder geocoder = new geocoder(this, locale.getdefault());    list<address> addresses = geocoder.getfromlocation(latitude, longitude, 3);    address[] addresses_array = new address[addresses.size()];      addresses.toarray(addresses_array);     for( int = 0; < addresses_array.length; i++ ){        //create location object here        locobj.setlatitude(latitude);        locobj.setlongitude(longitude);     } 

in addition, inside forloop, trying dymanically create location objects add array;

how can create blank location objects ?

assuming refer android.location.location use constructor takes provider string , set whatever want.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -