Mobile data traffic has been experiencing a phenomenal rise in the past decade. This ever-increasing data traffic puts significant pressure on the infrastructure of state-of-the-art cellular networks. Recently, device-to-device (D2D) communication that smartly explores local wireless resources has been suggested as a complement of great potential, particularly for the popular proximity-based applications with instant data exchange between nearby users. Significant studies have been conducted on coordinating the D2D and the cellular communication paradigms that share the same licensed spectrum, commonly with an objective of maximizing the aggregated data rate. The new generation of cellular networks, however, have long supported heterogeneous networked applications, which have highly diverse quality-of-service (QoS) specifications. In this paper, we jointly consider resource allocation and power control with heterogeneous QoS requirements from the applications. We closely analyze two representative classes of applications, namely streaming-like and file-sharing-like , and develop optimized solutions to coordinate the cellular and D2D communications with the best resource sharing mode. We further extend our solution to accommodate more general application scenarios and larger system scales. Extensive simulations under realistic configurations demonstrate that our solution enables better resource utilization for heterogeneous applications with less possibility of underprovisioning or overprovisioning.