Charging the li-ion battery takes a special kind of procedure. If the voltage of the battery is under a set threshold, the battery must first be preconditioned with a small charging current. Then, when it reaches a second threshold, the battery must be charged using constant current untill it reaches 80% of its voltage. The last 20% will be charged using a constant voltage of 4.2V. Battery management ICs exist for exactly this purpose, and can be simple to implement.
A suitable IC for a single cell li-ion battery pack is the MCP73831, supporting a charging current of up to 500mA. The IC will take any input voltage between 4.2V to 5V. It is recommended to keep the charging current under 1C, meaning that for our 850mAh battery, the charging current must be kept under 850mA. Charging current is programmed using a resistor as describedin the datasheet.
The MCP73831 features a status pin that will be high-Z (high impedance) when no voltage source is connected or the battery is fully charged, and pulled to GND when the battery is charging. Connecting this pin to the microcontroller lets the device tell the user via a LED when the battery is charged up. An internal pull up must be activated in order to pull the signal HIGH during high-Z.
I must mention that though charging li-ion cells to 4.2V is standard practice for maximising charge, charging the cell to 4.1V or 4.0V can prolong the lifetime of the cell substantially. Read more about that at Battery University. Few charger ICs offer you to set this limit, though some of them can be set to 4.1V.