[android-developers] Re: How to query for my current location?

2008-12-10 Thread Alemao
I created the Listener and requested updates (see code below), but for some reason I'm not being notified. The method onStatusChanged() is being called instead, firstly with STATUS set to TEMPORARILY_UNAVAILABLE, then when I send the first GPS coordinate via DDMS, the method is called again with

[android-developers] Re: How to query for my current location?

2008-11-26 Thread crontabpy
Running example: package com.layout.test; import android.app.Activity; import android.content.Context; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; import android.util.Log; import android.view.Menu;

[android-developers] Re: How to query for my current location?

2008-11-20 Thread Shibbs
Use Geocoder, the newly class introduced in 1.0 SDK. Its helps in reverse geocodeing( i.e getting address from lat/lon) http://code.google.com/android/reference/android/location/Geocoder.html Thanks, Shibbs On Oct 17, 2:12 pm, Matthias [EMAIL PROTECTED] wrote: Well, in other words, this whole

[android-developers] Re: How to query for my current location?

2008-10-17 Thread Matthias
Well, in other words, this whole location manager thing is pretty broken in Android 1.0? From what I've read and experienced myself so far, it's pretty much like this: 1) LocationManager cannot be subclassed anymore, instead you use the debug bridge to send location fixes. Unfortunately, this

[android-developers] Re: How to query for my current location?

2008-10-03 Thread Nemat
Will you please provide any running example? On Oct 2, 7:34 pm, Ludwig [EMAIL PROTECTED] wrote: The getLastKnownLocation() only returns in my experience valid locations if there is elsewhere something that has subscribed to location updates, with something like this: public void

[android-developers] Re: How to query for my current location?

2008-10-02 Thread danielbr
In SDK 1.0 the LocationManager is always reporting the gps provider as disabled: LocationManager lm = this.getSystemService(Context.LOCATION_SERVICE); boolean gpsEnabled = lm.isProviderEnabled(LocationManager.GPS_PROVIDER); // gpsEnabled == false According to the Javadocs this value implies

[android-developers] Re: How to query for my current location?

2008-10-02 Thread danielbr
In SDK 1.0 the LocationManager is always reporting the gps provider as disabled: LocationManager lm = this.getSystemService(Context.LOCATION_SERVICE); boolean gpsEnabled = lm.isProviderEnabled(LocationManager.GPS_PROVIDER); // gpsEnabled == false According to the Javadocs this value implies

[android-developers] Re: How to query for my current location?

2008-09-29 Thread zl25drexel
Guillaume, I understand that i need to mock the the current location in the emulator, but my question is what api calls do i make to get the lat/ lon that i put in DDMS. I cannot find any documentations related to that in android's documentation. On Sep 28, 4:53 am, Guillaume Perrot [EMAIL

[android-developers] Re: How to query for my current location?

2008-09-29 Thread zl25drexel
for those who are looking for solutions for this same question, here's what I have, seems to work well with For telnet: telnet localhost 5554 geo fix lat lon this.locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); Location myLocation =

[android-developers] Re: How to query for my current location?

2008-09-28 Thread Guillaume Perrot
And you have to manually simulate your location using telnet or DDMS controls in Eclipse (the latter only works if your OS is in english locale). For telnet: telnet localhost 5554 geo fix 2 40 On 28 sep, 04:05, Mark Murphy [EMAIL PROTECTED] wrote: zl25drexel wrote: Hi, sorry i am sure this

[android-developers] Re: How to query for my current location?

2008-09-27 Thread Mark Murphy
zl25drexel wrote: Hi, sorry i am sure this had been asked before, how do i find out my current lat/lon using the location API? You can't, per se. You can call getLastKnownLocation() to return, well, the last known location, but that may be null (if there have been no locations recorded for