Android device and control method thereof, electronic device and storage medium

By using multiple distance sensors and switch units in Android devices, distance detection and device control in different usage scenarios are achieved, which solves the problem in the existing technology that devices cannot meet the distance detection needs of multiple scenarios and improves user experience.

CN114079692BActive Publication Date: 2024-10-29SHANGHAI SIMCOM LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202010802041.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-11
Publication Date
2024-10-29
Estimated Expiration
2040-08-11

AI Technical Summary

Technical Problem

Existing Android devices are difficult to meet the distance detection requirements in multiple usage scenarios outside of calls, and can only register one p-sensor interrupt event, which cannot meet the distance detection requirements in multiple usage scenarios at the same time.

Method used

Design an Android device that connects multiple distance sensors through the I2C bus, uses the processor unit to detect proximity events in different states, and implements operations such as waking up and turning off the screen through the switch unit and power button to meet the distance requirements in multiple usage scenarios. Testing requirements.

Benefits of technology

Under the limitations of the Android system, it meets the user's distance detection needs for Android devices in multiple usage scenarios, improves the user experience, and ensures effective control of the device in different states.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114079692B_ABST
    Figure CN114079692B_ABST
Patent Text Reader

Abstract

The present invention discloses an Android device and a control method thereof, an electronic device and a storage medium. The Android device includes a processor unit and a plurality of first distance sensors; wherein: the first distance sensor is electrically connected to the processor unit via an I2C bus, and is used to detect a proximity event when the Android device is not in a call state, and output a first proximity signal when a proximity event is detected, and the first proximity signal is used to trigger a first operation. The present invention uses a first distance sensor connected to the processor unit of the Android device via an I2C bus to detect a proximity event when the Android device is not in a call state, thereby being able to meet the user's distance detection needs for the Android device in multiple usage scenarios under the premise that the Android system limits only one distance sensor to be registered as a p‑sensor, which is conducive to improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of proximity automatic control technology, and in particular to an Android device and a control method thereof, an electronic device and a storage medium. Background Art

[0002] At present, in Android devices such as mobile phones, there is usually a distance sensor registered as a p-sensor (Proximity Sensor), which is used to sense the distance between the mobile phone screen and the user's face during a call. Specifically, the screen is turned off when the user's face is close to the mobile phone screen, and the screen is woken up when the user's face leaves the mobile phone screen, so as to effectively prevent accidental touch events from occurring during a call (for example, during a call, the call is interrupted due to the user's face touching the hang-up button of the mobile phone).

[0003] However, facing the user's demand for distance detection in other usage scenarios of Android devices, or in other words, facing the user's demand for distance detection in multiple usage scenarios of Android devices, one distance sensor is obviously difficult to meet these user needs, or in other words, it is difficult to synchronously realize distance detection in multiple usage scenarios based on a single registered p-sensor. In addition, only one p-sensor interrupt event can be registered in the Android system, so even if multiple distance sensors are set up to meet user needs, these distance sensors cannot be registered as p-sensors at the same time, and still cannot meet the user's demand for distance detection in multiple usage scenarios of Android devices. Summary of the invention

[0004] The technical problem to be solved by the present invention is to overcome the defect in the prior art that Android devices cannot meet users' distance detection needs for Android devices in other usage scenarios besides calls, and to provide an Android device and its control method, electronic device and storage medium.

[0005] The present invention solves the above technical problems through the following technical solutions:

[0006] An Android device comprises a processor unit and a plurality of first distance sensors; wherein:

[0007] The first distance sensor is electrically connected to the processor unit via an I2C bus (Inter-Integrated Circuit Bus), and is used to detect a proximity event when the Android device is not in a call state, and output a first proximity signal when a proximity event is detected, wherein the first proximity signal is used to trigger a first operation.

[0008] Preferably, the first operation includes waking up the screen and / or turning off the screen, or the first operation includes opening an application and / or closing an application;

[0009] and / or,

[0010] The Android device also includes a second distance sensor electrically connected to the processor unit, the second distance sensor is used to detect a proximity event when the Android device is in a call state, and output a second proximity signal when a proximity event is detected, and the second proximity signal is used to trigger a second operation.

[0011] Preferably, the Android device further comprises a switch unit electrically connected to the first distance sensor and the processor unit;

[0012] The processor unit is also used to send a control signal to the switch unit;

[0013] The first distance sensor is used to send a detection signal to the switch unit when detecting a proximity event;

