I am binding to a service to access GPS data. However I can't access
the data directly because it is local to the LocationListener class. I
have attempted to create a shared preference and access it that way:

SharedPreferences prefs =
getSharedPreferences(USER_SHARED_PREFERENCES, MODE_WORLD_READABLE);
Editor editor = prefs.edit();
long latitude = Math.round(loc.getLatitude());
long longitude = Math.round(loc.getLongitude());
editor.putLong(USER_LATITUDE, latitude).commit();
editor.putLong(USER_LONGITUDE, longitude).commit();

but the activity seems not to be able to access it and the
documentation seems to indicate that shared preferences can only be
used with activities. Is there a way for me to access this data once
the service is bound?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to