It depends on how you mean about the GPS fix being good. If the provider goes to something other than available that may be a good indicator I believe.
I look at the availability of the wifi and GPS to see if GPS is ready so I can possibly get some location info. On Jan 5, 2012 10:39 PM, "gotok" <[email protected]> wrote: > James, > I'm not sure how to get fix info from onStatusChanged. The status it > gives (OUT_OF_SERVICE, TEMPORARILY_UNAVAILABLE, AVAILABLE) relates to > the GPS provider, not whether the gps fix is OK or not. Is there > something in the extras that can indicate gps fix lost? I agree that > if the provider is or becomes unavailable then the fix will be lost. > However, the provider can be available and you can still have the GPS > fix changing from OK to lost and vice versa. > > On Jan 5, 8:00 pm, James Black <[email protected]> wrote: > > You will need to go with zero meters and 1 sec perhaps. > > > > But you can also use onStatusChange to see when the signal is lost. > > > > http://developer.android.com/reference/android/location/LocationListe... > > On Jan 5, 2012 9:17 PM, "gotok" <[email protected]> wrote: > > > > > > > > > > > > > > > > > James, > > > Thanks for your help. I have seen that link and have been using the > > > approach suggested there which compares the current time to that of > > > the last location update and assumes that the fix is lost if the time > > > difference is too long. This works for me if the mintime and > > > mindistance values are both 0. However, if I set them to 1 sec and 1 > > > meter, then I start getting false indication that the gps fix is lost > > > when I am stationary since updating stops due to mindistance. The > > > solution to this issue that was proposed by a poster in that thread > > > was to issue another requestLocationUpdates, which doesn't seem like a > > > good solution to me. I can use the time difference approach and keep > > > both mintime and mindistance at 0, but I was looking for a better > > > solution. > > > > > On Jan 5, 5:14 pm, James Black <[email protected]> wrote: > > > > On the network provider you will implement onstatuschange and then > you > > > can > > > > detect. > > > > > > You can look athttp:// > > > stackoverflow.com/questions/2021176/how-can-i-check-the-curren... > > > > On Jan 5, 2012 6:32 PM, "gotok" <[email protected]> wrote: > > > > > > > I am trying to detect when a GPS fix is made (i.e. when the gps > icon > > > > > changes from blinking to solid) and when it is lost (i.e. when the > gps > > > > > icon changes from solid to blinking). The system obviously knows > when > > > > > these changes occur. I have tried using a broadcast receiver to > catch > > > > > the intent: > > > > > > > IntentFilter filter = new > > > > > IntentFilter("android.location.GPS_FIX_CHANGE"); > > > > > > > But I have not been able to get it to work. The intent seems to get > > > > > fired on GPS fix changes, but I > > > > > don't know how to determine if the intent means that the fix is > good > > > > > or bad or something else. Is > > > > > this a legitimate intent (I found from a web search) for this > purpose? > > > > > If not, what is the best way of detecting GPS Fix changes? > > > > > > > thanks... > > > > > > > -- > > > > > You received this message because you are subscribed to the Google > > > > > Groups "Android Developers" group. > > > > > To post to this group, send email to > > > [email protected] > > > > > To unsubscribe from this group, send email to > > > > > [email protected] > > > > > For more options, visit this group at > > > > >http://groups.google.com/group/android-developers?hl=en > > > > > -- > > > You received this message because you are subscribed to the Google > > > Groups "Android Developers" group. > > > To post to this group, send email to > [email protected] > > > To unsubscribe from this group, send email to > > > [email protected] > > > For more options, visit this group at > > >http://groups.google.com/group/android-developers?hl=en > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

