An electronic device includes a first housing, a second housing, and a sealing member. According to the method, the DNS names of the servers of the data communication applications are identified. A distance of the remote device is determined based upon a period interval from the transmission of the initial signal to the detection of a response signal and the known positions of the access point and the electronic device.