This question already has an answer here:
I want to make an UPS for my raspberry PI, but the UPS needs to be able to supply power to the pi for several hours.
So I mean this:
The pi originally gets power from the wall socket, but in case there is a power outage, the pi needs to continue to run. The problem is, I don't have an ethernet nor wifi connection on the pi (because it's a standalone application).
The batteries need to be recharged when the power is back.
How can I acheve this?