Camera Failed Error in Samsung S5

One of our Samsung Galaxy S5 smartphones started giving us an error whenever we tried to open the built in camera application.
Other than this, the phone has worked flawlessly for many years!
We tried all of the online suggestions such as making sure that the phone’s firmware was up to date; clearing the camera app cache; doing a soft reboot of the phone; doing a hard reboot of the phone (which meant installing the phone from scratch) but still nothing worked.
I was about to put the phone back in the drawer, when I realised that the one thing that I hadn’t tried, was to remove the back of the phone and take out the battery for a few seconds. Then put the battery back in and try the camera app again.
So I proceeded to take off the back cover of the phone and removed the battery for a few seconds and then reinstalled it.
I booted up the phone and guess what…the camera now worked!!!!
I realise that many of the newer phones have non-removable batteries so if this the case with yours, try to let your phone battery drain down to zero and try again. If your camera app still gives you this error then you’ll need to take it to a professional to open the back of the phone and do the battery reboot.