BTW I am using a Nexus S.

On Feb 28, 10:24 pm, dmodroid <[email protected]> wrote:
> Below is my code.  My app was working fine, then the GPS just stopped
> getting a signal, after working fine for months. It hasn't come back
> for 2 days.  It is just stuck on "searching for GPS".
>
> And actually, I think my Navigation app that came with the phone also
> has trouble getting GPS, I'm still testing it. (so maybe this is a
> hardware question).
>
> What types of things could I try on my phone?  Maybe I jacked
> something up when I messed with settings or something.  Thanks.
>
>     private static final long MINIMUM_DISTANCE_CHANGE_FOR_UPDATES =
> 1; // in Meters
>     private static final long MINIMUM_TIME_BETWEEN_UPDATES = 500; //
> in Milliseconds
>
>        locationManager = (LocationManager)
> getSystemService(Context.LOCATION_SERVICE);
>         Toast toast = Toast.makeText( getApplicationContext(),
> "setting up location manager" ,Toast.LENGTH_SHORT);
>         toast.show();
>         Criteria crta = new Criteria();
>         crta.setAccuracy(Criteria.ACCURACY_FINE);
>         crta.setAltitudeRequired(false);
>         crta.setBearingRequired(false);
>         crta.setCostAllowed(true);
>         crta.setPowerRequirement(Criteria.POWER_MEDIUM);
>         String provider = locationManager.getBestProvider(crta,
> true);
>
>         locationManager.requestLocationUpdates(
>                 provider,
>                 MINIMUM_TIME_BETWEEN_UPDATES,
>                 MINIMUM_DISTANCE_CHANGE_FOR_UPDATES,
>                 new MyLocationListener()
>         );

-- 
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

Reply via email to