In this paper we present a novel algorithm aiming at connecting members of a community equipped with mobile devices based on their location. Initially, these users are far from each other and they are not able to benefit from the high speed of Wi-Fi ad-hoc mode, and thus they can not exchange real-time media such as streaming music. Based on a centralized server, we employ user locations in order to direct them to new locations where connectivity is available. We distinguish two types of user behavior, cooperative and non-cooperative. The former, follows the commands of movement systematically whereas the latter has its own movement. Our objective then is to maximize the number of connected users while minimizing the traveled distances walked by cooperative users.