", it will not work with flashlight apps "

That means it likely needs repair. You can try a full reset (I'll defer to the web on that) but it seems "used" so I'm unsure what warranty you have. Repair of such phones usually cost more than a new phone so get a price and decide.
Bob