Could that issue be solved yet? I could not receive anything from DDMS
as well.
On Sep 25, 9:22 am, Cristina [EMAIL PROTECTED] wrote:
I have downloaded some gpx files from this
webhttp://tramper.co.nz/?view=browsegpxFiles
So. DDMS location tool loads them ok..I am able to se both the points
and the track...and when I pressed the button play it seems that is
processing the file...but my test application doesnotreceive
anything.
Ludwig, can you please write in this thread a brief example of a GPX
file that works for you? Maybe the problem is related with the gpx I
have downloaded
I include also some of my test code, maybe there is somthing I have
misssed
By the way, I am running on Windows XP SP2 ...
Thanks in advance
public class LocationTest extends MapActivity implements
LocationListener {
private LocationManager mLocationManager= null;
private LocationProvider mLocationProvider = null;
private MapView mMapView = null;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mLocationManager =
(LocationManager)getSystemService(Context.LOCATION_SERVICE);
Criteria criteria = new Criteria ();
criteria.setAccuracy(Criteria.ACCURACY_FINE);
ListString providerIds
=mLocationManager.getProviders(criteria, true);
if (!providerIds.isEmpty()) {
mLocationProvider =
mLocationManager.getProvider(providerIds.get(0));
}
mMapView = new MapView(this, tid);
mMapView.getController().setZoom(20);
setContentView(mMapView);
MyLocationOverlay myLocationOverlay = new MyLocationOverlay
(this, mMapView);
mMapView.getOverlays().add (myLocationOverlay);
myLocationOverlay.enableMyLocation();
// Para que si me muevo mire constantemente la localizacion
mLocationManager.requestLocationUpdates(mLocationProvider.getName(),
0, 0, this);
}
[EMAIL PROTECTED]
protected boolean isRouteDisplayed() {
return false;
}
public void onLocationChanged(Location location) {
updateView(location);
}
public void onProviderDisabled(String provider) {
}
public void onProviderEnabled(String provider) {
}
public void onStatusChanged(String provider, int status, Bundle
extras) {
}
private void updateView (Location location) {
Double lat = location.getLatitude()*1E6;
Double lng = location.getLongitude()*1E6;
GeoPoint point = new GeoPoint(lat.intValue(),
lng.intValue());
mMapView.getController().setCenter(point);
}
}
On 24 sep, 18:06, Ludwig [EMAIL PROTECTED] wrote:
I donothave a problem playing GPX files from DDMS and my code continues to
work ok with 1.0.
The only change required was to remove the calls to the two methods you
mention when subscribing to location updates.
(I am running on Vista, just in case this is a platform issue)
Ludwig
2008/9/24 Cristina [EMAIL PROTECTED]
Hi!
I have downloaded SDK 1.0 this morning, so I have tried to migrate
some code I have to this version.
When trying to migrate MockLocationProvider Ifoundthat some methods
have dissapeared from LocationManager:
setTestProviderEnabled
addTestProvider
It seems that itnotpossible to create a Mock Provider by code any
more...
I have also checked DDMS Location controls, but they seem tonotbe
working either in this version.
Maybe I am doing something wrong, but I have tried kml and gpx. In
both cases my kml/gpx files loads ok, but when I click on play
button, my application doesnotreceive the locations.
I have test thegeocommand, and it works...so by the moment I am
using this, although it is a little hard to write every point in order
to do tests...
Has anybody managed to make DDMS locations tools to work in 1.0? Is it
possible to create a mock location provider by code in this version?
Is there any other way to automate this? maybe an script that calls
geoutility?
Thanks in advance- Ocultar texto de la cita -
- Mostrar texto de la cita -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
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
-~--~~~~--~~--~--~---