Please,

I developed an application that use the current location.
Testing on local I can send the Latitude and Longitude by the DDM5 and I
didn't have problem.
When I tried to do the same thing on debugging device, didn't work and on
DDM5 I can't send this information.

Is there any setup to try this ?

Here is the code
<code>

//manifest
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOC ATION"
/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCAT ION" />

//view.java -> widget configure
private Location location;
private LocationManager lm;
private LocationListener locationListener;

//onCreate
lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
locationListener = new MyLocationListener();
lm.requestLocationUpdates(LocationManager.GPS_PROV IDER, 0, 0,
locationListener);

//action
*location.distanceTo........*

private class MyLocationListener implements LocationListener
{
@Override
public void onLocationChanged(Location loc) {
if (loc != null) {
*location = loc;*
}
}

@Override
public void onProviderDisabled(String provider) {
}

@Override
public void onProviderEnabled(String provider) {
}

@Override
public void onStatusChanged(String provider, int status, Bundle extras) {
}
}
</code>



Thanks,
Luiz

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