0
I need to update a text in the notification bar but I can’t keep calling the same notification because in the tests I did when I call again it flashes my notification.
I have an app that picks up the gps coordinates and would like as I’m walking it to show me these coordinates in the Notification. In the method below is where I can 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();
}
}
Put the code of the test you did, from it will be easier to help you.
– ramaral
@ramaral put, I need to keep updating the notification bar whenever I change the location. There is no way I keep calling the notification because it keeps blinking, I just want to update the text within the notification.
– William