The idea of coupling a telephone receiver to a carbon microphone goes back a long way, but the first more-or-less practical devices emerged in 1904. They were not very good, giving a lot of distortion and having unpredictable gain, but they are a great example of people using the technology at hand. They were replaced in telephone service by valves (tubes) around 1914.
They were invented in the late 1800s but were really perfected in World War II. More info here:
They are still used today, though not commonly. You see them occasionally in safety critical systems, due to the fact that mag amps are simple, rugged, and reliable, and are less likely to fail than a more modern semiconductor type of design.