This paper proposes a new location recognition algorithm for automatic check-in applications (LRACI), suited to be implemented within Smartphones, integrated in the Cloud platform and representing a service for Cloud end users. The algorithm, the performance of which is independent of the employed device, uses both global and hybrid positioning systems (GPS/HPS) and, in an opportunistic way, the presence of Wi-Fi access points (APs), through a new definition of Wi-Fi FingerPrint (FP), which is proposed in this paper. This FP definition considers the order relation among the received signal strength (RSS) rather than the absolute values. This is one of the main contributions of this paper. LRACI is designed to be employed where traditional approaches, usually based only on GPS/HPS, fail, and is aimed at finding user location, with a room-level resolution, in order to estimate the overall time spent in the location, called Permanence, instead of the simple presence. LRACI allows automatic check-in in a given location only if the users' Permanence is larger than a minimum amount of time, called Stay Length (SL), and may be exploited in the Cloud. For example, if many people check-in in a particular location (e.g., a supermarket or a post office), it means that the location is crowded. Using LRACI-based data, collected by smartphones in the Cloud and made available in the Cloud itself, end users can manage their daily activities (e.g., buying food or paying a bill) in a more efficient way. The proposal, practically implemented over Android operating system-based Smartphones, has been extensively tested. Experimental results have shown a location recognition accuracy of about 90%, opening the door to real LRACI employments. In this sense, a preliminary study of its application in the Cloud, obtained through simulation, has been provided to highlight the advantages of the LRACI features.