The power from the source must be exactly the voltage required to charge d phone or what ever,then am sure it will charge but d battery must stil b in d phone and it must still b connected through d charger
Don't do that, the battery could explode! A charger must control the voltage / current delivered to the battery and know when to stop. Charge your cell phone battery inside the cell phone, where the correct circuitry is there to charge it.
Might I recommend u use a proper charging circuit such as the mcp73861 from microchip. I have a schematic available if needed ...make sure u use exact tolerances as you can destroy a battery or under charge it.
You can get 'generic' cell phone battery chargers all over Ebay for dirt cheap that will 'properly' charge the cell phone battery outside the phone... For the cost it's hardly worth building your own design...