I made a WeatherSyncAdapterClass, I create a method and get the latitude and longitude value from GPS.
public void getGPS(){
Context context = WeatherSyncAdapter.super.getContext();
gps = new GpsTrack(context);
if (gps.canGetLocation()) {
while (lat == 0.0 && lon == 0.0) {
setLat(gps.getLatitude());
setLon(gps.getLongitude());
latitude = Double.toString(lat);
longitude = Double.toString(lon);
}
}
else {
gps.showSettingsAlert();
}
}
...and then I set the URI value for the "locationsetting" with this statement:
public void setLatLon(double a, double b) {
//Double.toString(weather.getLatitude()+weather.getLongitude())
LatLon = Double.toString(a+b);
}
(I just set the uri for the location setting from addition latitude and longitude ^_^, I know this is stupid)
My question is how to pass the "LatLon" value to the "mainActivity" for matching the URI? I know intent will pass the value but i think thats will be bad solution cause will (maybe) open the another activity.
please help me :(((