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
Post a Comment