I am currently using a timer to determine if a location listener has timed out ? The problem is that the gps remains on. I don’t know why , is there a method i can override when the locationlistener times out or a more elegant method ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Consider adding a GPS status listener to your location manager. The status listener is informed when the GPS starts, stops, receives a first fix, or the satellite status (no. of visible satellites, you need at least 4 for a fix) changes.
The listener may look like this:
It is added as follows:
You don’t need to remove the location listener when the GPS status changes.
You also can get additional information from the location manager by overriding one of the following methods: