I need to update a text in the notification bar but I can not keep calling the same notification because in the tests I made when I call again it flashes my notification.
I have an app that takes the coordinates of the GPS and I would like as I'm walking it shows me these coordinates in the Notification. In the method below is where I get all the coordinates, I would like to show Latitude and Longitude in the notification bar.
@Override
public void onLocationChanged(Location location) {
// TODO Auto-generated method stub
try {
lati = location.getLatitude();
longi = location.getLongitude();
altitude = location.getAltitude();
precisao = location.getAccuracy();
time = location.getTime();
velocidade = location.getSpeed();
editTextVelo.setText(velocidade+" KM");
//Preciso chamar Notificação aqui dentro atualizando sempre que houver uma mudança de localização.
} catch (Exception e) {
// progDailog.dismiss();
// Toast.makeText(getApplicationContext(),"Unable to get Location"
// , Toast.LENGTH_LONG).show();
}
}