Wireless sensor networks (WSNs) are being used in a wide variety of critical applications such as military and health-care applications. Such networks, which are composed of sensor nodes with limited memory capacity, limited processing capabilities, and most importantly limited energy supply, require routing protocols that take into consideration these constraints. The aim of this paper is to provide an efficient power aware routing algorithm for WSNs that guarantees QOS and at the same time minimizes energy consumption by calculating the remaining battery capacity of nodes and taking advantage of the battery recovery process. We present an online-battery aware geographic routing algorithm. To show the effectiveness of our approach, we simulated our algorithm in ns2 and compared it with greedy perimeter stateless routing for wireless networks and battery-aware routing for streaming data transmissions in WSNs.