With wireless sensor networks popularity growth, numerous cross-layer routing protocols have been proposed. These proposals are mainly designed to address the limitations in energy resources of the sensor nodes. However, advances in technology have led to a wide variety of possible applications with many different requirements. The routing protocol should not only take into account the energy resources but it also should be able to adapt to different application requirements making different routing decisions. Here we present a flexible cross-layer algorithm based on a cost function to provide multi-objective adaptability to existing routing protocols that aims to balance the requirements of multiple applications and the resource constrained sensor network nodes. Computer simulations and real hardware experiments demonstrate that the cross layer algorithm applied over a collection protocol improves the performance for different application requirements and shows that energy resources are conserved through dynamic parameter tuning.