This way a circle is created in the Google map api v3 of Android. Assuming you already know how to communicate with your database.
Circle circle = map.addCircle(new CircleOptions()
.center(new LatLng(-33.87365, 151.20689))
.radius(10000)
.strokeColor(Color.RED)
.fillColor(Color.BLUE));
As you can see, you have the following values to save in order to redraw the circle: new LatLng(-33.87365, 151.20689)
and radius(1000)
.
Therefore you will keep the following three elements of the circle captured by the user in your Database.
double latitud = circle.getCenter().latitude;
double longitud = circle.getCenter().longitude;
double radio = circle.getRadius();
guardarCircleEnBaseDeDatos(latitud,longitud,radio);
Later, as we saw in the beginning, you can draw the circles with their coordinates and their radius.
//Creas un objeto circulo de una clase creada previamente por ti para facilitar el trabajo.
Circulo circulo = ObtenerCirculoDeBD();
double latitud = circulo.getLatitud();
double longitud = circulo.getLongitud();
double radio = circulo.getRadio();
Circle miCirculoDeLaBD = map.addCircle(new CircleOptions()
.center(new LatLng(latitud , longitud))
.radius(radio)
.strokeColor(Color.RED)
.fillColor(Color.BLUE));
I leave the documentation,
link .