Nowadays, most human activities rely on the use of mobile devices. The recent massive adoption of this technology explains the increasing demand for specific software. In spite of the large number of available mobile applications (apps) with their different implementation forms, the user's requirements differ from one to another. To tackle this issue and also to cope with the heterogeneous settings offered by the mobile devices available, there is a need for a composition mechanism to take advantage from existing services for developing mobile apps according to user's needs and adaptive to their execution environment. Several composition mechanisms were developed in order to meet the user's requirements using existing software entities. However, these existing approaches do not have a global vision of mobile apps composition (e.g. limiting the composition objects to a one type: components only, services only…etc.). In this paper, we propose a composition mechanism for developing context-aware mobile apps. It enables the composition of existing software entities independently from their implementation platforms (i.e. reusing homogeneous or heterogeneous software entities). It also aims to customize the behavior of the desired mobile app according to the various contextual information of the mobile device. To achieve this goal we follow a metamodeling approach. We propose description languages to define the desired mobile app at several abstract levels and we implement the passage among these descriptions using transformation mechanisms. A case study is presented to illustrate the applicability and the effectiveness of this approach.