[0014] The switch unit is used to determine whether to output a trigger signal according to the control signal and the detection signal, and the trigger signal is used to trigger the first operation.

[0015] Preferably, the Android device further comprises a power button electrically connected to the switch unit;

[0016] The power button is used to wake up the screen and / or turn off the screen according to the trigger signal;

[0017] and / or,

[0018] The switch unit includes a MOS tube (short for MOSFET, Metal Oxide Semiconductor Field Effect Transistor);

[0019] The source of the MOS tube is electrically connected to the first distance sensor;

[0020] The gate of the MOS tube is electrically connected to the processor unit;

[0021] The drain of the MOS tube is used to output the trigger signal;

[0022] and / or,

[0023] The switch unit is specifically configured to output the trigger signal when the control signal is at a high level and the detection signal is the first proximity signal.

[0024] Preferably, the processor unit is further used to send a control signal to the first distance sensor;

[0025] The first distance sensor is used to detect a proximity event when the Android device is not in a call state and the control signal is at a high level;

[0026] The switch unit is specifically configured to output the trigger signal when the control signal is at a high level and the detection signal is the first proximity signal.

[0027] A control method for an Android device, the control method is implemented using any of the above Android devices, the control method comprising:

[0028] Set the first operation;

[0029] Determine whether the Android device is in a call state;

[0030] If the call is not in progress, detecting a proximity event using the first distance sensor and determining whether a proximity event is detected;

[0031] If a proximity event is detected, the first operation is triggered.

[0032] Preferably, the Android device further comprises a switch unit electrically connected to the first distance sensor and the processor unit, the switch unit being configured to output a trigger signal when the control signal is at a high level and the first proximity signal is received, the trigger signal being configured to trigger the first operation, the first operation comprising waking up the screen and / or turning off the screen;

[0033] When the first operation includes waking up the screen and the Android device is not in a call state, the control method further includes:

[0034] When the Android device is in a screen-off state, sending a high-level control signal to the switch unit;

[0035] When the first operation includes turning off the screen and the Android device is not in a call state, the control method further includes:

[0036] When the Android device is in a screen-on state, sending a high-level control signal to the switch unit;

[0037] When the first operation includes waking up the screen and turning off the screen and the Android device is not in a call state, the control method further includes:

[0038] A high level control signal is sent to the switch unit.

[0039] Preferably, while sending a high-level control signal to the switch unit, a high-level control signal is also sent to the first distance sensor;

[0040] The first distance sensor detects a proximity event when the Android device is not in a call state and the control signal is at a high level.

[0041] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements any one of the above-mentioned control methods for an Android device when executing the computer program.

[0042] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned control methods for an Android device.

[0043] The positive progressive effect of the present invention is that the present invention uses a first distance sensor connected to a processor unit of an Android device via an I2C bus to detect proximity events when the Android device is not in a call state, thereby being able to meet the user's distance detection needs for Android devices in multiple usage scenarios under the premise that the Android system limits only one distance sensor to be registered as a p-sensor, which is conducive to improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 Schematic diagram of the modules of an Android device according to Embodiment 1 of the present invention.

[0045] Figure 2 Schematic diagram of the modules of an Android device according to Embodiment 2 of the present invention.

[0046] Figure 3 1 is an output logic timing diagram of a switch unit in an Android device according to Embodiment 2 of the present invention.

[0047] Figure 4 Flow chart of a control method for an Android device according to Embodiment 4 of the present invention.

[0048] Figure 5 Schematic diagram of the structure of an electronic device according to Embodiment 7 of the present invention. DETAILED DESCRIPTION

[0049] The present invention is further described below by way of examples, but the present invention is not limited to the scope of the examples.

[0050] Example 1

[0051] This embodiment provides an Android device, wherein the Android device is a device using the Android system, and specifically may include a mobile device, a communication device, a smart wearable device, etc. Figure 1 The Android device of this embodiment includes a processor unit 1 and a first distance sensor 2 and a second distance sensor 3 electrically connected to the processor unit 1 respectively.

[0052] In this embodiment, the first distance sensor 2 is electrically connected to the processor unit 1 via the I2C bus. It is not registered as a p-sensor, but as an I2C device, and is used to detect proximity events when the Android device is not in a call state, and output a first proximity signal when a proximity event is detected. The first proximity signal is used to trigger a first operation.

