GPSで現在地の座標を取得

取りあえずコードだけ。未テスト

コード

		double latitude, longitude;
		
		//GPSから座標を取得する
		LocationManager locationmanager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);
		Location location = locationmanager.getLastKnownLocation("gps");
		
		latitude = location.getLatitude();
		longitude = location.getLongitude();