I have a program that requires a single GPS fix when a service is started. This is needed to tell an on location change when the last location is. How to get 1 开发者_如何学运维single GPS fix in an android service?
Ive found a way! all i did was defined a boolean StartUp
then made this true in oncreate then if (StartUp = true){
DistanceMoved=1000000f;
StartUp=false;}
this will work if your location is done with distance moved.
精彩评论