Mobile Cloud Computing is an active research domain to investigate the ways of achieving a federation between mobile computing and cloud computing. Whereas, Ambient Intelligence aims to teach our mobile devices how to behave smart in our environment, narrowing the gap between people, their devices and the environment. These two domains behave as backbone for ubiquitous environment around us where everything is connected by sharing information and resources. Mobile devices use cloud resources to cope with ever-growing computing and storage demands for smart applications. Context provisioning in the cloud and mobile connectivity will give rise to new interactions with cloud infrastructure to effectively manage context information. However, as a lot of contextual information is being sensed and captured by mobile devices, it is not always clear whether it makes sense to upload all the raw sensed data to the cloud and have it processed there. Many resource and performance trade-offs exist for federated deployment of smart mobile applications. In this paper, we present a quality-aware federated framework to overcome the challenges for smart applications and to support the development and deployment of these applications, while opportunistically using cloud computing. The framework highlights the aspects of Quality-of-Context (QoC) provisioning and dynamic adaptability under uncertain context. (C) 2014 The Authors. Published by Elsevier B.V.