[0053] Specifically, in this embodiment, for a mobile device or a communication device, the detected proximity event may include that the user is close to the mobile device or the communication device; for a smart wearable device, the proximity event may include that the user has already put on the smart wearable device.

[0054] In this embodiment, the first operation can be customized according to the actual application. For example, the first operation can include any one of waking up the screen, turning off the screen, waking up and turning off the screen, opening an application (for example, applications carried by the Android device, such as camera and music), closing an application, opening and closing an application, etc., to meet the user's distance detection needs in scenarios other than calls. In addition to voice control of the Android device, the user does not need to actually touch the Android device to control the Android device, thereby improving the user experience.

[0055] Further, in this embodiment, the number and installation position of the first distance sensors 2 can be customized according to the actual application, and the first operations corresponding to different first distance sensors 2 are preferably different. For example, when the Android device includes two first distance sensors 2, one of them can trigger the screen to wake up when a proximity event is detected, and the other can trigger the screen to turn off when a proximity event is detected. For another example, when the Android device includes two first distance sensors 2, one of them can trigger the screen to wake up when a proximity event is detected, and the other can trigger the camera to turn on when a proximity event is detected.

[0056] In this embodiment, the second distance sensor 3 is registered as a p-sensor, and is used to detect a proximity event when the Android device is in a call state, and output a second proximity signal when a proximity event is detected, and the second proximity signal is used to trigger a second operation. The second operation may include turning off the screen to prevent an accidental touch event on the Android device during a call and ensure call quality.

[0057] This embodiment uses the second distance sensor to detect proximity events when the Android device is in a call state, and uses the first distance sensor connected to the processor unit of the Android device via the I2C bus to detect proximity events when the Android device is not in a call state. Therefore, it is possible to meet the user's distance detection needs for Android devices in multiple usage scenarios under the premise that the Android system limits only one distance sensor to be registered as a p-sensor, which is conducive to improving user experience.

[0058] Example 2

[0059] This embodiment provides an Android device based on Embodiment 1. Figure 2 The Android device of this embodiment further includes a switch unit 4 electrically connected to the processor unit 1 and the first distance sensor 2 respectively.

[0060] Specifically, in this embodiment, the processor unit 1 can provide a first control signal to the first distance sensor 2 through a GPIO (General-Purpose Input / Output) port, so that it can detect proximity events for a long time and send a detection signal to the switch unit 4 when detecting a proximity event, wherein when the first distance sensor 2 detects a proximity event, the detection signal is a first proximity signal.

[0061] The processor unit 1 is further configured to send a second control signal to the switch unit 4 .

[0062] The switch unit 4 is used to determine whether to output a trigger signal according to the second control signal and the detection signal. The trigger signal is used to trigger the first operation, and the second control signal can be used to determine whether to enable the corresponding trigger function of the first distance sensor, that is, to determine whether to trigger the first operation when the first distance sensor 2 detects a proximity event.

[0063] For example, when the second control signal is at a high level and the detection signal is a first proximity signal, the switch unit 4 outputs a trigger signal to trigger the first operation, and does not trigger the first operation in other cases. For example, when the second control signal is at a low level and the detection signal is a first proximity signal, the switch unit 4 does not output a trigger signal and thus does not trigger the first operation.

[0064] Specifically, in this embodiment, the switch unit 4 preferably includes a MOS tube, wherein the source of the MOS tube is electrically connected to the output end of the first distance sensor 2, the gate of the MOS tube is electrically connected to another GPIO port of the processor unit, and the drain of the MOS tube is used to output a trigger signal.

[0065] In this embodiment, the first distance sensor 2 preferably outputs a low-level detection signal when no approach event is detected, and preferably outputs a high-level detection signal when an approach event is detected. When the switch unit 4 includes a MOS tube, its output timing logic can refer to Figure 3 , and based on Figure 3 It can be determined that the output truth table of the switch unit 4 is:

[0066] Heartbeat The second control signal The output of the switching unit 0 1 1 0 0 1 1 0 1 1 1 0

[0067] Furthermore, when the Android device also includes a power button electrically connected to the switch unit 4, the power button is used to receive a trigger signal output by the switch unit 4, and the power button is preferably used to wake up the screen, or turn off the screen, or wake up and turn off the screen according to the trigger signal.

