Well thanks for your reply but ma dear friends i have mentioned that i
m getting data through MockLocation e.g using DDMS view by Hardcoding
the Longitude and Latitude.

If i want to communicate with GPS and get ma location from there.How
can that happen?
Please help me.


On Nov 20, 6:22 pm, Charlie Collins <[EMAIL PROTECTED]> wrote:
> I am not sure I follow the question here, in terms of Mock vs
> "actual" (are you using the emulator, or an actual device, and if you
> are using the emulator remember you have to send a location to it
> before it will have a location set, if you just start it up, it won't
> know where it is - use the DDMS tool or such).
>
> Location location = this.locationManager.getLastKnownLocation
> (locationProvider);
>
> Where locationManager is a LocationManager:
> locationManager = (LocationManager) this.getSystemService
> (Context.LOCATION_SERVICE);
>
> And locationProvider is a LocationProvider that represents "gps":
> locationProvider = this.locationManager.getProvider("gps");
>
> A Location object has lat/long and more (depending on the 
> provider):http://code.google.com/android/reference/android/location/Location.html.
>
> You can also register to get location updates using a
> LocationListener, or a BroadcastReceiver (and MyLocationOverlay,
> though it's a bit more coarse grained).
>
> On Nov 19, 8:55 am, "salman.geek" <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi to all.
> > Im facing some problems in getting the actual coordinates through the
> > GPS.Using the LocationBasedService API i have got the coordinates
> > provided by the Mock location as mentioned in the Api but please Help
> > me in making DIrect communication with the GPS.
>
> > How can i get the Coordinates from the GPS?
>
> > The samples which i have got from internet was all from the old sdks.
> > Im using the latest Android  SDK version 1.0.
> > Please Help me as soon as possible i will be really grateful to all of
> > u.
>
> > Regards,
> > Salman Khursheed- Hide quoted text -
>
> - Show quoted text -

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