How to programatically find my friends Gps is switched on
i am writing a code for finding a friend's distance who is near to me using GPS. whenever i select to "find a friend", it should list out the names of my friends who is within 1 Km along with their distance from me. I am accessing my contacts list in which the names and phone numbers of my friends are saved. Now am able to list the contacts name but the distance is displayed with similar value for all the conta开发者_JAVA百科cts. Actually i wanted to know how the GPS of my friends phone is detected by me.how to write the code for that. if anyone have any idea about this, please rely to this. Thanks in advance
if (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {
..
}
精彩评论