charging battery with solar panel

Hello, I made a device withe the Nano. This device runs on 3.7V. So I use a a 3.7V li-ion battery. But for out door use, I have a 6V solar panel. Now I would like to combine them both.
I would like to have the solar charge the Li-ion battery when it's out door in the sun and power the device.
and at night, the device will be powered by the battery. How do I go about to do that?

If you Google "arduino li-ion battery shield" you will find that there are several producdrs of a plug-in solution to your Problem. The shields are usually designed to just plug in the Li-Ion, the solar Panel, and the Arduino. The Arduino Project is powered either from the sun or the battery and if there is more power coming from the solar Panel than is used for the Project, the remainder will be used to Charge the batter.

I haven't used one of These shields, but I have used lots of other products from These manufactureres and it really is quite easy.