Update route continuously

Hi, would like to ask how to update a route in android and ios, is there a replace route method?
Goal is to change route when a marker changes coordinates.
Using the remove and add method causes it to blink when changing, is there a seamless way to do it?