It also depends on the battery type (a lot).
Detecting discharge is usually based on voltage (but that voltage varies with load)
Detecting a full charge is sometimes based on voltage alone, sometimes often there's a top-up charge applies after reaching a certain voltage. Other battery types a full charge is indicated by the rate of change of temperature, or even a small dip in the voltage.