I advise you to follow this path so that you can work on the possibilities:
1 - When creating a ** (addMarker) ** marker, immediately save latitude and longitude information to the database.
2 - Now below are situations in which you will need an update at that specific point you registered in the database and according to each event you perform the updates:
mapa.setOnMarkerDragListener(new OnMarkerDragListener() {
@Override
public void onMarkerDragStart(Marker marker) {
// Primeiro contato
}
@Override
public void onMarkerDragEnd(Marker marker) {
// Fim contato
}
@Override
public void onMarkerDrag(Marker marker) {
// Contato contínuo
}
});
Now you might be wondering why do not find a possibility for onLongClickListener in a marker ? Well ... You do not have to wait for your client to give a second click on the marker to be able to save an information in the database, since your application has the objective of salavr locations and also it will prefer to move a marker by the map, than clicking on each map point after you miss a position or want to update that particular position.
Font