简体   繁体   中英

Measure distance between two Android phones

I am a beginner in Android app development. My doubt is how to measure the distance between to phone connected through internet. And how to display the two phone as a point on both phone.

First you need to learn about android programming but here are some clue for you:

For measure the distance between two phones, You need to know the location of each phone. With android LocationManager you can get last location from GPS or network and then you can find distance from difference between two latitude and longitude.

For display position of other phones, you can use google map api in your app.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM