开发者

how to get a single gps fix in android?

开发者 https://www.devze.com 2023-04-06 18:07 出处:网络
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 an

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号