I am making a portable phone charging battery for fun. I have a micro USB input that ties to a 5V - 4.2V buck converter to charge a li-ion battery. The IC is made to charge batteries so I think that part is fine. I then go from the battery to a 5V boost converter that connects to a USB receptacle so you can charge your phone. I use a dedicated charger port IC between the USB data lines to make it charge most devices (correct me if I'm wrong).
Basically I want an explanation on what happens if I have a wall outlet plugged in to charge the battery while I have a phone plugged into the output also charging. Is that okay? How does the battery create the 5V rail (from the 4.2 to 5V boost) if charge is being pumped into it? Wouldn't charge need to leave it to make +5VDC?!
Is there any precautions I need to make to ensure it can charge a device while also being charged?