1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
@Override
public void onLocationChanged(Location position)
{
try{
setLatitude(position.getLatitude());
setLongitude(position.getLongitude());
setAltitude(position.getAltitude()) ;
setPrecision(position.getAccuracy()) ;
setVitesse(position.getSpeed());
setFournisseur(position.getProvider());
setDirection(position.getBearing()) ;
//setSat(location.getExtras());
setDate(java.text.DateFormat.getDateTimeInstance().format(Calendar.getInstance().getTime()));
String msg = String.format(getResources().getString(R.string.new_location), getLatitude() , getLongitude() , getAltitude() , getPrecision() , getVitesse() , getDate() , getFournisseur() , getDirection());
Toast.makeText(Receive.this, msg, Toast.LENGTH_LONG).show();
}catch (Exception e) {
// TODO: handle exception
e.getCause() ;
}
}
}; |
Partager