I have an activity that receives user input through EditTexts. The project I'm working on will make essential use of location values also.When a user takes a photo they are automatically transferred to the DataEntry activity. What I'd like to achieve is to automatically fill two TextViews with the location values and obviously have the variables to use later on. The image below will illustrate what I mean. I've tried a few methods out but keep getting bizzare errors. Can anyone help me out?
I'm looking to fill the blank textviews under lat and long with location values. I have two methods to get the Lat and Long values and I then assign the resulting string to a static variable which populates the TextView but I can't get it to produce a result.\[code\]public Location getLongitude(){ LocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE); Location location = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER); longitude = location.getLongitude(); longitudeString = String.valueOf(longitude); return longitudeString; }public Location getLatitude(){ LocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE); Location location = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER); latitude = location.getLatitude(); latitudeString = String.valueOf(latitude); return latitudeString;}*/\[/code\]