Switching between a solar cell and battery?
In practice, most choose to use the simple approach of powering the device directly from the battery, with your alternate supply (PV panel in this case) running a battery charger wired parallel to the battery.

This approach gives 0-latency 'switching' between solar/batt. power &amp; requires the lowest complexity &amp; component count to accomplish your stated goal.