I had a similar problem. This may help someone. After a screen replacement the iphone 4 would just shutoff and only power up when connected to a power source. I opened it back up and re-seated the battery connector. Everything worked fine, only to have it happen again within an hour or so. After the third time of this happening, I finally noticed a very small area on the battery connector cable where maybe it had been bent or twisted too much, and a section of wire was exposed. I put a small strip of electrical tape over the exposed wire and it has been functioning normally ever since.