This is a very good solution for charging your Li-Ion batteries for your projects. This is actually what Panagiotis Kalogieris did for a project of his which he was going to use a typical Li-Ion cellphone battery. The MCP73831/2
Tiny 500mA linear charge management controller. Includes integrated pass transistor, integrated current sensing, and reverse discharge protection in 5-pin SOT-23 and thermally-efficient 8-pin 2mm x 3mm DFN packages
The MCP73831/2 devices are cost-effective linear charge management controllers with very small footprint (2MMx3mm DFN or 5-lead SOT23 package). They require a minimum amount of external components to operate making them suitable for portable devices or USB-powered applications.
The MCP73831/2 employ a constant-current/constant-voltage charge algorithm with selectable
preconditioning and charge termination. The constant
voltage regulation is fixed with four available options: 4.20V, 4.35V, 4.40V or 4.50V, to accommodate new,emerging battery charging requirements. The constant current value is set with one external resistor. The MCP73831/2 devices limit the charge current based on die temperature during high power or high ambient conditions. This thermal regulation optimizes the charge cycle time while maintaining device reliability
This is the Charger that Panagiotis made for his application: