A system for detecting the indoor and outdoor location of a mobile device user, comprising: a) one or more Wi-Fi Access Points, APs,); b) one or more mobile devices, adapted to scan for Wi-Fi APs and receive a Received Signal Strength Indication, RSSI, level of one or more detected AP; and c) a training set comprising Wi-Fi fingerprints, each Wi-Fi fingerprint comprising: i) RSSI levels of each detected AP; and ii) a label indicating if the mobile device was indoors or outdoors when obtaining the Wi-Fi fingerprint; d) a trained classifier being a software module, adapted to: i. receive as input one or more Wi-Fi fingerprints from the training set, the system characterized in that the trained classifier is further adapted to: ii. cluster the one or more Wi-Fi fingerprints by using a distance/similarity function that is based on rank correlation, which aims to measure the relationship of different ordinal variables, wherein each fingerprint is referred to as an ordinal variable where the APs are ranked from the strongest to the weakest; iii. generate a fingerprint transition graph, the graph being an undirected, cluster transition graph, the nodes of which are the clusters; and iv. classify, using a dedicated classification algorithm each node of the fingerprint transition graph to indoor or outdoor, by extracting features related to the RSSI of the nodes. a) one or more Wi-Fi Access Points, APs,); b) one or more mobile devices, adapted to scan for Wi-Fi APs and receive a Received Signal Strength Indication, RSSI, level of one or more detected AP; and c) a training set comprising Wi-Fi fingerprints, each Wi-Fi fingerprint comprising: i) RSSI levels of each detected AP; and ii) a label indicating if the mobile device was indoors or outdoors when obtaining the Wi-Fi fingerprint; d) a trained classifier being a software module, adapted to: i. receive as input one or more Wi-Fi fingerprints from the training set, the system characterized in that the trained classifier is further adapted to: ii. cluster the one or more Wi-Fi fingerprints by using a distance/similarity function that is based on rank correlation, which aims to measure the relationship of different ordinal variables, wherein each fingerprint is referred to as an ordinal variable where the APs are ranked from the strongest to the weakest; iii. generate a fingerprint transition graph, the graph being an undirected, cluster transition graph, the nodes of which are the clusters; and iv. classify, using a dedicated classification algorithm each node of the fingerprint transition graph to indoor or outdoor, by extracting features related to the RSSI of the nodes. i. receive as input one or more Wi-Fi fingerprints from the training set, the system characterized in that the trained classifier is further adapted to: ii. cluster the one or more Wi-Fi fingerprints by using a distance/similarity function that is based on rank correlation, which aims to measure the relationship of different ordinal variables, wherein each fingerprint is referred to as an ordinal variable where the APs are ranked from the strongest to the weakest; iii. generate a fingerprint transition graph, the graph being an undirected, cluster transition graph, the nodes of which are the clusters; and iv. classify, using a dedicated classification algorithm each node of the fingerprint transition graph to indoor or outdoor, by extracting features related to the RSSI of the nodes. <EOS>