Code example for Location

Methods: getLatitudegetLongitude

0
 
	LocationListener onLocation = new LocationListener() {
		public void onLocationChanged(Location location) { 
			// Calling back to JavaScript in case the location changes 
			StringBuilder buf = new StringBuilder("javascript:whereami("); 
			buf.append(String.valueOf(location.getLatitude())); 
			buf.append(","); 
			buf.append(String.valueOf(location.getLongitude())); 
			buf.append(")"); 
			browser.loadUrl(buf.toString()); 
		} 
 
		public void onProviderDisabled(String provider) { 
			// required for interface, not used 
		} 
 
		public void onProviderEnabled(String provider) { 
			// required for interface, not used 
		} 
 
		public void onStatusChanged(String provider, int status, Bundle extras) {