Philip K. Dick
Do Androids Dream of Electric Sheep? is the story of a bounty hunter policing the local android population. It occurs on a dying, poisoned Earth. All  "successful" humans have left, the only remaining inhabitants of the planet are people with no prospects off-world. Androids, also known as andys, all have a preset "death" date. However, a few andys seek to escape this fate and supplant the humans on Earth.