@@ -0,0 +1,1664 @@
+package rs.elfak.mosis.marko.discounthunt;%0A%0Aimport android.location.LocationListener;%0Aimport android.location.LocationManager;%0Aimport android.os.Bundle;%0A%0Aimport org.json.JSONException;%0Aimport org.json.JSONObject;%0A%0Apublic class CurrentLocation %7B%0A    private LocationListener mLocationListener;%0A    private LocationManager mLocationManager;%0A    private double lat, lng;%0A%0A    public CurrentLocation(LocationManager locationManager)%7B%0A        mLocationManager = locationManager;%0A        mLocationListener = new LocationListener() %7B%0A            @Override%0A            public void onLocationChanged(android.location.Location location) %7B%0A                lat = location.getLatitude();%0A                lng = location.getLongitude();%0A            %7D%0A%0A            @Override%0A            public void onStatusChanged(String provider, int status, Bundle extras) %7B%0A%0A            %7D%0A%0A            @Override%0A            public void onProviderEnabled(String provider) %7B%0A%0A            %7D%0A%0A            @Override%0A            public void onProviderDisabled(String provider) %7B%0A%0A            %7D%0A        %7D;%0A        try %7B%0A            mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 3000, 0, mLocationListener);%0A            mLocationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 5000, 0, mLocationListener);%0A        %7Dcatch (SecurityException ex) %7B%0A            System.out.println(%22Error!%22);%0A        %7D%0A    %7D%0A%0A    public JSONObject toJSONObject() %7B%0A        JSONObject jsonObject = new JSONObject();%0A        try %7B%0A            jsonObject.put(%22lat%22, lat);%0A            jsonObject.put(%22lng%22, lng);%0A        %7Dcatch (JSONException ex) %7B%7D%0A        return jsonObject;%0A    %7D%0A%7D%0A

Implement CurrentLocation class