1. Technical Field
The embodiments of the present disclosure relate to positioning systems and methods, and particularly to an electronic device and a method for determining a position of the electronic device relative to another electronic device.
2. Description of Related Art
Touch screens are widely used in electronic devices such as mobile phones. Some applications may be designed to function between two electronic devices that both include touch screens. For example, a user may combine touch screens of two electronic devices to emulate one large touch screen. However, before implementing such application, a position of one electronic device relative to the other electronic device is needed to be determined.
The disclosure is illustrated by way of example and not by way of limitation in the figures of the accompanying drawings in which like references indicate similar elements. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean “at least one.”
In general, the word “module”, as used herein, refers to logic embodied in computing or firmware, or to a collection of software instructions, written in a programming language, such as, Java, C, or assembly. One or more software instructions in the modules may be embedded in firmware, such as in an erasable programmable read only memory (EPROM). The modules described herein may be implemented as either software and/or computing modules and may be stored in any type of non-transitory computer-readable medium or other storage device. Some non-limiting examples of non-transitory computer-readable media include CDs, DVDs, BLU-RAY, flash memory, and hard disk drives.
The first electronic device 10 may further include a storage system 102 and at least one processor 103. The storage system 102 may be a dedicated memory, such as EPROM, a hard disk drive (HDD), or flash memory. In some embodiments, the storage system 102 may also be an external storage device, such as an external hard disk, a storage card, or other data storage medium.
In step S301, the connection module 200 establishes a communication connection between the first electronic device 10 and the second electronic device 11. In one example, the first electronic device 10 is connected to the second electronic device 11 via a wireless network.
In step S302, the obtaining module 210 prompts a user to slide an object (e.g., a finger or stylus) from the first touch screen 100 to the second touch screen 110, obtains a departure touch point and a departure time that the object departs from the first touch screen 100, and obtains an arrival touch point and an arrival time that the object arrives at the second touch screen 110. In one embodiment, each of the first touch screen 100 and the second touch screen 110 includes a plurality of touch sensors. When the user touches the first touch screen 100 or the second touch screen 110 using the object, each touch point is detected by the touch sensors. The arrival touch point and an arrival time that the object arrives at the second touch screen 110 may be detected by the second electronic device 11 and sent from the second electronic device 11 to the first electronic device 10. In one example with respect to
In step S303, the determination module 220 calculates a difference between the departure time and the arrival time. For example, the arrival time is 12:00:04 and the departure time is 12:00:02. The difference between the departure time and the arrival time is 2 seconds.
In step S304, the determination module 220 determines whether the difference between the departure time and the arrival time falls within a specified range (e.g., less than or equal to 1 second). If the difference between the departure time and the arrival time does not fall within the specified range, the process returns to step S302. If the difference between the departure time and the arrival time falls within the specified range, step S305 is implemented.
In step S305, the determination module 220 determines the position of the first electronic device 10 relative to the second electronic device 11 according to the departure touch point and the arrival touch point. In one example with respect to
In step S306, the recording module 230 records the position of the first electronic device 10 relative to the second electronic device 11 into the storage system 102. The recording module 230 may further send the position of the first electronic device 10 relative to the second electronic device 11 to the second electronic device 11. Based on the position of the first electronic device 10 relative to the second electronic device 11, various applications may be implemented between the first electronic device 10 and the second electronic device 11. For example, a user may combine the first touch screen 100 and the second touch screen 110 to emulate a large touch screen. Images can be displayed correctly on the combined touch screen only when the position of the first electronic device 10 relative to the second electronic device 11 is determined.
It may be understood that if the user slides the object from the second touch screen 110 to the first touch screen 100, a departure touch point and a departure time that the object departs from the second touch screen 110, and an arrival touch point and an arrival time that the object arrives at the first touch screen 110 can be obtained. Accordingly, the position of the first electronic device 10 relative to the second electronic device 11 can be determined.
Although certain disclosed embodiments of the present disclosure have been specifically described, the present disclosure is not to be construed as being limited thereto. Various changes or modifications may be made to the present disclosure without departing from the scope and spirit of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
101119235 | May 2012 | TW | national |