[0068] When the first operation is to wake up the screen, the processor unit 1 can output a high-level second control signal when the Android device is not in a call state and is in a screen-off state, so that a contactless screen-waking operation of the Android device in the screen-off state can be realized. Specifically, when a proximity event is detected in the screen-off state, the switch unit 4 outputs a low-level trigger signal to the power button to trigger the screen-waking operation. In addition, after triggering the screen-waking operation, the processor unit 1 can also switch the high-level second control signal to a low-level second control signal to avoid triggering the screen-waking operation in the screen-on state.

[0069] When the first operation is to turn off the screen, the processor unit 1 can output a high-level second control signal when the Android device is not in a call state and is in a screen-on state, so that the contactless screen-off operation of the Android device in the screen-on state can be realized. Specifically, when a proximity event is detected in the screen-on state, the switch unit 4 outputs a low-level trigger signal to the power button to trigger the screen-off operation. In addition, after triggering the screen-off operation, the processor unit 1 can also switch the high-level second control signal to a low-level second control signal to avoid triggering the screen-off operation in the screen-off state.

[0070] When the first operation is waking up and turning off the screen, the processor unit 1 can output a high-level second control signal when the Android device is not in a call state, thereby realizing a contactless screen waking-up operation of the Android device in the screen-off state, and a contactless screen turning-off operation of the Android device in the screen-on state.

[0071] On the basis of Embodiment 1, the Android device of this embodiment can also effectively control whether to trigger the first operation when the first distance sensor detects a proximity event, so that a specific first distance sensor is applied in a specific usage scenario. Furthermore, when the Android device includes multiple first distance sensors, the selection of the first distance sensor can also be realized through the second control signal, so as to realize specific proximity detection in a specific usage scenario and trigger a specific first operation.

[0072] Example 3

[0073] This embodiment provides an Android device based on Embodiment 2. In this embodiment, the processor unit 1 is electrically connected to the first distance sensor 2 and the switch unit 4 via the same GPIO port, that is, the first control signal and the second control signal are the same control signal.

[0074] In this embodiment, the first distance sensor 2 is specifically used to detect proximity events when the Android device is not in a call state and the control signal is at a high level, and the switch unit 4 is specifically used to output a trigger signal when the control signal is at a high level and the detection signal is a first proximity signal.

[0075] In this embodiment, the first distance sensor 2 detects proximity events in a specific usage scenario, but does not detect proximity events in other scenarios, so as to achieve the purpose of saving power consumption. Specifically, in this embodiment, the first distance sensor 2 includes an infrared lamp, which is preferably turned on when the control signal is at a high level, and turned off when the control signal is at a low level, so as to achieve the purpose of saving power consumption.

[0076] Example 4

[0077] This embodiment provides a control method for an Android device, and the control method of this embodiment is implemented using the Android device provided by any one of Embodiments 1-3. Figure 4 , the control method of this embodiment includes:

[0078] S1, setting the first operation;

[0079] S2, determining whether the Android device is in a call state;

[0080] If yes, execute step S3; if no, execute step S5;

[0081] S3, using the second distance sensor to detect a proximity event and determine whether a proximity event is detected;

[0082] If yes, execute step S4; if no, return to step S3;

[0083] S4, triggering the second operation;

[0084] S5, detecting a proximity event using the first distance sensor and determining whether a proximity event is detected;

[0085] If yes, go to step S6; if no, go back to step S5;

[0086] S6. Trigger the first operation.

[0087] In step S1, the Android device can determine the first operation corresponding to the first distance sensor according to the user's settings. For example, the first operation may include waking up the screen, turning off the screen, waking up and turning off the screen, opening an application (for example, camera, music and other applications loaded on the Android device), closing an application, opening and closing an application, etc.

[0088] In this embodiment, the Android device can detect proximity events in both the call state and the non-call state, and trigger corresponding operations respectively when the proximity events are detected. Furthermore, the Android device can detect proximity events in the non-call state to trigger the corresponding first operation according to the operation modes corresponding to the first distance sensors set by the user, which can meet the user's distance detection needs for Android devices in multiple usage scenarios under the premise that the Android system limits only one distance sensor to be registered as a p-sensor, which is conducive to improving the user experience.

[0089] Example 5

[0090] This embodiment provides a control method for an Android device based on Embodiment 4. In this embodiment, the Android device also includes a switch unit electrically connected to the first distance sensor and the processor unit. The switch unit is used to output a trigger signal when the control signal is at a high level and a first proximity signal is received. The trigger signal is used to trigger a first operation.

