Code example for Location

Methods: getLatitudegetLongitudetoString

0
	public IBinder onBind(Intent intent) {
		return null; 
	} 
 
	public void onLocationChanged(Location loc) {
	   Log.d(TAG, "onLocationChanged with Location: " + loc.toString());
	   // Get the current registrationId. This might be "nokey"! 
	   registrationId = showRegistrationId();
	   double myLng = loc.getLongitude();
	   double myLat = loc.getLatitude();
	   if (registrationId != null) {        		
		   AsyncSubmitLocationChange do_submit_location_change = new AsyncSubmitLocationChange();
		   do_submit_location_change.execute(String.valueOf(myLng), String.valueOf(myLat), registrationId);
	   } 
	} 
	 
	class AsyncSubmitLocationChange extends AsyncTask<String, Void, Void> {
		URL url;
		protected Void doInBackground(String... param) {
			try { 
				url = new URL("http://tw.silverwraith.com/cgi-bin/updatelocation.py");