In this paper, the Service-Oriented Device Composer (SODC) is proposed to support ubiquitous service automation with considering QoS and resource management. A ubiquitous service is regarded as a distributed application carried out via the cooperation among a selected set of devices. Thus, it is essential to arrange the resource-limited devices for all requested ubiquitous services in a bandwidth-limited network and to consider service quality simultaneously. To achieve this goal, we first formulate the Resource-constrained Device Composition Problem (RDCP) with the objective of optimizing the service quality of all requested ubiquitous services. However, RDCP is subject to the resource and bandwidth constraints. In our work, RDCP is transformed into a Multi-dimension Multi-choice Knapsack Problem (MMKP) by dimension reduction technique. Thus, any efficient MMKP approximation solution is easily applied to solve RDCP. Finally, the experimental result shows the proposed approach is capable of satisfying various user-specific service qualities in resource-constrained ubiquitous environments.