[0091] In this embodiment, step S1 sets the first operation to wake up the screen, and when step S2 judges to be no, the control method of this embodiment also includes: the step of sending a high-level control signal to the switch unit when the Android device is in the screen-off state.

[0092] When the first operation is to wake up the screen, a contactless screen waking operation can be implemented for the Android device in the screen-off state. Specifically, when a proximity event is detected in the screen-off state, the input of the switch unit is the first proximity signal and a high-level control signal, thereby outputting a trigger signal to trigger the screen waking operation. In addition, after step S6, a step of switching the high-level control signal to a low-level control signal can be included to avoid triggering the screen waking operation in the screen-on state.

[0093] In this embodiment, step S1 sets the first operation to turn off the screen, and when step S2 determines to be no, the control method of this embodiment further includes: sending a high-level control signal to the switch unit when the Android device is in a screen-on state.

[0094] When the first operation is to turn off the screen, a contactless screen turning off operation can be implemented for the Android device in the screen-on state. Specifically, when a proximity event is detected in the screen-on state, the input of the switch unit is the first proximity signal and the high-level control signal, so as to output a trigger signal to trigger the screen turning off operation. In addition, after step S6, a step of switching the high-level control signal to a low-level control signal can be included to avoid triggering the screen turning off operation in the screen-off state.

[0095] In this embodiment, step S1 sets the first operation to wake up the screen and turn off the screen, and when step S2 determines that it is no, the control method of this embodiment further includes: sending a high-level control signal to the switch unit.

[0096] When the first operation is waking up and turning off the screen, the screen of the Android device can be woken up without contact in the screen-off state, and the screen of the Android device can be turned off without contact in the screen-on state.

[0097] On the basis of Example 4, the control method of this embodiment can also effectively control whether to trigger the first operation when the first distance sensor detects a proximity event, so that a specific first distance sensor is applied in a specific usage scenario. Furthermore, when the Android device includes multiple first distance sensors, the selection of the first distance sensor can also be realized through a control signal to realize specific proximity detection in a specific usage scenario and trigger a specific first operation.

[0098] Example 6

[0099] This embodiment provides a control method for an Android device based on Embodiment 4. In this embodiment, the processor unit is electrically connected to the first distance sensor and the switch unit via the same GPIO port. Specifically, the processor unit is used to send the same control signal to the first distance sensor and the switch unit. The first distance sensor is used to detect proximity events when the Android device is not in a call state and the control signal is at a high level.

[0100] In this embodiment, a high-level control signal is sent to the switch unit and a high-level control signal is also sent to the first distance sensor. Thus, in this embodiment, the first distance sensor detects proximity events in specific usage scenarios, but does not detect proximity events in other scenarios, thereby achieving the purpose of saving power consumption.

[0101] Example 7

[0102] This embodiment provides an electronic device, which can be expressed in the form of a computing device (for example, a server device), including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor triggers the computer program, the control method of the Android device provided in any one of Embodiments 4-6 can be implemented.

[0103] Figure 5 FIG. 4 shows a schematic diagram of the hardware structure of this embodiment. Figure 5 As shown, the electronic device 9 specifically includes:

[0104] At least one processor 91, at least one memory 92, and a bus 93 for connecting different system components (including the processor 91 and the memory 92), wherein:

[0105] The bus 93 includes a data bus, an address bus, and a control bus.

[0106] The memory 92 includes a volatile memory, such as a random access memory (RAM) 921 and / or a cache memory 922 , and may further include a read-only memory (ROM) 923 .

[0107] Memory 92 also includes a program / utility 925 having a set (at least one) of program modules 924, such program modules 924 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include an implementation of a network environment.

[0108] The processor 91 triggers various functional applications and data processing by running the computer program stored in the memory 92, such as the control method of the Android device provided in any one of Embodiments 4-6 of the present invention.

[0109] The electronic device 9 can further communicate with one or more external devices 94 (e.g., keyboards, pointing devices, etc.). Such communication can be performed through an input / output (I / O) interface 95. In addition, the electronic device 9 can also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) through a network adapter 96. The network adapter 96 communicates with other modules of the electronic device 9 through a bus 93. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 9, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.

[0110] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.

[0111] Example 8

[0112] This embodiment provides a computer-readable storage medium having a computer program stored thereon, and when the program is triggered by a processor, the steps of the control method for an Android device provided in any one of Embodiments 4-6 are implemented.

[0113] The readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device or any suitable combination of the above.

