Code example for Location

Methods: getLatitudegetLongitudetoString

	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 { 
Connect your IDE to all the code out there  Get Codota for Java