In this paper, we describe a system to support the generation of adaptive mobile learning environments. In these environments, students and teachers can accomplish different types of individual and collaborative activities in different contexts. Activities are dynamically recommended to users depending on different criteria (user features, context, etc.), and workspaces to support the corresponding activity accomplishment are dynamically generated. In this paper, we present the main characteristics of the mechanism that suggests the most suitable activities at each situation, the system in which this mechanism has been implemented, the authoring tool to facilitate the specification of context-based adaptive m-learning environments, and two environments generated following this approach will be presented. The outcomes of two case studies carried out with students of the first and second courses of Computer Engineering at the Universidad Autónoma de Madrid are also presented.