[0114] In a possible implementation, the present invention can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to trigger the steps of the control method of the Android device provided in any one of Examples 4-6.

[0115] The program code for triggering the present invention may be written in any combination of one or more programming languages, and may be triggered completely on the user device, partially on the user device, as an independent software package, partially on the user device and partially on the remote device, or completely on the remote device.

[0116] Although the specific embodiments of the present invention are described above, it should be understood by those skilled in the art that this is only for illustration and the protection scope of the present invention is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present invention, but these changes and modifications all fall within the protection scope of the present invention.

Claims

1. An Android device, characterized in that: It includes a processor unit and a plurality of first distance sensors; wherein: The first distance sensor is electrically connected to the processor unit via an I2C bus, and the first distance sensor is registered as an I2C device, so as to detect a proximity event when the Android device is not in a call state, and output a first proximity signal when a proximity event is detected, wherein the first proximity signal is used to trigger a first operation; The Android device further includes a second distance sensor electrically connected to the processor unit, the second distance sensor is registered as a p-sensor, the second distance sensor is used to detect a proximity event when the Android device is in a call state, and output a second proximity signal when a proximity event is detected, and the second proximity signal is used to trigger a second operation; The Android device adopts the Android system, and the Android system only registers the second distance sensor as a p-sensor.

2. The Android device according to claim 1, wherein: The first operation includes waking up the screen and / or turning off the screen, or the first operation includes opening an application and / or closing an application.

3. The Android device according to claim 1, wherein: The Android device further includes a switch unit electrically connected to the first distance sensor and the processor unit; The processor unit is also used to send a control signal to the switch unit; The first distance sensor is used to send a detection signal to the switch unit when detecting a proximity event; The switch unit is used to determine whether to output a trigger signal according to the control signal and the detection signal, and the trigger signal is used to trigger the first operation.

4. The Android device according to claim 3, wherein: The Android device further includes a power button electrically connected to the switch unit; The power button is used to wake up the screen and / or turn off the screen according to the trigger signal; and / or, The switch unit includes a MOS tube; The source of the MOS tube is electrically connected to the first distance sensor; The gate of the MOS tube is electrically connected to the processor unit; The drain of the MOS tube is used to output the trigger signal; and / or, The switch unit is specifically configured to output the trigger signal when the control signal is at a high level and the detection signal is the first proximity signal.

5. The Android device according to claim 3, wherein: The processor unit is further configured to send a control signal to the first distance sensor; The first distance sensor is used to detect a proximity event when the Android device is not in a call state and the control signal is at a high level; The switch unit is specifically configured to output the trigger signal when the control signal is at a high level and the detection signal is the first proximity signal.

6. A control method for an Android device, characterized in that: The first distance sensor is registered as an I2C device, and the control method is implemented by using the Android device according to any one of claims 1 to 5, and the control method includes: Set the first operation; Determine whether the Android device is in a call state; If the call is not in progress, detecting a proximity event using the first distance sensor and determining whether a proximity event is detected; If a proximity event is detected, the first operation is triggered.

7. The control method of the Android device according to claim 6, characterized in that: The Android device further includes a switch unit electrically connected to the first distance sensor and the processor unit, the switch unit being configured to output a trigger signal when the control signal is at a high level and the first proximity signal is received, the trigger signal being configured to trigger the first operation, wherein the first operation includes waking up the screen and / or turning off the screen; When the first operation includes waking up the screen and the Android device is not in a call state, the control method further includes: When the Android device is in a screen-off state, sending a high-level control signal to the switch unit; When the first operation includes turning off the screen and the Android device is not in a call state, the control method further includes: When the Android device is in a screen-on state, sending a high-level control signal to the switch unit; When the first operation includes waking up the screen and turning off the screen and the Android device is not in a call state, the control method further includes: A high level control signal is sent to the switch unit.

8. The control method of the Android device according to claim 7, characterized in that: While sending a high-level control signal to the switch unit, also sending a high-level control signal to the first distance sensor; The first distance sensor detects a proximity event when the Android device is not in a call state and the control signal is at a high level.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the control method of the Android device as described in any one of claims 6-8 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the control method of the Android device as described in any one of claims 6 to 8 are implemented.

Citation Information

Patent Citations

  • Near field communication terminal with power-saving function

    CN102195689A

  • Screen control method and device for mobile terminal

    CN106953969A

  • State switching method for electronic device, and electronic device

    CN108509226A

  • Proximity sensing

    US20210303099A1