WO2021013134A1 - 一种摄像头升降控制方法与电子设备 - Google Patents

一种摄像头升降控制方法与电子设备 Download PDF

Info

Publication number
WO2021013134A1
WO2021013134A1 PCT/CN2020/103114 CN2020103114W WO2021013134A1 WO 2021013134 A1 WO2021013134 A1 WO 2021013134A1 CN 2020103114 W CN2020103114 W CN 2020103114W WO 2021013134 A1 WO2021013134 A1 WO 2021013134A1
Authority
WO
WIPO (PCT)
Prior art keywords
camera
application
activity
party
electronic device
Prior art date
Application number
PCT/CN2020/103114
Other languages
English (en)
French (fr)
Inventor
唐钊
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021013134A1 publication Critical patent/WO2021013134A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/0202Portable telephone sets, e.g. cordless phones, mobile phones or bar type handsets
    • H04M1/026Details of the structure or mounting of specific components
    • H04M1/0264Details of the structure or mounting of specific components for a camera module assembly
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/57Mechanical or electrical details of cameras or camera modules specially adapted for being embedded in other devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/617Upgrading or updating of programs or applications for camera control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders

Definitions

  • This application relates to the field of terminal technology, and in particular, to a camera lifting control method and electronic equipment.
  • the electronic equipment cannot accurately control the elevation of the camera according to the current actual situation.
  • the mobile phone opens the camera application and raises the camera. Then the mobile phone returns to the desktop and runs the camera in the background. Since the camera application is not exited, the mobile phone still keeps the camera raised. But in fact, when the user switches the camera to the background, the camera is no longer needed. If the camera cannot be lowered at this time, it will affect the user experience.
  • This application provides a method for controlling the elevation of a camera and electronic equipment.
  • the electronic device can flexibly control the lifting of the camera according to the current actual situation, which facilitates user operations and improves user experience.
  • an embodiment of the present application provides a camera lifting control method, which can be executed by an electronic device, the electronic device is equipped with a first camera, the first camera is a lift camera, and the electronic device includes a first camera.
  • a three-party camera application the method includes: detecting a first operation for an icon of the third-party camera application; in response to the first operation, starting the third-party camera application, raising the first camera, and starting The first camera; a viewfinder interface is displayed, the viewfinder interface includes a preview image, the preview image is an image collected by the first camera; it is detected that the third-party camera application is switched from the foreground to the background to run or goes out The second operation of the screen; in response to the second operation, retract the first camera.
  • the electronic device starts the third-party camera application, raises the camera, and displays the viewfinder interface of the third-party camera application, if the electronic device detects the operation of switching the third-party camera application to the background or turning off the screen ,
  • the camera can be retracted to realize the flexible lifting of the camera, which is convenient for user operation, improves user experience, and saves resources.
  • the first camera is a front camera and/or a rear camera.
  • the electronic device may also determine that within the first preset time period, the third-party camera application has not switched back Run in the foreground; wherein the first preset duration is a preset duration from the moment when the second operation is detected, or is a preset from the moment when the third-party camera application switches from the foreground to the background The duration, or, is a preset duration from the moment the screen is turned off.
  • the electronic device starts the third-party camera application, raises the camera, and displays the viewfinder interface of the third-party camera application, if the electronic device detects the operation of switching the third-party camera application to the background or turning off the screen , You can wait for a period of time. If the third-party camera application does not switch to the foreground within the period of time, the camera will be retracted to achieve flexible lifting of the camera, which is convenient for user operations, improves user experience, and saves resources.
  • the electronic device may also detect the resolution of the viewfinder interface.
  • the third operation of the switch control in response to the third operation, the resolution of the preview image is switched; and the first camera is kept in a raised state.
  • the electronic device starts the third-party camera application, raises the camera, and displays the viewfinder interface of the third-party camera application. If the electronic device detects the operation of the resolution switching control, the camera may not be retracted. Helps avoid frequent lifting of the camera.
  • the electronic device may also detect the first operation for closing the viewfinder interface. Four operations; in response to the fourth operation, display the first interface of the third-party camera application; the first interface does not include the preview image; keep the first camera in a raised state.
  • the electronic device starts the third-party camera application, raises the camera, and displays the viewfinder interface of the third-party camera application. If the electronic device detects that the preview image is closed, it displays other interfaces of the third-party camera application. Operation, you can not retract the camera, which helps to avoid frequent lifting of the camera.
  • the electronic device may also detect that the video control in the viewfinder interface The fifth operation; in response to the fifth operation, enter the video recording mode; keep the first camera in a raised state.
  • the electronic device starts the third-party camera application, raises the camera, and displays the viewfinder interface of the third-party camera application. If the electronic device detects the operation of switching the image capturing mode to the video recording mode, it may not be retracted. The camera helps to avoid frequent lifting of the camera.
  • the first camera is a front camera
  • the electronic device is further configured with a second camera
  • the second camera is a rear camera
  • the third-party camera is detected
  • the electronic device may also detect a sixth operation for the camera switching control in the viewfinder interface; in response to the sixth operation, start the rear A camera, the viewfinder interface includes an image collected by the rear camera; and the front camera is kept in a raised state.
  • the electronic device starts the third-party camera application, raises the camera, and displays the viewfinder interface of the third-party camera application. If the electronic device detects the operation of the camera switching control, the camera may not be retracted, which is helpful To avoid frequent lifting of the camera.
  • the electronic device determines that within the second preset time period, the viewfinder interface does not redisplay the image collected by the front camera, and retracts the front camera.
  • the electronic device starts a third-party camera application, raises the front camera, and displays a viewfinder interface of the third-party camera application, and the viewfinder interface includes the image collected by the front camera. If the electronic device detects the operation of the camera switching control and the image captured by the rear camera is displayed in the viewfinder interface, the electronic device can wait for a period of time. If the viewfinder interface still displays the image captured by the rear camera within this period of time, the camera can be retracted. To save resources.
  • the electronic device may also detect the seventh operation of switching the third-party camera application from the background to the front stage; in response to the seventh operation, raise the first camera.
  • the electronic device starts the third-party camera application, raises the camera, and displays the viewfinder interface of the third-party camera application. If the electronic device detects the operation of switching the third-party camera application from the foreground to the background, it can Retract the camera; when the electronic device detects that the third-party camera application switches to the foreground again, the camera can be raised again to realize the flexible lifting of the camera, which is convenient for user operations and enhances user experience.
  • a camera lifting control method is also provided, which is applied to an electronic device, the electronic device is configured with a first camera, the first camera is a lift camera, and the electronic device includes a third-party camera application.
  • the method includes: detecting a first operation for the icon of the third-party camera application; in response to the first operation, starting the third-party camera application, raising the first camera, and starting the first Camera; the third-party application creates a first activity; the first activity corresponds to the viewfinder interface of the third-party camera application; displays the viewfinder interface, the viewfinder interface includes the image collected by the first camera; monitoring The change of the first activity; when a change in the first activity is monitored, the first camera is retracted.
  • the electronic device starts a third-party camera application, raises the camera, and displays the first activity that can be created by the third-party camera application, corresponding to the viewfinder interface. If the electronic device monitors the change in the first activity, the camera can be retracted to realize the flexible lifting of the camera, which facilitates user operations and improves user experience.
  • the monitoring that the first activity changes and retracting the first camera includes: monitoring that the first activity changes from a focused activity to a non-focused activity, and retracting the first activity camera.
  • the electronic device when the electronic device monitors that the first activity created by the third-party camera application changes from a focused activity to a non-focused activity, it can determine that the third-party camera application switches from the foreground to the background, and the camera can be retracted to achieve flexible lifting , It is convenient for users to operate and enhance user experience.
  • the electronic device may also determine that within the first preset time period, the first activity has not changed back to the focus activity.
  • the electronic device after the electronic device monitors that the first activity created by the third-party camera application changes from a focused activity to a non-focused activity, it can wait for a preset period of time, and if the first activity does not become a focused activity within the period of time, it can be retracted
  • the camera realizes the flexible lifting of the camera, which is convenient for users to operate and enhance the user experience.
  • monitoring that the activity changes from a focused activity to a non-focused activity includes: monitoring that the first activity calls onPause to start a second activity, and the second activity corresponds to the electronic device , Or corresponding to the display interface of other applications in the electronic device except the third-party camera application.
  • the electronic device monitors that the first activity created by the third-party camera application monitors that the first activity calls onPause to start the second activity, and the second activity is not the display interface of the third-party camera application
  • the camera can be retracted to realize the flexible lifting of the camera, which is convenient for user operations and enhances user experience.
  • the electronic device may also raise the first camera when monitoring that the first activity changes from a non-focus activity to a focused activity.
  • the electronic device when the electronic device monitors that the first activity created by the third-party camera application changes from a focused activity to a non-focused activity, it can determine that the third-party camera application switches from the foreground to the background, and the camera can be retracted.
  • the electronic device monitors that the first activity changes from a non-focus activity to a focused activity, the first camera can be raised to realize flexible lifting of the camera, which facilitates user operations and improves user experience.
  • the monitoring that the first activity changes from a non-focus activity to a focused activity includes: monitoring that the electronic device calls onResume to change the first activity to a focused activity.
  • the electronic device monitors that the electronic device calls onResume, and can determine that the first activity is changed to the focus activity, and can raise the first camera to achieve flexible lifting of the camera, which facilitates user operations and improves user experience.
  • the electronic device may also keep the first camera in the raised state when the first activity is not monitored.
  • the electronic device starts a third-party camera application, raises the camera, and displays the first activity that can be created by the third-party camera application, corresponding to the viewfinder interface. If the electronic device does not monitor the change in the first activity, the camera may not be retracted to avoid frequent lifting of the camera.
  • the first camera is a front camera and/or a rear camera.
  • the present application also provides a camera lift control method, which is applied to an electronic device, the electronic device is configured with a first camera, the first camera is a lift camera, and the electronic device includes an instant messaging application,
  • the method includes: the instant messaging application receives a video call; detecting a first operation; in response to the first operation, the instant messaging application connects to the video call; raising the first camera; the instant messaging The application creates a first activity, which corresponds to the call interface of the instant messaging application; displays the call interface, which includes the image collected by the first camera; monitors changes in the first activity ; When the first activity is monitored to change, retract the first camera.
  • the camera when the electronic device starts an instant messaging application to answer a video call, the camera is raised, and the instant messaging application window creates a call interface corresponding to the instant messaging application with the first activity.
  • the electronic device can monitor the change of the first activity, and if the first activity changes, the first camera is retracted.
  • retracting the first camera when the first activity is monitored to change, retracting the first camera includes: when monitoring that the first activity changes from a focused activity to a non-focused activity, retracting the The first camera.
  • the electronic device when the electronic device detects that the first activity changes from a focused activity to a non-focused activity, it determines that the instant messaging application switches from the foreground to the background, and the camera can be retracted.
  • the electronic device after monitoring the change in the first activity and before retracting the first camera, can also determine whether the electronic device is currently in a video call mode; if it is currently in a video call Mode, the first camera is not retracted; if not currently in the video call mode, the first camera is retracted.
  • the electronic device after the electronic device detects that the first activity changes from a focused activity to a non-focused activity, it determines that the instant messaging application is switched from the foreground to the background. It is possible that the instant messaging application maintains a video call mode in the background, so in order to improve accuracy
  • the electronic device can also determine whether the electronic device is currently in video communication mode, and if it is, the camera is not retracted.
  • not retracting the first camera includes: if the video call mode is currently in, determining whether the application currently in the video call mode is the instant messaging application; if The application currently in the video call mode is the instant messaging application, and the first camera is not retracted; if the application currently in the video call mode is not the instant messaging application, the first camera is retracted.
  • the electronic device after the electronic device monitors that the first activity changes from a focused activity to a non-focused activity, it determines that the instant messaging application is switched from the foreground to the background. The electronic device can also determine whether the application currently in the video call mode is said Instant messaging applications, if yes, do not retract the camera.
  • the application currently in the video call mode is the instant messaging application, not retracting the first camera, including: if the application currently in the video call mode is the instant messaging application, judging the current Whether the activity that uses the first camera is the first activity; if the activity that currently uses the first camera is the first activity, the first camera is not retracted; if the activity that currently uses the first camera Activity is the first activity and retracts the first camera.
  • the electronic device after the electronic device monitors that the first activity changes from a focused activity to a non-focused activity, it determines that the instant messaging application is switched from the foreground to the background, and the electronic device can also determine whether the activity currently in the video call mode is said The activity of the instant messaging application, if it is, does not retract the camera.
  • an electronic device which includes a first camera, at least one processor, a display screen and an input device; wherein the first camera is a lift camera: the input device is used to detect The first operation of the icon of the third-party camera application; the at least one processor is configured to start the third-party camera application in response to the first operation, control the first camera to rise, and start all The first camera; the first camera for capturing images; the display screen for displaying a viewfinder interface, the viewfinder interface includes a preview image, the preview image is an image captured by the first camera; The input device is also used to detect a second operation of switching the third-party camera application from the foreground to the background operation or turning off the screen; the at least one processor is also used to control the third-party camera application in response to the second operation The first camera is retracted.
  • the at least one processor before the at least one processor is used to control the retracting of the first camera in response to the second operation, it is also used to: determine that within a first preset time period, the first The third-party camera application does not switch back to the foreground to run; wherein, the first preset duration is the preset duration from the moment when the second operation is detected, or is switched from the foreground to the third-party camera application The preset duration from the moment in the background, or the preset duration from the moment the screen is turned off.
  • the input device before detecting the second operation of switching the third-party camera application from the foreground to the background or turning off the screen, the input device is also used to: The third operation of the resolution switching control; the at least one processor is further configured to switch the resolution of the preview image in response to the third operation, and control the first camera to be in a raised state.
  • the input device before the input device is used to detect the second operation of switching the third-party camera application from the foreground to the background or turning off the screen, it is also used to detect the function of closing the viewfinder interface.
  • the at least one processor is further configured to display a first interface of the third-party camera application through the display screen in response to the fourth operation; the first interface does not include the preview Image; the at least one processor is also used to control the first camera in a raised state.
  • the method before the detection of the second operation of switching the third-party camera application from the foreground to the background operation or turning off the screen, the method further includes: detecting that the camera application in the viewfinder interface The fifth operation of the video control; in response to the fifth operation, enter the video recording mode; keep the first camera in the raised state.
  • the first camera is a front camera
  • the electronic device is also equipped with a second camera
  • the second camera is a rear camera
  • the input device is used to detect
  • the third-party camera application is also used for: detecting a sixth operation for the camera switching control in the viewfinder interface; the at least one processor is also used for In response to the sixth operation, the rear camera is started, the viewfinder interface includes the image collected by the rear camera, and the front camera is controlled to be in a raised state.
  • the at least one processor is further configured to: determine that within the second preset time period, the viewfinder interface does not redisplay the image collected by the front camera, and control the front camera to retract .
  • the input device is further configured to: detect a seventh operation of switching the third-party camera application from the background to the foreground; the at least one processor is also configured to respond to the The seventh operation is to control the raising of the first camera.
  • an electronic device including a first camera, the first camera is a lift camera, a display screen, at least one processor and a memory; the memory is used to store one or more computer programs; When the one or more computer programs stored in the memory are executed by the at least one processor, the electronic device can implement the first aspect or any one of the possible design methods of the first aspect; or, when the memory stores When the one or more computer programs of the at least one processor are executed, the electronic device can implement the second aspect or any one of the possible design methods of the second aspect; or, when the memory stores one or more When a computer program is executed by the at least one processor, the electronic device can implement the third aspect or any possible design method of the third aspect.
  • an electronic device including a module/unit that executes the first aspect or any one of the possible design methods of the first aspect; or, the electronic device includes executing the second aspect Or the module/unit of any possible design method of the second aspect; or, the electronic device includes a module/unit that executes the third aspect or any one of the possible design methods of the third aspect; these modules/ The unit can be realized by hardware, or by hardware executing corresponding software.
  • a computer-readable storage medium includes a computer program.
  • the computer program runs on an electronic device, the electronic device executes the first aspect or the above-mentioned first aspect. Any possible design method; or, when a computer program runs on an electronic device, causes the electronic device to execute the second aspect or any one of the above-mentioned second aspect design methods; or; when the computer program When running on an electronic device, the electronic device is caused to execute the third aspect or any one of the possible design methods of the third aspect.
  • a program product which when the program product runs on an electronic device, causes the electronic device to execute the first aspect or any one of the possible design methods of the first aspect; or, when When the program product is running on an electronic device, the electronic device is caused to execute the second aspect or any one of the possible design methods of the second aspect; or, when the program product is running on the electronic device, The electronic device executes the third aspect or any one of the possible design methods of the foregoing third aspect.
  • a chip is also provided, which is coupled to a memory in an electronic device, and is used to call a computer program stored in the memory and execute the first aspect of the embodiments of the present application and any possible design technology of the first aspect Solution; or, the chip is used to call the computer program stored in the memory and execute the second aspect of the embodiment of the present application and any possible design technical solution of the second aspect; in the embodiment of the present application, “coupled” refers to two The components are directly or indirectly combined with each other; or, the chip is used to call the computer program stored in the memory and execute the third aspect of the embodiments of the present application and any possible design technical solutions of the third aspect; in the embodiments of the present application " Coupling means that two components are directly or indirectly combined with each other; in the embodiments of the present application, “coupled” means that two components are directly or indirectly combined with each other.
  • FIG. 1 is a schematic diagram of the hardware structure of a mobile phone 100 according to an embodiment of the application
  • FIG. 2 is a schematic diagram of the hardware structure of the mobile phone 100 according to an embodiment of the application
  • FIG. 3 is a schematic diagram of a graphical user interface of a mobile phone 100 according to an embodiment of the application
  • FIG. 4 is a schematic diagram of a graphical user interface of the mobile phone 100 provided by an embodiment of the application;
  • FIG. 5 is a schematic diagram of a graphical user interface of a mobile phone 100 according to an embodiment of the application
  • FIG. 6 is a schematic diagram of a graphical user interface of a mobile phone 100 according to an embodiment of the application.
  • FIG. 7 is a schematic diagram of a graphical user interface of the mobile phone 100 according to an embodiment of the application.
  • FIG. 8 is a schematic diagram of a graphical user interface of a mobile phone 100 according to an embodiment of the application.
  • FIG. 9 is a schematic diagram of the software structure of the mobile phone 100 according to an embodiment of the application.
  • FIG. 10 is a schematic flowchart of a mobile phone 100 for controlling camera lifting and lowering according to an embodiment of the application;
  • FIG. 11 is a schematic diagram of a process of controlling the elevation of the camera of the mobile phone 100 according to an embodiment of the application.
  • the application program (application, app for short) involved in the embodiments of the present application is a software program that can implement one or more specific functions.
  • multiple applications can be installed in an electronic device.
  • camera applications include: system camera applications and/or third-party camera applications.
  • instant messaging applications including: WeChat, Tencent chat software (QQ), WhatsApp Messenger, Line, photo sharing (instagram), Kakao Talk, DingTalk, etc.
  • the electronic device can realize the image shooting function through the camera application, and can use the instant messaging application to realize voice and video calls with other electronic devices.
  • the application program mentioned in the following may be an application program that has been installed when the electronic device leaves the factory, or an application program that a user downloads from the network or obtains from another electronic device during the use of the electronic device.
  • At least one of the embodiments of the present application includes one or more; wherein, multiple refers to greater than or equal to two.
  • words such as “first” and “second” are only used for the purpose of distinguishing description, and cannot be understood as indicating or implying relative importance, nor can it be understood as indicating Or imply the order.
  • references described in this specification to "one embodiment” or “some embodiments”, etc. mean that one or more embodiments of the present application include a specific feature, structure, or characteristic described in combination with the embodiment. Therefore, the phrases “in one embodiment”, “in some embodiments”, “in some other embodiments”, “in some other embodiments”, etc. appearing in different places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless it is specifically emphasized otherwise.
  • the terms “including”, “including”, “having” and their variations all mean “including but not limited to” unless otherwise specifically emphasized.
  • the electronic device may be a portable terminal including a lift camera, such as a mobile phone, a tablet computer, and the like.
  • portable electronic devices include but are not limited to carrying Or portable electronic devices with other operating systems.
  • the aforementioned portable electronic device may also be other portable electronic devices, such as a digital camera, etc., as long as it has a lift camera.
  • the above-mentioned electronic device may not be a portable electronic device, but a desktop computer with a lifting camera.
  • the electronic device is a mobile phone as an example
  • FIG. 1 shows a schematic structural diagram of the mobile phone 100.
  • the mobile phone 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone interface 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and user An identification module (subscriber identification module, SIM) card interface 195, etc.
  • SIM subscriber identification module
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait.
  • the different processing units may be independent devices or integrated in one or more processors.
  • the controller may be the nerve center and command center of the mobile phone 100. The controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 to store instructions and data. In some embodiments, the memory in the processor 110 is a cache memory.
  • the memory can store instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
  • the processor 110 may run the software code/module of the camera lifting control method provided in the embodiments of the present application to control the lifting of the camera.
  • the USB interface 130 is an interface that complies with the USB standard specification, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and so on.
  • the USB interface 130 can be used to connect a charger to charge the mobile phone 100, and can also be used to transfer data between the mobile phone 100 and peripheral devices.
  • the charging management module 140 is used to receive charging input from the charger.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charge management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
  • the wireless communication function of the mobile phone 100 can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
  • the antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the mobile phone 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • the mobile communication module 150 may provide a wireless communication solution including 2G/3G/4G/5G and the like applied on the mobile phone 100.
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
  • the mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform processing such as filtering, amplifying and transmitting the received electromagnetic waves to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic waves for radiation via the antenna 1.
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110.
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
  • the wireless communication module 160 can provide applications on the mobile phone 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), and global navigation satellite systems. (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • frequency modulation frequency modulation, FM
  • NFC near field communication technology
  • infrared technology infrared, IR
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110.
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110, perform frequency modulation, amplify it, and convert it into electromagnetic wave radiation via the antenna 2.
  • the antenna 1 of the mobile phone 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the mobile phone 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite-based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite-based augmentation systems
  • the mobile phone 100 implements a display function through a GPU, a display screen 194, and an application processor.
  • the GPU is a microprocessor for image processing, connected to the display 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • the processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, and application display interfaces, such as the viewfinder interface of a system camera.
  • the display screen 194 includes a display panel.
  • the display panel can adopt liquid crystal display (LCD), organic light-emitting diode (OLED), active-matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • active-matrix organic light-emitting diode active-matrix organic light-emitting diode
  • AMOLED flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (QLED), etc.
  • the mobile phone 100 may include one or N display screens 194, and N is a positive integer greater than one.
  • the camera 193 is used to capture still images or videos.
  • the camera 193 may include a front camera and a rear camera. Wherein, the number of front camera or rear camera may be at least one. In some embodiments, the camera 193 may be an elevating camera.
  • Figure 2 shows a schematic diagram of a possible mobile phone structure. It should be noted that only a part of the structure of the mobile phone 100 is shown in FIG. 2, for example, only a part of the mobile phone 100 including a camera is shown, and the other part is not shown. As shown in FIG. 2, the mobile phone 100 includes a housing 201, and the inside of the housing 201 includes one or more components, such as one or more components shown in FIG.
  • a display screen such as a full screen, may be provided on the surface 203 of the housing 201.
  • An opening 204 may be provided on the upper surface 202 of the housing 201, and the opening 204 may be used for retracting or popping up the lift camera.
  • the housing 201 includes a processor 110 and a lifting member 205 inside.
  • a camera 206 is provided on the lifting member 205.
  • the lifting member 205 may be any component with a lifting function, which is not limited in the embodiment of the present application.
  • the lifting member 205 can be a spring device, that is, the height h of the lifting member 205 can be extended or shortened.
  • the processor 110 may be connected to the lifting member 205 to control the lifting or retracting of the lifting member 205.
  • the mobile phone 100 has two cameras, one front camera and one rear camera.
  • a possible situation is that the mobile phone 100 includes a lifting member, the front camera is provided on the lifting member, and the rear camera is provided on the side opposite to the surface 203 (the surface 203 where the display screen is provided), that is, the back of the mobile phone 100.
  • the lifting member can realize the lifting of the front camera, and the rear camera is fixedly arranged on the back.
  • the mobile phone 100 includes a lifting member, and the front camera and the rear camera are both arranged on the lifting member (for example, on different surfaces of the lifting member).
  • the mobile phone 100 includes two lifting parts, the front camera is arranged on one lifting part, and the rear camera is arranged on the other lifting part.
  • the upper surface 202 of the housing 201 of the mobile phone 100 is provided with two openings, and each opening corresponds to a lifting member.
  • a front camera is arranged on the first lifting part, and a rear camera is arranged on the second lifting part.
  • three or more cameras may be provided on the mobile phone 100, for example, two rear cameras and one front camera.
  • the two rear cameras can be set on the same lifting member, and the front camera can be set on another lifting member.
  • the camera lifting solution provided by the embodiments of the present application can be applied to the above-mentioned various situations.
  • the mobile phone 100 includes a lifting member, the lifting member is provided with a front camera, and the rear camera is provided on the back of the mobile phone 100 (the side opposite to the display screen).
  • the processor 110 in the mobile phone 100 may be connected to the lifting member 205.
  • the processor 110 may send an instruction to the lifting member 205, and the instruction is used to instruct the lifting member to raise or retract.
  • the internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions.
  • the processor 110 executes various functional applications and data processing of the mobile phone 100 by running instructions stored in the internal memory 121.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, and software codes of at least one application program (such as a camera application, a WeChat application, etc.).
  • the data storage area can store data (such as images, videos, etc.) generated during the use of the mobile phone 100.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc.
  • the internal memory 121 may also store the software codes/modules of the camera lifting control method provided in the embodiments of the present application, and when the processor 110 runs the software codes/modules, it controls the camera lifting.
  • the internal memory 121 may also store images (for example, static images or moving images), videos, etc. captured by the camera.
  • the external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, images, videos and other files in an external memory card.
  • the software codes/modules of the camera lifting control method provided in the embodiments of the present application can also be stored in an external memory, and the processor 110 can run the software codes/modules through the external memory interface 120 to control the camera. The lift.
  • the mobile phone 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. For example, music playback, recording, etc.
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and the environment Light sensor 180L, bone conduction sensor 180M, etc.
  • the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
  • the pressure sensor 180A may be provided on the display screen 194.
  • the gyroscope sensor 180B can be used to determine the movement posture of the mobile phone 100. In some embodiments, the angular velocity of the mobile phone 100 around three axes (ie, x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyro sensor 180B can be used for image stabilization.
  • the air pressure sensor 180C is used to measure air pressure.
  • the mobile phone 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the mobile phone 100 may use the magnetic sensor 180D to detect the opening and closing of the flip holster.
  • the mobile phone 100 can detect the opening and closing of the flip according to the magnetic sensor 180D.
  • features such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the mobile phone 100 in various directions (generally three axes).
  • the magnitude and direction of gravity can be detected when the mobile phone 100 is stationary. It can also be used to identify the posture of electronic devices, and used in applications such as horizontal and vertical screen switching, pedometers and so on.
  • the mobile phone 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the mobile phone 100 may use the distance sensor 180F to measure the distance to achieve fast focusing.
  • the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector such as a photodiode.
  • the light emitting diode may be an infrared light emitting diode.
  • the mobile phone 100 emits infrared light to the outside through the light emitting diode.
  • the mobile phone 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the mobile phone 100. When insufficient reflected light is detected, the mobile phone 100 can determine that there is no object near the mobile phone 100.
  • the mobile phone 100 may use the proximity light sensor 180G to detect that the user holds the mobile phone 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • the proximity light sensor 180G can also be used in leather case mode, and the pocket mode will automatically unlock and lock the screen.
  • the ambient light sensor 180L is used to sense the brightness of the ambient light.
  • the mobile phone 100 can adaptively adjust the brightness of the display 194 according to the perceived brightness of the ambient light.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the mobile phone 100 is in the pocket to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the mobile phone 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photographs, fingerprint answering calls, and so on.
  • the temperature sensor 180J is used to detect temperature.
  • the mobile phone 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the mobile phone 100 performs a reduction in the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection.
  • the mobile phone 100 when the temperature is lower than another threshold, the mobile phone 100 heats the battery 142 to avoid abnormal shutdown of the mobile phone 100 due to low temperature.
  • the mobile phone 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also called “touch panel”.
  • the touch sensor 180K can be arranged on the display screen 194, and the touch screen is composed of the touch sensor 180K and the display screen 194, which is also called a "touch screen”.
  • the touch sensor 180K is used to detect touch operations acting on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • the visual output related to the touch operation can be provided through the display screen 194.
  • the touch sensor 180K may also be disposed on the surface of the mobile phone 100, which is different from the position of the display screen 194.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can obtain the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180M can also contact the human pulse and receive the blood pressure pulse signal.
  • the button 190 includes a power button, a volume button, and so on.
  • the button 190 may be a mechanical button. It can also be a touch button.
  • the mobile phone 100 can receive key input, and generate key signal input related to user settings and function control of the mobile phone 100.
  • the motor 191 can generate vibration prompts.
  • the motor 191 can be used for incoming call vibration notification, and can also be used for touch vibration feedback. For example, touch operations applied to different applications (such as photographing, audio playback, etc.) can correspond to different vibration feedback effects.
  • the indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, or to indicate messages, missed calls, notifications, and so on.
  • the SIM card interface 195 is used to connect to the SIM card.
  • the SIM card can be connected to and separated from the mobile phone 100 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the mobile phone 100.
  • the mobile phone 100 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • a third-party camera application in the mobile phone 100 is taken as an example, where the third-party camera application may be, for example, applications such as a beauty camera and an adorable photo.
  • the mobile phone 100 can determine whether to raise or lower the camera according to the current scene, instead of simply raising the camera when the third-party camera application is started, and retracting the camera when the third-party camera application exits.
  • the current scenario may include: the mobile phone 100 switches the third-party camera application from the foreground to the background; or the mobile phone 100 switches the third-party camera application from the background to the foreground; or, the mobile phone 100 is in the first
  • the display interface of the three-party camera application performs resolution switching and switching between front and rear cameras; or, the display interface of the third-party camera application in the mobile phone 100 is switched from the image capture mode to the video recording mode; or the mobile phone 100 is displaying the third-party camera application
  • the display interface is displayed, the operation for turning off the screen is detected and the display screen is turned off.
  • FIG. 3 shows a schematic diagram of a GUI provided by an embodiment of the present application, and the GUI may be referred to as a main interface 301.
  • the main interface 301 may include icons of multiple applications. Among them, the icon 302 of a third-party camera application (such as Meitu Xiuxiu) is included.
  • the GUI may be referred to as a display interface 303 of a third-party camera application.
  • the display interface 303 may include one or more controls. For example, it includes a “super-clear portrait shooting” control 304 and a “picture finishing” control 305, and a camera control 306.
  • the mobile phone 100 detects an operation on the camera control 306, it displays a viewfinder interface 307.
  • the viewfinder interface 307 includes a preview image and one or more controls.
  • the mobile phone 100 when the mobile phone 100 detects an operation on the icon 302 in the main interface 301, it can raise the front camera and start the front camera. In other embodiments, when the mobile phone 100 detects the operation of the camera control 306 in the display interface 303 of the third-party camera application, it can raise the front camera, start the front camera, and display this in the viewfinder interface 307
  • the image collected by the front camera is the preview image.
  • Scenario 1 A third-party camera application runs in the foreground.
  • the mobile phone 100 raises the front camera, that is, the viewfinder interface 307 displays the image collected by the front camera, and the rear camera is in the closed state.
  • the front camera can be kept in the raised state until the third-party camera application switches to the background to run the front camera.
  • Example 1 Taking (c) in FIG. 3 as an example, the mobile phone 100 detects an operation for closing the control 308, closes the viewfinder interface, and returns to the interface 303 shown in (b) in FIG. 3. During this process, the mobile phone 100 can continue to keep the front camera raised. Because the user controls the mobile phone 100 to return to the home page 303 of the third-party camera application, it may be that he wants to select another shooting method, such as selecting “beauty shooting”. Therefore, in this case, the mobile phone 100 may not retract the front camera to avoid frequent lifting of the front camera.
  • Example 2 Taking (c) in Figure 3 as an example, the mobile phone 100 detects the operation of the resolution switching control 309, and the mobile phone 100 switches the resolution of the current preview image to the target resolution, such as switching from 1:1 to 9:16. During this process, the mobile phone 100 can continue to keep the front camera in the raised state.
  • Example 3 Taking (c) in FIG. 3 as an example, the mobile phone 100 detects the operation for closing the control 308, closes the viewfinder interface, and returns to the interface 303 shown in (b) in FIG. 3.
  • the mobile phone 100 detects an operation on the "picture retouching" control 305 in the interface 303, the mobile phone 100 enters the retouching mode, and retouches the image stored in the mobile phone 100. During this process, the mobile phone 100 may also continue to keep the front camera in the raised state.
  • Example 4 When the mobile phone 100 closes the viewfinder interface of the third-party camera application (the viewfinder interface includes the preview image), but is still running in the foreground (for example, displays other interfaces other than the viewfinder interface of the third-party camera application), it can wait for a preset time If the mobile phone 100 does not open the viewfinder interface again within the period of time, the front camera is retracted.
  • the mobile phone 100 detects an operation for closing the control 308, closes the viewfinder interface, and returns to the interface 303 shown in (b) in FIG. 3. Assuming that the mobile phone 100 stays on the interface 303 for longer than the preset time, the front camera is retracted; or, the mobile phone 100 detects the operation of the "Picture Refinement" control 305 in the interface 303, enters the retouching mode, in the retouching mode If you do not need to use the front camera, retract the front camera. When the mobile phone 100 opens the viewfinder interface again, the front camera can be raised again. It should be noted that in the embodiments of the present application, "opening" the viewfinder interface refers to displaying the viewfinder interface in the foreground.
  • the mobile phone 100 starts a third-party camera application, raises the front camera, and displays a viewfinder interface 401 of the third-party camera application, and the viewfinder interface 401 includes images collected by the front camera.
  • the mobile phone 100 detects the operation of the camera switch control 402 in the viewfinder interface 401, the rear camera is activated.
  • the viewfinder interface 403 displays the image collected by the rear camera.
  • the front camera may not be lowered.
  • the front camera determines that certain conditions are met, the front camera is lowered.
  • the mobile phone 100 detects that the third-party camera application is switched from the foreground to the background, the front camera is lowered. For another example, if a third-party camera application runs in the foreground, but does not switch from the rear camera to the front camera for a long time, the front camera is lowered. For another example, after the mobile phone 100 activates the rear camera, it can output a prompt message to prompt the user whether to lower the front camera. If the mobile phone 100 receives the confirmation instruction to lower the front camera, the front camera is lowered.
  • the viewfinder interface 403 displays images collected by the rear camera, and the front camera in the mobile phone 100 is in a raised state.
  • the mobile phone 100 detects the operation to close the control 404 and returns to the upper-level interface of the third-party camera application, such as the homepage of the third-party camera application.
  • the mobile phone 100 still maintains The front camera is raised.
  • the viewfinder interface 403 displays images collected by the rear camera, and the front camera in the mobile phone 100 is in a raised state.
  • the mobile phone 100 detects the operation of the resolution switching control 405 to switch the resolution of the preview image, and the mobile phone 100 still keeps the front camera in the raised state.
  • the mobile phone 100 starts a third-party camera application, raises the front camera, and displays a viewfinder interface 501 of the third-party camera application.
  • the viewfinder interface 501 includes images collected by the front camera.
  • the mobile phone 100 detects an operation on the video control 502 in the viewfinder interface 501, it switches from the image shooting mode to the video recording mode, as shown in FIG. 5(b).
  • the front camera may not be lowered.
  • Example 5 and Example 6 can be used in combination.
  • the front camera after the mobile phone 100 is changed from the image capturing mode to the video recording mode, the front camera remains in the raised state. When the mobile phone 100 determines that certain conditions are met, the front camera is lowered. For example, when the mobile phone 100 detects that the third-party camera application is switched from the foreground to the background, the front camera is lowered. For another example, after the mobile phone 100 enters the video recording mode, it detects the operation of the camera switching control in the viewfinder interface, and starts the rear camera. In the video recording mode, the viewfinder interface displays the image collected by the rear camera.
  • the mobile phone 100 determines that the front camera is not switched from the rear camera to the front camera within the preset time period, and the front camera is lowered. For another example, after the mobile phone 100 enters the video recording mode, it detects the operation of the camera switch control in the viewfinder interface, and starts the rear camera, and can output a prompt message to prompt the user whether to lower the front camera. After receiving the confirmation instruction to lower the front camera, lower the front camera.
  • example 6 after the mobile phone 100 enters the video recording mode, the front camera is kept in the raised state.
  • the mobile phone 100 detects the operation of the resolution switching control in the viewfinder interface in the video recording mode, and switches the resolution of the preview image. During this process, the mobile phone 100 can keep the front camera in a raised state.
  • the mobile phone 100 does not raise and lower the front camera frequently when running a third-party camera application in the foreground, which helps to improve the user experience.
  • Scenario 2 The third-party camera application switches from the foreground to the background.
  • the mobile phone 100 displays the viewfinder interface 401 of the third-party camera application.
  • the mobile phone 100 detects that the third-party camera application is switched to the background operation (for example, it detects the return When the main interface is operated, or the viewfinder interface 401 is switched to the display interface of another application)
  • the front camera is retracted.
  • the mobile phone 100 detects that the third-party camera application is switched to running in the background, it waits for a certain period of time.
  • the mobile phone 100 determines that the third-party camera application has not been switched to the foreground within the period of time, the mobile phone 100 retracts the front camera.
  • the rear camera can be turned off.
  • the mobile phone 100 starts a third-party camera application, raises the front camera, and displays a viewfinder interface 307.
  • the viewfinder interface 307 includes images collected by the front camera.
  • the mobile phone 100 detects the operation for returning to the main interface, it displays the main interface.
  • it may be the main interface 301 shown in (a) in FIG. 3.
  • the third-party camera application is running in the background.
  • the mobile phone 100 can retract the front camera; or, after the mobile phone 100 displays the main interface, it can wait for a certain period of time.
  • the mobile phone 100 determines that the third-party camera application has not switched to the foreground again within this period of time, the mobile phone 100 retracts the front camera.
  • the mobile phone 100 starts a third-party camera application, raises the front camera, and displays a viewfinder interface 601, and the viewfinder interface 601 displays images collected by the front camera.
  • the WeChat application in the mobile phone 100 receives a new message and displays the new message in the status bar.
  • the mobile phone 100 detects an operation (for example, a click operation) on the status bar, and displays the information of the WeChat application as shown in (b) in Figure 6 Display interface.
  • the third-party camera application is running in the background, and the mobile phone 100 can retract the front camera; or, after the mobile phone 100 displays the display interface of the WeChat application, it can wait for a certain period of time. Switch to the foreground again, and the mobile phone 100 retracts the front camera.
  • the mobile phone 100 starts a third-party camera application, raises the front camera, and displays a viewfinder interface 701.
  • the viewfinder interface 701 includes images collected by the front camera.
  • the mobile phone 100 detects the operation of turning off the screen, such as the operation of the power button, turning off the display screen, as shown in (b) in FIG. 7.
  • the mobile phone 100 immediately retracts the front camera after detecting that the screen is off.
  • Another possible situation is that after the mobile phone 100 detects that the screen is turned off, it can wait for a preset time period, and then retract the front camera after the preset time period.
  • the mobile phone 100 determines that the mobile phone is not re-lit within the preset time period, or the mobile phone is not re-lit and re-enters the viewfinder interface of the third-party camera application, the front camera is retracted.
  • the mobile phone 100 can retract the front camera when the user does not use the front camera to save resources. For example, if the mobile phone 100 switches the third-party camera application from the foreground to the background, the front camera can be retracted immediately, or it can wait for a preset period of time. If the third-party camera application does not switch back to the foreground within the preset period of time, the camera application will be retracted. Set the camera.
  • Scenario 3 The third-party camera application switches from the background to the foreground.
  • the front camera when the mobile phone 100 runs a third-party camera application in the foreground, the front camera is raised. When the mobile phone 100 switches the third-party camera application from the foreground to the background, the front camera is retracted. When the mobile phone 100 switches the third-party camera application from the foreground to the background, the front camera is raised again.
  • the mobile phone 100 starts a third-party camera application, raises the front camera, and displays a viewfinder interface 801.
  • the viewfinder interface 801 includes images collected by the front camera.
  • the mobile phone 100 detects the operation of switching the third-party camera application to run in the background, such as returning to the main interface 802, and the mobile phone 100 retracts the front camera, as shown in (b) in FIG. 8.
  • the mobile phone 100 detects the operation of switching the third-party camera application to the foreground (for example, the click operation for the icon of the third-party camera application in the main interface 802), and raises the front camera again, and displays (c) in Figure 8 ) Interface shown.
  • the mobile phone 100 can determine the elevation of the front camera according to the current scenario. For example, the mobile phone 100 switches the third-party camera application from the foreground to the background, and the front camera can be retracted. When the mobile phone 100 switches the third-party camera application from the background to the foreground, the front camera can be raised again.
  • FIG. 9 shows a schematic diagram of the software architecture of the mobile phone 100 provided by an embodiment of the present application.
  • the software architecture of the mobile phone 100 mainly includes five layers from bottom to top: the kernel (kernel) layer, the hardware abstraction layer (HAL), the Android runtime (Android runtime), the system library, and the framework ( framework, FWK) layer and application (application) layer.
  • kernel kernel
  • HAL hardware abstraction layer
  • Android runtime Android runtime
  • system library the framework
  • framework framework, FWK
  • the application layer includes multiple applications, for example, application 1 to application n, where n is an integer greater than or equal to 2.
  • applications for example, system cameras, third-party camera applications, Douyin, WeChat/QQ, etc.
  • the framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications at the application layer.
  • the framework layer can include some predefined functions.
  • the framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, and a notification manager.
  • the window manager is used to manage window programs.
  • the window manager can obtain the size of the display, determine whether there is a status bar, lock the screen, take a screenshot, etc.
  • the content provider is used to store and retrieve data and make these data accessible to applications.
  • the data may include video, image, audio, phone calls made and received, browsing history and bookmarks, phone book, etc.
  • the view system includes visual controls, such as controls that display text and controls that display pictures.
  • the view system can be used to build applications.
  • the display interface can be composed of one or more views.
  • a display interface that includes a short message notification icon may include a view that displays text and a view that displays pictures.
  • the phone manager is used to provide the communication function of the mobile phone 100. For example, the management of the call status (including connecting, hanging up, etc.).
  • the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, etc.
  • the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and it can disappear automatically after a short stay without user interaction.
  • the notification manager is used to notify the download completion, message reminder, etc.
  • the notification manager can also be a notification that appears in the status bar at the top of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, text messages are prompted in the status bar, prompt sounds, electronic devices vibrate, and indicator lights flash.
  • the frame layer may also include: a lifting system and a lifting management service module.
  • the lifting system can be a bridge between the third-party camera application in the application layer and the lifting management service module in the framework layer.
  • the lifting system may receive a raise or lower camera instruction sent by a third-party camera application, and then send the instruction to the lifting management service module.
  • the lift management service module is used to determine whether the camera needs to be raised or lowered.
  • the lift management service module may be a part of the lift system or be independent of the lift system. If the lift management service module determines that the camera needs to be raised, it controls the camera to rise through the HAL layer; or, if the lift management service module determines that the camera needs to be lowered, it controls the camera to retract through the HAL layer.
  • the lift management service module may monitor the activity of the third-party camera application, for example, monitor whether the activity of the third-party camera application changes.
  • the lift management service module can decide to raise or lower the camera according to the change of activity. The specific content will be introduced later.
  • activity can be an interactive interface generated by an application.
  • an activity that is, an interactive interface
  • the interactive interface can include a viewfinder interface.
  • the lift management service module can monitor the life cycle of the activity of the third-party camera application.
  • the life cycle of an activity can be the cycle/duration from when an application creates an activity until the activity is closed.
  • the lift management service module monitoring the life cycle of the activity of the third-party camera application can include monitoring any changes in the activity (for example, switching from the foreground to the background, or switching from the background to the foreground, etc.), and then Determine whether to raise or lower the camera according to changes in activity.
  • each application can correspond to one or more activities.
  • each activity can set the activity name.
  • the lift management service module monitors an activity change, it can determine which application the activity is for. If it is a third-party camera application, it decides to raise or lower the camera according to the change of the activity.
  • Android runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
  • the core library consists of two parts: one part is the function functions that the java language needs to call, and the other part is the core library of Android.
  • the application layer and the application framework layer run in a virtual machine.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • the system library can include multiple functional modules. For example: surface manager (surface manager), media library (media libraries), 3D graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc.
  • surface manager surface manager
  • media library media libraries
  • 3D graphics processing library for example: OpenGL ES
  • 2D graphics engine for example: SGL
  • the surface manager is used to manage the display subsystem and provides a combination of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
  • the media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to realize 3D graphics drawing, image rendering, synthesis, and layer processing.
  • the 2D graphics engine is a drawing engine for 2D drawing.
  • the HAL layer may include some call interfaces, which can unify the complex drivers or interfaces in the kernel layer.
  • the HAL layer may include audio and video interfaces, GPS interfaces, call interfaces (radio interface layer, RIL), WIFI interfaces, and so on.
  • the HAL layer can also serve as a bridge between the framework layer and the kernel layer.
  • the HAL layer can receive commands to eject or retract the camera sent by the lift management service module in the framework layer, and then the HAL layer controls the camera to eject or retract through the kernel layer.
  • the kernel layer includes touch sensor driver, display driver, camera driver, etc.
  • the touch sensor driver is used to report the touch operation detected by the touch sensor to the framework layer
  • the display driver is used to drive the display screen to display content
  • the camera driver is used to turn the camera on or off.
  • FIG. 1 is the hardware architecture of the mobile phone 100 provided by an embodiment of the present application
  • FIG. 9 is the software architecture of the mobile phone 100 provided by the embodiment of the present application
  • the software programs and/or modules corresponding to the software architecture in FIG. 9 are stored In the internal memory 121, the processor 110 (for example, NPU or CPU) runs a software program and/or module stored in the internal memory 121 to execute the corresponding lifting process of the camera.
  • the processor 110 for example, NPU or CPU
  • the mobile phone 100 uses the software architecture shown in FIG. 8 to implement the camera processing process when the third-party camera application is switched from the background to the foreground, or from the foreground to the background.
  • the process can include:
  • the third-party camera application sends a first instruction to the lifting system, where the first instruction is used to instruct to turn on the front camera.
  • the mobile phone 100 may also include other processes.
  • the touch sensor driver sends the detected input events (such as a tap operation detected in the main interface, tap time, location coordinates, etc.) to the framework layer.
  • the frame layer can store the coordinates of each touch area in the current display interface (ie the main interface), so the frame layer can compare the position coordinates of the click operation in the input event with the coordinates of the stored touch area to determine the corresponding input event Touch the area, and then determine the display content in the touch area.
  • the framework layer can determine that the input event corresponds to the third-party camera application, and report the third-party camera application in the application layer .
  • the third-party camera application sends an instruction to turn on the front camera to the lifting system.
  • the lifting system sends the first instruction to the lifting management service module.
  • the lifting system does not directly send an instruction to open the front camera to the HAL layer, but sends an instruction to open the front camera to the lifting management service module, and the lifting management service module determines whether to lift the camera.
  • the lift management service module determines that the front camera is currently in the retracted state according to the camera status record table.
  • the lift management service module may record the status of each camera, for example, each camera is in an open or closed state, and/or each camera is in a raised or retracted state.
  • each camera is in an open or closed state, and/or each camera is in a raised or retracted state.
  • Table 1 is an example of the status record table of each camera recorded by the lift management service module provided in an embodiment of this application.
  • the lift management service module can determine that the front camera is currently in the retracted state based on Table 1, then the lift management service module may send a second instruction to the HAL layer, and the second instruction is used to instruct to raise/pop the front camera.
  • the “NA” of the rear camera can be used to indicate that the rear camera cannot be raised or lowered, and is fixed on the back of the mobile phone 100.
  • the lift management service module sends a pop-up command to the HAL layer.
  • the pop-up command is used to instruct the front camera to pop up.
  • the HAL layer can control the pop-up of the front camera through a lower layer such as the kernel layer.
  • the HAL layer can control the elevation of the front camera through the kernel layer to drive the front camera to elevate.
  • the front camera can be turned on, and the front camera collects images.
  • the lift management service module updates the status record table of the camera.
  • the kernel layer can send a feedback instruction to the lift management service module in the HAL layer.
  • the feedback instruction is used to indicate that the front camera has popped up and the front camera has been turned on.
  • the lift management service module can update the camera status record table, such as Table 1 above, and the updated table can be as shown in Table 2:
  • the lift management service module may perform subsequent processing according to the updated camera status record table.
  • the third-party camera creates an activity.
  • an activity can be created, and the display driver of the kernel layer can be used to drive the display screen to display the viewfinder interface of the third-party camera application, such as the viewfinder interface 307 shown in (c) in FIG. 3.
  • the viewfinder interface 307 includes images collected by the front camera.
  • the lift management service module monitors the life cycle of the activity.
  • the lift management service module can monitor the life cycle of the activity, that is, the change of the activity.
  • the third-party camera application switches from the foreground to the background.
  • the display screen of the mobile phone 100 displays a viewfinder interface 601 of a third-party camera application.
  • the WeChat in the mobile phone 100 receives a new message, and the new message received by WeChat is displayed in the status bar of the display screen.
  • the touch sensor driver detects an input event for a new message, and reports the input event to the third-party camera application through the upper layer.
  • the third-party camera application runs in the background.
  • the third-party camera application can call the onPause function in the activity to make the third-party camera application run in the background.
  • the lift management service module monitors that the activity changes from a focused activity to a non-focused activity.
  • the focused activity may be an activity corresponding to a visible display interface, for example, an activity corresponding to a display interface displayed in the foreground; a non-focused activity may be an activity corresponding to an invisible display interface, for example, an application running in the background
  • the activity corresponding to the display interface can receive user input operations, such as clicking and sliding operations on the touch screen, while non-focused activities cannot receive user input operations.
  • the display interface corresponding to the activity is switched to running in the background; when an activity changes from a non-focused activity to a focused activity, the display interface corresponding to the activity runs from the foreground to the foreground .
  • the electronic device starts a third-party camera application
  • the third-party camera application can create an activity
  • the display interface corresponding to the activity is displayed in the foreground, that is, the viewfinder interface.
  • the activity created by the third-party camera application is currently the focus activity. If the electronic device detects the operation of returning to the main interface or displaying the display interface of other applications, and the activity created by the third-party application calls onPause to start another activity, the activity created by the third-party camera application becomes a non-focus activity. Another activity becomes the focus activity.
  • the other activity may be, for example, the activity corresponding to the main interface or the activity corresponding to the display interface of other applications, that is, the display interface of the third-party camera application is switched from the foreground to the background, and the main interface is displayed in the foreground. Or the display interface of other applications.
  • the electronic device runs a third-party camera application in the background, that is, the activity created by the third-party camera application is currently a non-focus activity, and the foreground displays the main interface or the display interface of other applications, that is, the activity of the main interface or the display interface of other applications is the focus activity.
  • the electronic device detects the operation for switching the third-party camera application to the foreground, and the activity created by the third-party camera application calls the callback (onResume) function, which changes from a non-focus activity to a focused activity and displays it in the foreground; the main interface or other applications The activity corresponding to the display interface becomes a non-focus activity and runs in the background.
  • the callback onResume
  • the lift management service module determines the currently raised camera from the updated camera status record table.
  • the lift management service module updates the camera status record table after raising the front camera.
  • the lift management service module monitors that the activity is switched from the foreground to the background, it queries the updated camera status record table such as Table 2 above, and determines that the front camera is in the rising state.
  • the lift management service module can send a command to retract the front camera to the HAL layer.
  • the lift management service module sends a command to retract the front camera to the HAL layer.
  • the HAL layer can control the retraction of the front camera through a lower layer such as the inner core layer.
  • the HAL layer can control the retracting of the lifting member where the front camera is located through the inner core layer to drive the front camera to retract.
  • the front camera can be turned off.
  • the lift management service module may update the camera record status table. For example, update Table 3 above to obtain Table 3 below.
  • the third-party camera application switches from the background to the foreground.
  • the mobile phone 100 displays a main interface 802 and runs a third-party camera application in the background.
  • the touch sensor driver detects an input event (for example, clicking an input event of a third-party camera application in the main interface 802), and reports the input event to the third-party camera application through the upper layer.
  • the third-party camera application is switched from the background to the foreground.
  • the third-party camera application can call the onResume function in the activity to switch the third-party camera application from the background to the foreground.
  • the lift management service module monitors that the activity changes from a non-focus activity to a focused activity.
  • the activity created by a third-party camera application if the activity calls onResume, it changes from a non-focus activity to a non-focus activity, so the third-party camera application switches from the background to the foreground.
  • the lift management service module determines that the currently opened camera is the front camera according to the recording status table of the camera.
  • the lift management service module can determine the camera that is currently on, that is, the front camera, according to the latest camera state record table, such as Table 3 above, and then send a command to raise the front camera to the HAL layer.
  • the lift management service module sends a command to raise the front camera to the HAL layer.
  • the front camera when the mobile phone 100 switches the third-party camera application from the foreground to the background, the front camera can be retracted, and when the third-party camera application is switched from the background to the foreground, the front camera can be raised.
  • the activity corresponding to the third-party camera application will not change, that is, the mobile phone 100 displays the third-party camera application In the viewfinder interface, if the mobile phone 100 detects an operation on one or more controls in the viewfinder interface, the activity will not change.
  • the lift management service module detects that the activity has not changed, it can keep the front camera in the raised state.
  • the mobile phone 100 launches a third-party camera application, raises the front camera, and displays a viewfinder interface 307.
  • the viewfinder interface 307 includes a resolution switching control 309.
  • the touch sensor driver detects an input event, such as an input event of clicking the resolution control 309.
  • the touch sensor driver sends the input event to the third-party camera application via the upper layer.
  • the third-party camera application switches the resolution of the preview image.
  • the lift management service module detects that the activity has not changed, so the front camera may not be retracted.
  • the camera lifting control method provided in the embodiments of the present application may also be applicable to scenes such as video recording and video calls.
  • Video recording scenes such as the mobile phone 100 recording videos through a system camera or a third-party camera application;
  • video call scenes such as the mobile phone 100 using instant messaging applications such as WeChat/QQ to make a video call with other devices.
  • the mobile phone 100 uses the software architecture shown in FIG. 9 to implement a camera processing process during a video call.
  • the following embodiments take the WeChat application as an example. As shown in Figure 11, the process can include:
  • the WeChat application After the WeChat application is started, create an activity; for example, the activity can correspond to a chat interface with a contact in the WeChat application.
  • the lift management service module monitors the life cycle of the activity.
  • the WeChat application calls the audio call interface to start the audio module.
  • the WeChat application can call the audio and video drivers in the kernel layer through the audio and video interfaces in the HAL layer to drive the audio module to play call sounds.
  • the audio module can include one or more speakers.
  • the system enters the audio call mode.
  • the Android system may include multiple sound modes (aduio mode), for example, normal mode (mode_normal), that is, when there is no ringtone and phone, ring mode (mode_ringtone), call mode (mode_in_communication), etc.
  • the call mode may include an audio call mode and a video call module.
  • the audio and video interface may include a mode setting (setmode) interface.
  • the WeChat application can call the setmode interface to set the sound mode (mode) to implement different call modes. For example, a WeChat application can call the setmode interface to set the mode flag to 3, indicating that the system is in audio call mode. For another example, a WeChat application can call the setmode interface to set the mode flag to 2, indicating that the system is in video call mode.
  • the lift management service module can monitor the changes in the audio call mode.
  • the lifting system or the lifting management service module may call the extended interface of the audio manager to register the listening event of the audio mode (aduio mode) to monitor the audio mode of the system. For example, if the lift management service module monitors that the flag bit of the sound mode is set to 3, it determines that the system is currently in the audio call mode.
  • the WeChat application sends an instruction to turn on the front camera to the lifting system.
  • the lifting system sends an instruction to turn on the front camera to the lifting management service module.
  • the lift management service module sends an instruction to raise/pop the front camera to the HAL layer.
  • the WeChat application connects to the video call.
  • the mobile phone 100 may enter the video call mode when detecting that the other party's device answers the video call. In the video call mode, the mobile phone 100 can continuously send the images collected by the front camera to the counterpart device in real time.
  • the system enters the video call mode.
  • the mode flag bit can be set to 2 through the setmode interface, indicating that it is currently in the video call mode.
  • the lift management service module monitors that the system enters the video call mode from the audio call mode.
  • the lift management service module can monitor the sound mode (mode), for example, the flag bit of the sound mode can be viewed in real time. If the flag bit is set to 2, it is determined that the system is currently in the video call mode.
  • mode the sound mode
  • the flag bit is set to 2
  • the lift management service module records that the application in the video call mode is the WeChat application, and the activity that records the use of the front camera is the activity of the WeChat application.
  • the lift management service module may record an application in a video call mode, that is, a WeChat application, and may also record that the activity currently using the front camera is an activity of a WeChat application, for example, record the name of the activity.
  • the lift management service module monitors that the activity of the WeChat application changes from a focused activity to a non-focused activity.
  • the lift service management module monitors that the activity of the WeChat application changes from a focused activity to a non-focused activity, that is, when the WeChat application is switched from the foreground to the background, it can further determine whether to keep the front camera in the raised state.
  • the elevator management service module determines whether it is currently in a video call mode, if yes, execute 1116, and if not, execute 1118.
  • the lift management service module can determine whether the flag bit of the current mode is 3. If it is, it is determined that the system is in video call mode; if not, it means that the system is not currently in video call mode, and the camera can be retracted without using the camera. .
  • the lift management service module determines whether the application currently in the video call mode is a WeChat application, if it is, execute 1117, and if not, execute 1118.
  • the lift management service module records applications in video call mode. Therefore, when the lift management service module determines that the current video call mode is still a WeChat application, it can continue to execute 1117. If it is not a WeChat application, the camera can be retracted.
  • the lift management service module determines that the activity currently using the front camera is the activity of the WeChat application; if yes, execute 1119, and if not, execute 1118.
  • the lift management service module can also record the activity that currently uses the front camera, such as the name of the activity. Therefore, the lift management service module can determine whether the activity using the front camera is the activity of the WeChat application. If it is, the lift management service module may not send an instruction to retract the front camera to the HAL layer; if not, send it back to the HAL layer Camera instructions.
  • the lift management service module sends an instruction to retract the camera to the HAL layer.
  • the lift management service module does not send an instruction to retract the camera to the HA layer.
  • the mobile phone 100 can continue to keep the camera in the raised state.
  • the mobile phone 100 can continue when the video call interface is displayed in the floating window Keep the camera in the raised state.
  • the method provided in the embodiments of the present application is introduced from the perspective of the electronic device (mobile phone 100) as the execution subject.
  • the terminal device may include a hardware structure and/or software module, and realize the above functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. Whether one of the above-mentioned functions is executed in a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraint conditions of the technical solution.
  • the term “when” can be interpreted as meaning “if" or “after” or “in response to determining" or “in response to detecting".
  • the phrase “when determining" or “if detected (statement or event)” can be interpreted as meaning “if determined" or “in response to determining" or “when detected (Condition or event stated)” or “in response to detection of (condition or event stated)”.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center integrated with one or more available media.
  • the usable medium may be a magnetic medium, (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state hard disk).

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • Telephone Function (AREA)
  • Studio Devices (AREA)

Abstract

本申请提供了一种摄像头升降控制方法与电子设备。该电子设备配置有第一摄像头,第一摄像头是升降式摄像头,该方法包括:电子设备检测到针对第三方相机应用的图标的第一操作;响应于所述第一操作,启动所述第三方相机应用,升起所述第一摄像头,并启动所述第一摄像头;显示取景界面,所述取景界面中包括预览图像,所述预览图像为所述第一摄像头采集的图像;检测到将所述第三方相机应用从前台切换到后台运行或者熄灭屏幕的第二操作;响应于所述第二操作,收回所述第一摄像头。本申请中,电子设备可以灵活的控制摄像头的升降,例如,当第三方相机应用切换到后台时,可以收回摄像头。

Description

一种摄像头升降控制方法与电子设备
相关申请的交叉引用
本申请要求在2019年07月22日提交中国专利局、申请号为201910663345.8、申请名称为“一种摄像头升降控制方法与电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端技术领域,尤其涉及一种摄像头升降控制方法与电子设备。
背景技术
随着终端技术的进步,业界提出了采用升降式摄像头的方式来实现全面屏。电子设备打开相机的时候,摄像头升起,退出相机的时候,摄像头下降。
但目前,电子设备无法根据当前的实际情况准确的控制摄像头的升降。以手机为例,手机打开相机应用,升起摄像头,然后手机返回桌面,将相机后台运行,由于并未退出相机应用,所以手机仍然保持摄像头升起。但事实上,用户将相机切到后台,已经是不需要摄像头了,若此时摄像头无法下降,会影响用户体验。
发明内容
本申请提供了一种摄像头升降控制方法与电子设备。该方法中,电子设备可以根据当前的实际情况,灵活的控制摄像头的升降,方便用户操作,提升用户体验。
第一方面,本申请实施例提供一种摄像头升降控制方法,该方法可以由电子设备执行,该电子设备配置有第一摄像头,所述第一摄像头是升降式摄像头,所述电子设备中包括第三方相机应用,该方法包括:检测到针对所述第三方相机应用的图标的第一操作;响应于所述第一操作,启动所述第三方相机应用,升起所述第一摄像头,并启动所述第一摄像头;显示取景界面,所述取景界面中包括预览图像,所述预览图像为所述第一摄像头采集的图像;检测到将所述第三方相机应用从前台切换到后台运行或者熄灭屏幕的第二操作;响应于所述第二操作,收回所述第一摄像头。
在一些实施例中,电子设备启动第三方相机应用,升起摄像头,显示该第三方相机应用的取景界面的过程中,若电子设备检测到将第三方相机应用切换到后台,或者熄灭屏幕的操作,可以收回摄像头,实现摄像头的灵活升降,方便用户操作,提升用户体验,还能节省资源。
在一种可能的设计中,所述第一摄像头是前置摄像头和/或后置摄像头。
在一种可能的设计中,在所述响应于所述第二操作,收回所述第一摄像头之前,电子设备还可以确定在第一预设时长内,所述第三方相机应用未切回到前台运行;其中,所述第一预设时长是从检测到所述第二操作的时刻开始的预设时长,或者,是从所述第三方相机应用从前台切换到后台的时刻开始的预设时长,或者,是从熄灭屏幕的时刻开始的预设时长。
在一些实施例中,电子设备启动第三方相机应用,升起摄像头,显示该第三方相机应用的取景界面的过程中,若电子设备检测到将第三方相机应用切换到后台,或者熄灭屏幕的操作,可以等待一段时长,若该时长内第三方相机应用未切换到前台,则收回摄像头,实现摄像头的灵活升降,方便用户操作,提升用户体验,还能节省资源。
在一种可能的设计中,在所述检测到将所述第三方相机应用从前台切换到后台运行或者熄灭屏幕的第二操作之前,电子设备还可以检测到针对所述取景界面中的分辨率切换控件的第三操作;响应于所述第三操作,切换所述预览图像的分辨率;保持所述第一摄像头处于升起状态。
在一些实施例中,电子设备启动第三方相机应用,升起摄像头,显示该第三方相机应用的取景界面的过程中,若电子设备检测到针对分辨率切换控件的操作,可以不收回摄像头,有助于避免摄像头的频繁升降。
在一种可能的设计中,在所述检测到将所述第三方相机应用从前台切换到后台运行或者熄灭屏幕的第二操作之前,电子设备还可以检测到用于关闭所述取景界面的第四操作;响应于所述第四操作,显示所述第三方相机应用的第一界面;所述第一界面中不包括所述预览图像;保持所述第一摄像头处于升起状态。
在一些实施例中,电子设备启动第三方相机应用,升起摄像头,显示该第三方相机应用的取景界面的过程中,若电子设备检测到针对关闭预览图像,显示第三方相机应用的其它界面的操作,可以不收回摄像头,有助于避免摄像头的频繁升降。
在一种可能的设计中,在所述检测到将所述第三方相机应用从前台切换到后台运行或者熄灭屏幕的第二操作之前,电子设备还可以检测到针对所述取景界面中的视频控件的第五操作;响应于所述第五操作,进入视频录制模式;保持所述第一摄像头处于升起状态。
在一些实施例中,电子设备启动第三方相机应用,升起摄像头,显示该第三方相机应用的取景界面的过程中,若电子设备检测到图像拍摄模式切换成视频录制模式的操作,可以不收回摄像头,有助于避免摄像头的频繁升降。
在一种可能的设计中,所述第一摄像头是前置摄像头,所述电子设备还配置有第二摄像头,所述第二摄像头是后置摄像头,在所述检测到将所述第三方相机应用从前台切换到后台运行或者熄灭屏幕的第二操作之前,电子设备还可以检测到针对所述取景界面中的摄像头切换控件的第六操作;响应于所述第六操作,启动所述后置摄像头,所述取景界面中包括所述后置摄像头采集的图像;保持所述前置摄像头处于升起状态。
在一些实施例中,电子设备启动第三方相机应用,升起摄像头,显示该第三方相机应用的取景界面的过程中,若电子设备检测到针对摄像头切换控件的操作,可以不收回摄像头,有助于避免摄像头的频繁升降。
在一种可能的设计中,电子设备确定在第二预设时长内,所述取景界面未重新显示所述前置摄像头采集的图像,收回所述前置摄像头。
在一些实施例中,电子设备启动第三方相机应用,升起前置摄像头,显示该第三方相机应用的取景界面,该取景界面中包括前置摄像头采集的图像。若电子设备检测到针对摄像头切换控件的操作,取景界面中显示后置摄像头采集的图像,电子设备可以等待一段时长,若该时长内,取景界面仍然显示后置摄像头采集的图像,可以收回摄像头,以节省资源。
在一种可能的设计中,电子设备还可以检测到将所述第三方相机应用从后台切换到前 台运行的第七操作;响应于所述第七操作,升起所述第一摄像头。
在一些实施例中,电子设备启动第三方相机应用,升起摄像头,显示该第三方相机应用的取景界面的过程中,若电子设备检测到将第三方相机应用从前台切换到后台的操作,可以收回摄像头;当电子设备检测到第三方相机应用再次切换到前台时,可以重新升起摄像头,实现摄像头的灵活升降,方便用户操作,提升用户体验。
第二方面,还提供一种摄像头升降控制方法,应用于电子设备,所述电子设备配置有第一摄像头,所述第一摄像头是升降式摄像头,所述电子设备中包括第三方相机应用。该方法包括:检测到针对所述第三方相机应用的图标的第一操作;响应于所述第一操作,启动所述第三方相机应用,升起所述第一摄像头,并启动所述第一摄像头;所述第三方应用创建第一activity;所述第一activity对应所述第三方相机应用的取景界面;显示所述取景界面,所述取景界面中包括所述第一摄像头采集的图像;监听所述第一activity的变化情况;当监听到所述第一activity发生变化时,收回所述第一摄像头。
在一些实施例中,电子设备启动第三方相机应用,升起摄像头,显示该第三方相机应用可以创建的第一activity,对应取景界面。若电子设备监听到该第一activity发生变化,可以收回摄像头,实现摄像头的灵活升降,方便用户操作,提升用户体验。
在一种可能的设计中,所述监听到所述第一activity发生变化,收回所述第一摄像头,包括:监听到所述第一activity由焦点activity变为非焦点activity,收回所述第一摄像头。
在一些实施例中,电子设备监听到第三方相机应用创建的第一activity由焦点activity变为非焦点activity时,可以确定第三方相机应用从前台切换到后台,可以收回摄像头,实现摄像头的灵活升降,方便用户操作,提升用户体验。
在一种可能的设计中,在所述收回所述第一摄像头之前,电子设备还可以确定在第一预设时长内,所述第一activity未变回成焦点activity。
在一些实施例中,电子设备监听到第三方相机应用创建的第一activity由焦点activity变为非焦点activity后,可以等待预设时长,若该时长内第一activity未变为焦点activity,可以收回摄像头,实现摄像头的灵活升降,方便用户操作,提升用户体验。
在一种可能的设计中,监听到所述activity由焦点activity变为非焦点activity,包括:监听到所述第一activity调用onPause,以启动第二activity,所述第二activity对应所述电子设备的主界面,或对应所述电子设备中除去所述第三方相机应用之外的其它应用的显示界面。
在一些实施例中,电子设备监听到第三方相机应用创建的第一activity监听到所述第一activity调用onPause,以启动第二activity,所述第二activity不是第三方相机应用的显示界面时,可以收回摄像头,实现摄像头的灵活升降,方便用户操作,提升用户体验。
在一种可能的设计中,电子设备还可以当监听到所述第一activity由非焦点activity变为焦点activity时,升起所述第一摄像头。
在一些实施例中,电子设备监听到第三方相机应用创建的第一activity由焦点activity变为非焦点activity时,可以确定第三方相机应用从前台切换到后台,可以收回摄像头。当电子设备监听到所述第一activity由非焦点activity变为焦点activity时,可以升起所述第一摄像头,实现摄像头的灵活升降,方便用户操作,提升用户体验。
在一种可能的设计中,所述监听到所述第一activity由非焦点activity变为焦点activity,包括:监听到所述电子设备调用onResume,以使所述第一activity改变为焦点activity。
在一些实施例中,电子设备监听到所述电子设备调用onResume,可以确定所述第一activity改变为焦点activity,可以升起第一摄像头,实现摄像头的灵活升降,方便用户操作,提升用户体验。
在一种可能的设计中,电子设备还可以在未监听到所述第一activity发生变化时,保持所述第一摄像头处于升起状态。
在一些实施例中,电子设备启动第三方相机应用,升起摄像头,显示该第三方相机应用可以创建的第一activity,对应取景界面。若电子设备未监听到该第一activity发生变化,可以不收回摄像头,避免摄像头的频繁升降。
在一种可能的设计中,所述第一摄像头是前置摄像头和/或后置摄像头。
第三方面,本申请还提供一种摄像头升降控制方法,应用于电子设备,所述电子设备配置有第一摄像头,所述第一摄像头是升降式摄像头,所述电子设备中包括即时通信应用,该方法包括:所述即时通信应用接收到视频来电;检测到第一操作;响应于所述第一操作,所述即时通信应用接通视频通话;升起所述第一摄像头;所述即时通信应用创建第一activity,所述第一activity对应所述即时通信应用的通话界面;显示所述通话界面,所述通话界面中包括所述第一摄像头采集的图像;监听所述第一activity的变化;当监听到所述第一activity发生变化时,收回所述第一摄像头。
在一些实施例中,电子设备启动即时通信应用接听视频来电时,升起摄像头,即时通信应用窗口创建第一activity对应所述即时通信应用的通话界面。电子设备可以监听第一activity的变化情况,若第一activity发生变化,则收回第一摄像头。
在一种可能的设计中,当监听到所述第一activity发生变化时,收回所述第一摄像头,包括:当监听到所述第一activity由焦点activity变化为非焦点activity时,收回所述第一摄像头。
在一些实施例中,电子设备监听到第一activity由焦点activity变化为非焦点activity时,确定即时通信应用从前台切换到后台,可以收回摄像头。
在一种可能的设计中,在监听到所述第一activity发生变化之后,且收回所述第一摄像头之前,电子设备还可以判断所述电子设备当前是否处于视频通话模式;若当前处于视频通话模式,不收回所述第一摄像头;若当前不处于视频通话模式,收回所述第一摄像头。
在一些实施例中,电子设备监听到第一activity由焦点activity变化为非焦点activity后,确定即时通信应用从前台切换到后台运行,有可能即时通信应用在后台保持视频通话模式,所以为了提升准确性,电子设备还可以判断电子设备当前是否视频通信模式,若是,则不收回摄像头。
在一种可能的设计中,若当前仍然处于视频通话模式,不收回所述第一摄像头,包括:若当前处于视频通话模式,判断当前处于视频通话模式的应用是否为所述即时通信应用;若当前处于视频通话模式的应用是所述即时通信应用,不收回所述第一摄像头;若当前处于视频通话模式的应用不是所述即时通信应用,收回所述第一摄像头。
在一些实施例中,电子设备监听到第一activity由焦点activity变化为非焦点activity后,确定即时通信应用从前台切换到后台运行,电子设备还可以判断当前处于视频通话模式的应用是否是所述即时通信应用,若是,则不收回摄像头。
在一种可能的设计中,若当前处于视频通话模式的应用是所述即时通信应用,不收回所述第一摄像头,包括:若当前处于视频通话模式的应用是所述即时通信应用,判断当前 使用所述第一摄像头的activity是否为所述第一activity;若当前使用所述第一摄像头的activity是所述第一activity,不收回所述第一摄像头;若当前使用所述第一摄像头的activity是所述第一activity,收回所述第一摄像头。
在一些实施例中,电子设备监听到第一activity由焦点activity变化为非焦点activity后,确定即时通信应用从前台切换到后台运行,电子设备还可以判断当前处于视频通话模式的activity是否是所述即时通信应用的activity,若是,则不收回摄像头。
第四方面,还提供一种电子设备,该电子设备包括第一摄像头,至少一个处理器,显示屏和输入设备;其中所述第一摄像头是升降式摄像头:所述输入设备,用于检测针对所述第三方相机应用的图标的第一操作;所述至少一个处理器,用于响应于所述第一操作,启动所述第三方相机应用,控制所述第一摄像头升起,并启动所述第一摄像头;所述第一摄像头,用于采集图像;所述显示屏,用于显示取景界面,所述取景界面中包括预览图像,所述预览图像为所述第一摄像头采集的图像;所述输入设备,还用于检测将所述第三方相机应用从前台切换到后台运行或者熄灭屏幕的第二操作;所述至少一个处理器,还用于响应于所述第二操作,控制所述第一摄像头收回。
在一种可能的设计中,所述至少一个处理器在用于响应于所述第二操作,控制所述第一摄像头收回之前,还用于:确定在第一预设时长内,所述第三方相机应用未切回到前台运行;其中,所述第一预设时长是从检测到所述第二操作的时刻开始的预设时长,或者,是从所述第三方相机应用从前台切换到后台的时刻开始的预设时长,或者,是从熄灭屏幕的时刻开始的预设时长。
在一种可能的设计中,所述输入设备在用于检测将所述第三方相机应用从前台切换到后台运行或者熄灭屏幕的第二操作之前,还用于:检测针对所述取景界面中的分辨率切换控件的第三操作;所述至少一个处理器,还用于响应于所述第三操作,切换所述预览图像的分辨率,并控制所述第一摄像头处于升起状态。
在一种可能的设计中,在输入设备在用于检测将所述第三方相机应用从前台切换到后台运行或者熄灭屏幕的第二操作之前,还用于:检测用于关闭所述取景界面的第四操作;所述至少一个处理器,还用于响应于所述第四操作,通过所述显示屏显示所述第三方相机应用的第一界面;所述第一界面中不包括所述预览图像;所述至少一个处理器,还用于控制所述第一摄像头处于升起状态。
在一种可能的设计中,在所述检测到将所述第三方相机应用从前台切换到后台运行或者熄灭屏幕的第二操作之前,所述方法还包括:检测到针对所述取景界面中的视频控件的第五操作;响应于所述第五操作,进入视频录制模式;保持所述第一摄像头处于升起状态。
在一种可能的设计中,所述第一摄像头是前置摄像头,所述电子设备还配置有第二摄像头,所述第二摄像头是后置摄像头,所述输入设备在用于检测将所述第三方相机应用从前台切换到后台运行或者熄灭屏幕的第二操作之前,还用于:检测到针对所述取景界面中的摄像头切换控件的第六操作;所述至少一个处理器,还用于响应于所述第六操作,启动所述后置摄像头,所述取景界面中包括所述后置摄像头采集的图像,并控制所述前置摄像头处于升起状态。
在一种可能的设计中,所述至少一个处理器还用于:确定在第二预设时长内,所述取景界面未重新显示所述前置摄像头采集的图像,控制所述前置摄像头收回。
在一种可能的设计中,所述输入设备还用于:检测到将所述第三方相机应用从后台切 换到前台运行的第七操作;所述至少一个处理器,还用于响应于所述第七操作,控制所述第一摄像头升起。
第五方面,还提供了一种电子设备,包括第一摄像头,所述第一摄像头是升降摄像头、显示屏、至少一个处理器和存储器;所述存储器用于存储一个或多个计算机程序;当所述存储器存储的一个或多个计算机程序被所述至少一个处理器执行时,使得电子设备能够实现第一方面或者第一方面的任意一种可能的设计的方法;或者,当所述存储器存储的一个或多个计算机程序被所述至少一个处理器执行时,使得电子设备能够实现第二方面或者第二方面的任意一种可能的设计的方法;或者,当所述存储器存储的一个或多个计算机程序被所述至少一个处理器执行时,使得电子设备能够实现第三方面或者第三方面的任意一种可能的设计的方法。
第六方面,还提供了一种电子设备,所述电子设备包括执行第一方面或者第一方面的任意一种可能的设计的方法的模块/单元;或者,所述电子设备包括执行第二方面或者第二方面的任意一种可能的设计的方法的模块/单元;或者,所述电子设备包括执行第三方面或者第三方面的任意一种可能的设计的方法的模块/单元;这些模块/单元可以通过硬件实现,也可以通过硬件执行相应的软件实现。
第七方面,还提供一种计算机可读存储介质,所述计算机可读存储介质包括计算机程序,当计算机程序在电子设备上运行时,使得所述电子设备执行第一方面或上述第一方面的任意一种可能的设计的方法;或者,当计算机程序在电子设备上运行时,使得所述电子设备执行第二方面或上述第二方面的任意一种可能的设计的方法;或者;当计算机程序在电子设备上运行时,使得所述电子设备执行第三方面或上述第三方面的任意一种可能的设计的方法。
第八方面,还提供一种程序产品,当所述程序产品在电子设备上运行时,使得所述电子设备执行第一方面或上述第一方面的任意一种可能的设计的方法;或者,当所述程序产品在电子设备上运行时,使得所述电子设备执行第二方面或上述第二方面的任意一种可能的设计的方法;或者,当所述程序产品在电子设备上运行时,使得所述电子设备执行第三方面或上述第三方面的任意一种可能的设计的方法。
第九方面,还提供一种芯片,所述芯片与电子设备中的存储器耦合,用于调用存储器中存储的计算机程序并执行本申请实施例第一方面及其第一方面任一可能设计的技术方案;或者,所述芯片用于调用存储器中存储的计算机程序并执行本申请实施例第二方面及其第二方面任一可能设计的技术方案;本申请实施例中“耦合”是指两个部件彼此直接或间接地结合;或者,所述芯片用于调用存储器中存储的计算机程序并执行本申请实施例第三方面及其第三方面任一可能设计的技术方案;本申请实施例中“耦合”是指两个部件彼此直接或间接地结合;本申请实施例中“耦合”是指两个部件彼此直接或间接地结合。
附图说明
图1为本申请一实施例提供的手机100的硬件结构的示意图;
图2为本申请一实施例提供的手机100的硬件结构的示意图;
图3为本申请一实施例提供的手机100的图形用户界面的示意图;
图4为本申请一实施例提供的手机100的图形用户界面的示意图;
图5为本申请一实施例提供的手机100的图形用户界面的示意图;
图6为本申请一实施例提供的手机100的图形用户界面的示意图;
图7为本申请一实施例提供的手机100的图形用户界面的示意图;
图8为本申请一实施例提供的手机100的图形用户界面的示意图;
图9为本申请一实施例提供的手机100的软件结构的示意图;
图10为本申请一实施例提供的手机100的控制摄像头升降的流程示意图;
图11为本申请一实施例提供的手机100的控制摄像头升降的流程示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。
以下,对本申请实施例中的部分用语进行解释说明,以便于本领域技术人员理解。
本申请实施例涉及的应用程序(application,简称app),为能够实现某项或多项特定功能的软件程序。通常,电子设备中可以安装多个应用。比如,相机应用,包括:系统相机应用和/或第三方相机应用等。再比如,即时通讯应用,包括:微信、腾讯聊天软件(QQ)、WhatsApp Messenger、连我(Line)、照片分享(instagram)、Kakao Talk、钉钉等。电子设备可以通过相机应用实现图像拍摄功能,可以使用即时通信应用可以实现与其他电子设备之间的语音、视频通话等。下文中提到的应用程序,可以是电子设备出厂时已安装的应用程序,也可以是用户在使用电子设备的过程中从网络下载或其他电子设备获取的应用程序。
本申请实施例涉及的至少一个,包括一个或者多个;其中,多个是指大于或者等于两个。另外,需要理解的是,在本申请的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。
以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括例如“一个或多个”这种表达形式,除非其上下文中明确地有相反指示。还应当理解,在本申请实施例中,“一个或多个”是指一个、两个或两个以上;“和/或”,描述关联对象的关联关系,表示可以存在三种关系;例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。
在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。
以下介绍电子设备、用于这样的电子设备的图形用户界面(graphical user interface,GUI)、和用于使用这样的电子设备的实施例。在本申请一些实施例中,电子设备可以是包含升降式摄像头的便携式终端,诸如手机、平板电脑等。便携式电子设备的示例性实施例包括但不限于搭载
Figure PCTCN2020103114-appb-000001
或者其它操作系统的便携式电子设备。上述便携式电子设备也可以是其它便携式电子设备,例如数码相机等,只要具有升降式摄像头即可。还应当理解的是,在本申请其他一些实施例中,上述电子设备也可以不是便携式 电子设备,而是具有升降式摄像头的台式计算机等。
以下实施例以电子设备是手机为例,图1示出了手机100的结构示意图。
手机100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。其中,控制器可以是手机100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。在一些实施例中,处理器110可以运行本申请实施例提供的摄像头升降控制方法的软件代码/模块,控制摄像头的升降。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为手机100充电,也可以用于手机100与外围设备之间传输数据。
充电管理模块140用于从充电器接收充电输入。电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。
手机100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。天线1和天线2用于发射和接收电磁波信号。手机100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在手机100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
无线通信模块160可以提供应用在手机100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,手机100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得手机100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
手机100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频、应用的显示界面,比如系统相机的取景界面等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,手机100可以包括1个或N个显示屏194,N为大于1的正整数。
摄像头193用于捕获静态图像或视频。摄像头193可以包括前置摄像头和后置摄像头。其中,前置摄像头或后置摄像头的数量可以是至少一个。在一些实施例中,摄像头193可以是升降式摄像头。
图2示出了一种可能的手机结构的示意图。需要说明的是,图2中仅给出了手机100的部分结构,比如仅给出了手机100上包括摄像头的一部分,另一部分未示出。如图2所示,手机100包括壳体201,壳体201内部包括一个或多个部件,比如图1所示的一个或多个部件。
在一些实施例中,壳体201的表面203上可以设置显示屏,比如全面屏。壳体201的上表面202上可以设置一开口204,该开口204可以供升降式摄像头收回或弹起。
在一些实施例中,壳体201内部包括处理器110,和升降件205。升降件205上设置摄像头206。升降件205可以是任何具有升降功能的部件,本申请实施例不作限定。比如升 降件205可以是弹簧装置,即升降件205的高度h可以伸长或缩短。当升降件205升高时,摄像头206通过开口204弹出壳体201,当升降件205压缩时,摄像头206通过开口204收回到壳体201内。在一些实施例中,处理器110可以与升降件205连接,以控制升降件205的升起或收回。
在一些实施例中,以手机100具有两个摄像头为例,一个前置摄像头,一个后置摄像头。一种可能的情况为,手机100包括一个升降件,前置摄像头设置在该升降件上,而后置摄像头设置在与表面203(设置显示屏的表面203)相对的一面,即手机100的背面。这种情况下,升降件可以实现前置摄像头的升降,而后置摄像头是固定设置在背面上的。另一种可能的情况为,手机100包括一个升降件,前置摄像头和后置摄像头均设置在该升降件(比如,设置在升降件的不同表面上)上。这种情况下,升降件升高时,前置摄像头和后置摄像头同时升起,升降件压缩时,前置摄像头和后置摄像头同时收回。其它可能的情况为,手机100包括两个升降件,前置摄像头设置在一个升降件上,后置摄像头设置在另一个升降件上。例如,手机100的壳体201的上表面202上设置两个开口,每个开口对应一个升降件。第一个升降件上设置前置摄像头,第二个升降件上设置后置摄像头。手机100控制第一个升降件升起或收回时,带动前置摄像头升起或收回。当手机100控制第二个升降件升起或收回时,带动后置摄像头升降或收回。第一个升降件和第二个升降件可以同时升降或收回,也可以一个升起,另一个收回。
在其他可能的情况中,手机100上还可以设置三个或三个以上的摄像头,比如,两个后置摄像头,一个前置摄像头。其中,两个后置摄像头可以设置在同一个升降件上,前置摄像头可以设置在另一个升降件上。需要说明的是,本申请实施例提供的摄像头升降方案可以适用于上述各种情况。以下实施例中,以手机100包括一个升降件,该升降件上设置有前置摄像头,后置摄像头设置在手机100的背面(与显示屏相对的一面)上为例。
在一些实施例中,手机100中的处理器110可以与升降件205连接,比如,处理器110可以向升降件205发送指令,该指令用于指示升降件升起或收回。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行手机100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,以及至少一个应用程序(比如相机应用,微信应用等)的软件代码等。存储数据区可存储手机100使用过程中所产生的数据(比如图像、视频等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。在一些实施例中,内部存储器121还可以存储本申请实施例提供的摄像头升降控制方法的软件代码/模块,当处理器110运行所述软件代码/模块时,控制摄像头升降。在另一些实施例中,内部存储器121还可以存储摄像头拍摄得到的图像(比如,静态图像或动图)、视频等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展手机100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,图像、视频等文件保存在外部存储卡中。当然,在一些实施例中,本申请实施例提供的摄像头升降控制方法的软件代码/模块也可以存储在外部存储器中,处理器110可以通过外部存储器接口120运行所述软件代码/模块,控制摄像头的升降。
手机100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接 口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
其中,传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。
陀螺仪传感器180B可以用于确定手机100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定手机100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。
气压传感器180C用于测量气压。在一些实施例中,手机100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。
磁传感器180D包括霍尔传感器。手机100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当手机100是翻盖机时,手机100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。
加速度传感器180E可检测手机100在各个方向上(一般为三轴)加速度的大小。当手机100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。
距离传感器180F,用于测量距离。手机100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,手机100可以利用距离传感器180F测距以实现快速对焦。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。手机100通过发光二极管向外发射红外光。手机100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定手机100附近有物体。当检测到不充分的反射光时,手机100可以确定手机100附近没有物体。手机100可以利用接近光传感器180G检测用户手持手机100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
环境光传感器180L用于感知环境光亮度。手机100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测手机100是否在口袋里,以防误触。
指纹传感器180H用于采集指纹。手机100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
温度传感器180J用于检测温度。在一些实施例中,手机100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,手机100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,手机100对电池142加热,以避免低温导致手机100异常关机。在其他一些实施例中,当温度低于又一阈值时,手机100对电池142的输出电压执行升压,以避免低温导致的异常关机。
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触 摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于手机100的表面,与显示屏194所处的位置不同。
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。手机100可以接收按键输入,产生与手机100的用户设置以及功能控制有关的键信号输入。马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和手机100的接触和分离。
可以理解的是,本申请实施例示意的结构并不构成对手机100的具体限定。在本申请另一些实施例中,手机100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
以下实施例将以图1和图2所示的手机100为例对本申请的技术方案进行详细介绍。以下实施例中,以手机100中的第三方相机应用为例,其中第三方相机应用例如可以是美颜相机、萌拍等应用。
本申请中,手机100可以根据当前的场景判断是否需要升起或下降摄像头,而不是单纯在第三方相机应用启动的情况下,升起摄像头,在第三方相机应用退出的情况下,收回摄像头。在一些实施例中,当前的场景可以包括:手机100将第三方相机应用从前台运行切换到后台运行;或者,手机100将第三方相机应用从后台运行切换到前台运行;或者,手机100在第三方相机应用的显示界面中进行分辨率切换、前后置摄像头的切换;或者,手机100中第三方相机应用的显示界面由图像拍摄模式切换到视频录制模式;或者,手机100在显示第三方相机应用的显示界面时,检测到用于灭屏的操作而熄灭显示屏等场景。
图3中的(a)示出了本申请一实施例提供的GUI的示意图,该GUI可以称为主界面301。主界面301中可以包括多个应用的图标。其中,包括第三方相机应用(比如美图秀秀)的图标302。手机100检测到针对图标302的操作时,显示另一GUI,参见图3中的(b)所示,该GUI可以称为第三方相机应用的显示界面303。该显示界面303中可以包括一个或多个控件。比如,包括“超清人像拍摄”控件304和“图片精修”控件305,以及相机控件306。手机100检测到针对相机控件306的操作时,显示取景界面307,如图3中的(c)所示,取景界面307中包括预览图像,以及一个或多个控件。
在一些实施例中,手机100检测到针对主界面301中的图标302的操作时,可以升起前置摄像头,并启动该前置摄像头。在另一些实施例中,手机100检测到针对第三方相机应用的显示界面303中的相机控件306的操作时,可以升起前置摄像头,并启动该前置摄像头,在取景界面307中显示该前置摄像头采集的图像,即预览图像。
场景1:第三方相机应用在前台运行。
以图3中的(c)为例,手机100升起前置摄像头,即取景界面307中显示的是前置摄像头采集的图像,后置摄像头处于关闭状态。在一些实施例中,手机100在前台运行第三方相机应用的过程中,可以保持前置摄像头一直处于升起状态,直到第三方相机应用切换到后台运行,收回前置摄像头。
示例1:以图3中的(c)为例,手机100检测针对关闭控件308的操作,关闭取景界面,返回图3中的(b)所示的界面303。该过程中,手机100可以继续保持前置摄像头升起状态。因为,用户控制手机100返回第三方相机应用的主页303,可能是想要重新选择其它的拍摄方式,比如选择“美妆拍摄”等。因此,这种情况下,手机100可以不收回前置摄像头,以避免前置摄像头的频繁升降。
示例2:以图3中的(c)为例,手机100检测到针对分辨率切换控件309的操作,手机100将当前的预览图像的分辨率切换到目标分辨率,比如从1:1切换到9:16。该过程中,手机100可以继续保持前置摄像头处于升起状态。
示例3;以图3中的(c)为例,手机100检测针对关闭控件308的操作,关闭取景界面,返回图3中的(b)所示的界面303。手机100检测到针对界面303中“图片精修”控件305的操作时,手机100进入修图模式,对手机100中存储的图像进行修图。该过程中,手机100也可以继续保持前置摄像头处于升起状态。
示例4:手机100关闭第三方相机应用的取景界面(取景界面中包括预览图像),但是仍然在前台运行(比如,显示第三方相机应用的非取景界面的其它界面)时,可以等待预设时长,若手机100在该时长内未再次打开取景界面,则收回前置摄像头。
举例来说,以图3中的(c)为例,手机100检测针对关闭控件308的操作,关闭取景界面,返回图3中的(b)所示的界面303。假设手机100停留在界面303的时长超过预设时长,则收回前置摄像头;或者,手机100检测到针对界面303中的“图片精修”控件305的操作,进入修图模式,修图模式中无需使用前置摄像头,则收回前置摄像头。当手机100再次打开取景界面时,可以再次升起前置摄像头。需要说明的是,本申请实施例中,“打开”取景界面是指在前台显示取景界面。
示例5:
参见图4中的(a)所示,手机100启动第三方相机应用,升起前置摄像头,显示第三方相机应用的取景界面401,该取景界面401中包括前置摄像头采集的图像。当手机100检测到针对取景界面401中的摄像头切换控件402的操作时,启动后置摄像头,参见图4中的(b)所示,取景界面403中显示后置摄像头采集的图像。在一些实施例中,手机100启动后置摄像头后,可以不下降前置摄像头。当手机100确定满足一定条件时,再下降前置摄像头。比如,手机100检测到第三方相机应用从前台切换到后台时,下降前置摄像头。再比如,第三方相机应用在前台运行,但是较长时间未从后置摄像头切换到前置摄像头,则下降前置摄像头。再比如,手机100启动后置摄像头后,可以输出提示信息,该提示信息用于提示用户是否下降前置摄像头,若手机100接收到下降前置摄像头的确认指令后,下降前置摄像头。
举例来说,以图4中的(b)为例,取景界面403显示后置摄像头采集的图像,手机100中前置摄像头处于升起状态。手机100检测到针对关闭控件404的操作,返回第三方相机应用的上一级界面,比如第三方相机应用的主页,例如类似于图3中的(b)所示的主页303,手机100仍然保持前置摄像头升起状态。再例如,继续以图4中的(b)为例,取景界面403 显示后置摄像头采集的图像,手机100中前置摄像头处于升起状态。手机100检测到针对分辨率切换控件405的操作,切换预览图像的分辨率,手机100仍然保持前置摄像头处于升起状态。
示例6:
参见图5中的(a)所示,手机100启动第三方相机应用,升起前置摄像头,显示第三方相机应用的取景界面501,该取景界面501中包括前置摄像头采集的图像。当手机100检测到针对取景界面501中的视频控件502的操作时,由图像拍摄模式切换为视频录制模式,参见图5中的(b)所示。在一些实施例中,手机100由图像拍摄模式改变为视频录制模式后,可以不下降前置摄像头。
应理解,上述各个示例的技术特征可以组合使用。例如,示例5和示例6可以组合使用。示例6中手机100从图像拍摄模式改变为视频录制模式之后,保持前置摄像头升起状态。当手机100确定满足一定条件时,再下降前置摄像头。比如,手机100检测到第三方相机应用从前台切换到后台时,下降前置摄像头。再比如,手机100进入视频录制模式之后,检测到针对取景界面中的摄像头切换控件的操作,启动后置摄像头,视频录制模式下取景界面中显示后置摄像头采集的图像。手机100确定预设时长内,未从后置摄像头切换到前置摄像头,则下降前置摄像头。再比如,手机100进入视频录制模式后,检测到针对取景界面中的摄像头切换控件的操作,启动后置摄像头,可以输出提示信息,该提示信息用于提示用户是否下降前置摄像头,若手机100接收到下降前置摄像头的确认指令后,下降前置摄像头。
再例如,上述示例6和示例2可以组合使用,示例6中手机100进入视频录制模式后,保持前置摄像头处于升起状态。手机100检测到针对视频录制模式下取景界面中的分辨率切换控件的操作,切换预览图像的分辨率。该过程中,手机100可以保持前置摄像头处于升起状态。
在场景1所示的实施例中,手机100在前台运行第三方相机应用的过程中,不会频繁的升降前置摄像头,有助于提升用户体验。
场景2,第三方相机应用从前台切换到后台运行。
在一些实施例中,以图4中的(a)为例,手机100显示第三方相机应用的取景界面401,当手机100检测到第三方相机应用切换到后台运行的操作(比如,检测到返回主界面的操作,或者将取景界面401切换成其他应用的显示界面的操作)时,收回前置摄像头。或者,手机100检测到第三方相机应用切换到后台运行时,等待一定的时长,当手机100确定在该时长内第三方相机应用未切换到前台,手机100收回前置摄像头。在该实施例中,手机100确定第三方相机应用从前台切换到后台运行时,可以关闭后置摄像头。
示例1:
以图3中的(c)为例,手机100启动第三方相机应用,升起前置摄像头,显示取景界面307,取景界面307中包括前置摄像头采集的图像。手机100检测到用于返回主界面的操作后,显示主界面,比如可以是图3中的(a)所示的主界面301,此时第三方相机应用在后台运行,这种情况下,手机100可以收回前置摄像头;或者,手机100显示主界面后,可以等待一定的时长,当手机100确定在该时长内第三方相机应用未再次切到前台运行,手机100收回前置摄像头。
示例2:
参见图6中的(a)所示,手机100启动第三方相机应用,升起前置摄像头,显示取景界面601,取景界面601中显示前置摄像头采集的图像。手机100中的微信应用收到新消息,在状态栏中显示新消息,手机100检测到针对状态栏的操作(比如,点击操作),显示如图6中的(b)所示的微信应用的显示界面,此时第三方相机应用在后台运行,手机100可以收回前置摄像头;或者,手机100显示微信应用的显示界面后,可以等待一定时长,当手机100确定该时长内第三方相机应用未再次切换到前台,手机100收回前置摄像头。
示例3:
参见图7中的(a)所示,手机100启动第三方相机应用,升起前置摄像头,显示取景界面701。取景界面701中包括前置摄像头采集的图像。此时,手机100检测到灭屏的操作,比如针对电源键的操作,熄灭显示屏,如图7中的(b)所示。一种可能的情况为,手机100检测到屏幕熄灭之后,立即收回前置摄像头。另一种可能的情况为,手机100检测到屏幕熄灭之后,可以等待预设时长,在预设时长之后再收回前置摄像头。例如,手机100确定该预设时长内,未重新点亮手机,或者未重新点亮手机并重新进入第三方相机应用的取景界面,则收回前置摄像头。
在场景2所示的实施例中,手机100可以在用户不使用前置摄像头的情况下,收回前置摄像头,以节省资源。比如,手机100将第三方相机应用从前台切换到后台,可以立即收回前置摄像头,也可以等待预设时长,若该预设时长内所述第三方相机应用未切回到前台,则收回前置摄像头。
场景3:第三方相机应用从后台切换到前台。
在一些实施例中,手机100前台运行第三方相机应用时,升起前置摄像头。当手机100将第三方相机应用从前台切换到后台时,收回前置摄像头。当手机100将第三方相机应用从后台切换的前台时,再次升起前置摄像头。
示例1:
参见图8中的(a)所示,手机100启动第三方相机应用,升起前置摄像头,显示取景界面801,取景界面801中包括前置摄像头采集的图像。手机100检测到将第三方相机应用切换到后台运行的操作,比如返回主界面802,手机100收回前置摄像头,参见图8中的(b)所示。手机100检测到将第三方相机应用切换到前台运行的操作(例如,针对主界面802中的第三方相机应用的图标的点击操作),再次升起前置摄像头,显示如图8中的(c)所示的界面。
在场景3所示的实施例中,手机100可以根据当前场景决定前置摄像头的升降。比如,比如,手机100将第三方相机应用从前台切换到后台,可以收回前置摄像头。当手机100将所述第三方相机应用从后台切换到前台,可以再次升起前置摄像头。
图9示出了本申请一实施例提供的手机100的软件架构的示意图。如图9所示,手机100的软件架构自下而上主要包含5层:内核(kernel)层、硬件抽象层(hardware abstraction layer,HAL)、安卓运行时(Android runtime)和系统库、框架(framework,FWK)层以及应用(application)层。
其中,应用层包括多个应用,比如,应用1到应用n,n为大于等于2的整数。比如,系统相机、第三方相机应用,抖音、微信/QQ等。
框架层为应用层的应用程序提供应用编程接口(application programming interface,API)和编程框架。框架层可以包括一些预先定义的函数。例如,框架层可以包括窗口管理器, 内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。电话管理器用于提供手机100的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。
此外,如图9所示,框架层还可以包括:升降系统和升降管理服务模块。其中,升降系统可以是应用层中的第三方相机应用和框架层中的升降管理服务模块之间的桥梁。比如,升降系统可以接收第三方相机应用发送的升起或下降摄像头指令,然后将该指令发送给升降管理服务模块。升降管理服务模块,用于判断是否需要升起或下降摄像头。在一些实施例中,升降管理服务模块可以是升降系统中的一部分,或者独立于升降系统。若升降管理服务模块确定需要升起摄像头,则通过HAL层控制摄像头升起;或者,升降管理服务模块确定需要下降摄像头,则通过HAL层控制摄像头收回。
在一些实施例中,升降管理服务模块可以监听第三方相机应用的活动(activity),比如,监听第三方相机应用的activity是否变化。升降管理服务模块可以根据activity的变化情况决定升起或下降摄像头。具体内容将在后文介绍。
需要说明的是,activity可以是一个应用产生的交互界面。比如,第三方相机应用启动后,可以创建activity,即交互界面,交互界面可以包括取景界面。升降管理服务模块可以监听第三方相机应用的activity的生命周期。其中,activity的生命周期可以是一个应用创建activity开始,直到关闭activity的周期/时长。继续以第三方相机应用为例,升降管理服务模块监听第三方相机应用的activity的生命周期可以包括监听该activity的任何变化(比如,从前台切换后台,或者,从后台切换到前台等),然后根据activity的变化情况确定是否升起或下降摄像头。
在另一些实施例中,每个应用可以对应一个或多个activity。为了方便区分哪一个应用的activity,每个activity可以设置activity名称。升降管理服务模块监听到activity发生变化时,可以判断该activity是哪一个应用的,如果是第三方相机应用的,则根据该activity的变化情况决定升起或下降摄像头。
Android runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架 层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(media libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
HAL层可以包括一些调用接口,该调用接口可以将内核层中复杂的驱动或接口统一化。例如,HAL层可以包括音视频接口、GPS接口、通话接口(radio interface layer,RIL)、WIFI接口等。另外,HAL层还可以作为框架层和内核层的桥梁,比如,HAL层可以接收框架层中升降管理服务模块发送的弹出或收回摄像头的命令,然后HAL层通过内核层控制摄像头弹出或收回。
内核层包括触摸传感器驱动、显示驱动、摄像头驱动等。其中,触摸传感器驱动用于将触摸传感器检测到的触摸操作上报框架层,显示驱动用于驱动显示屏显示内容,摄像头驱动用于打开或关闭摄像头等。
需要说明的是,图1是本申请实施例提供的手机100的硬件架构,图9是本申请实施例提供的手机100的软件架构,图9中的软件架构对应的软件程序和/或模块存储在内部存储器121中,处理器110(比如,NPU或CPU)运行内部存储器121中存储的软件程序和/或模块以执行相应的摄像头的升降过程。
参见图10所示,为手机100通过图8所示的软件架构实现第三方相机应用从后台切换到前台,或者从前台切换到后台时对摄像头的处理过程。如图10所示,该过程可以包括:
1001:第三方相机应用向升降系统发送第一指令,该第一指令用于指示打开前置摄像头。
在1001之前,手机100还可以包括其它过程,比如,触摸传感器驱动将检测到的输入事件(比如检测到在主界面中的点击操作、点击时间、位置坐标等)发送给框架层。框架层中可以存储有当前显示界面(即主界面)中每个触摸区域的坐标,所以框架层可以将输入事件中点击操作的位置坐标和存储的触摸区域的坐标比对,确定输入事件对应的触摸区域,然后确定该触摸区域内的显示内容,假设该触摸区域内是第三方相机应用的图标,则框架层可以确定该输入事件对应第三方相机应用,并上报应用层中的第三方相机应用。第三方相机应用接收到输入事件后,向升降系统发送打开前置摄像头的指令。
1002:升降系统将第一指令发送给升降管理服务模块。
如前述内容可知,升降系统没有直接向HAL层发送打开前置摄像头的指令,而是向升降管理服务模块发送打开前置摄像头的指令,由升降管理服务模块决定是否升降摄像头。
1003:升降管理服务模块根据摄像头状态记录表确定前置摄像头当前处于收回状态。
在一些实施例中,升降管理服务模块可以记录每个摄像头的状态,比如,每个摄像头处于开启或关闭状态,和/或每个摄像头处于升起或收回状态。作为一种示例,参见表1,为本申请一实施例提供的升降管理服务模块记录的每个摄像头的状态记录表的示例。
摄像头 收回/升起 开启/关闭
前置摄像头 收回 关闭
后置摄像头 NA 关闭
表1
举例来说,升降管理服务模块可以基于表1确定前置摄像头目前处于收回状态,那么升降管理服务模块可以向HAL层发送第二指令,该第二指令用于指示升起/弹出前置摄像头。应理解,后置摄像头的“NA”可以用于指示后置摄像头无法升降,是固定设置在手机100的背面的。
1004:升降管理服务模块向HAL层发送弹出命令,该弹出命令用于指示弹出前置摄像头。
在一些实施例中,HAL层可以通过下层比如内核层控制前置摄像头弹出。比如,以图2所示的结构为例,HAL层可以通过内核层控制前置摄像头所在的升降件升起,带动前置摄像头升降。在一实施例中,手机100弹出前置摄像头之后,可以开启前置摄像头,前置摄像头采集图像。
1005:升降管理服务模块更新摄像头的状态记录表。
当HAL层通过内核层控制前置摄像头弹出之后,内核层可以向HAL层中的升降管理服务模块发送反馈指令,该反馈指令用于指示前置摄像头已经弹起,且前置摄像头已经开启。升降管理服务模块接收到反馈指令后,可以更新摄像头状态记录表,比如上表1,更新后的表可以如下表2:
摄像头 收回/升起 开启/关闭
前置摄像头 弹起 开启
后置摄像头 NA 关闭
表2
在一些实施例中,升降管理服务模块可以根据更新后的摄像头状态记录表,进行后续处理。
1006:第三方相机创建activity。
示例性的,第三方相机应用启动后,可以创建activity,可以通过内核层的显示驱动来驱动显示屏显示第三方相机应用的取景界面,比如图3中的(c)所示的取景界面307。该取景界面307中包括前置摄像头采集的图像。
1007:升降管理服务模块监听该activity的生命周期。
在一些实施例中,升降管理服务模块可以监听该activity的生命周期,即该activity的变化情况。
1008:第三方相机应用从前台切换到后台运行。
在一些示例中,以图6中的(a)为例,手机100的显示屏显示第三方相机应用的取景界面601。手机100中的微信收到新消息,在显示屏的状态栏显示微信收到的新消息。触摸传感器驱动检测到针对新消息的输入事件,将该输入事件通过上层上报给第三方相机应用。第三方相机应用后台运行,比如,第三方相机应用可以调用activity中暂停(onPause)功能,使得第三方相机应用后台运行。
1009:升降管理服务模块监听到该activity由焦点activity变化为非焦点activity。
在一些实施例中,焦点activity可以是可见的显示界面对应的activity,例如前台显示的 显示界面对应的activity;非焦点activity可以是不可见的显示界面对应的activity,例如,可以是后台运行的应用的显示界面对应的activity。通常,焦点activity可以接收用户输入操作,比如在触摸屏上的点击、滑动等操作,非焦点activity不可以接收用户输入操作。当一个activity由焦点activity变为非焦点activity时,即该activity对应的显示界面被切换到后台运行;当一个activity由非焦点activity变为焦点activity时,即该activity对应的显示界面前台到前台运行。
例如,电子设备启动第三方相机应用,第三方相机应用可以创建activity,前台显示该activity对应的显示界面即取景界面。也就是说,第三方相机应用创建的activity当前是焦点activity。若电子设备检测到返回主界面或者显示其他应用的显示界面的操作后,第三方应用创建的activity调用onPause,以启动另一个activity,则第三方相机应用创建的activity变为非焦点activity,所述另一个activity变为焦点activity,所述另一个activity例如可以是主界面对应的activity或者其它应用的显示界面对应的activity,即将第三方相机应用的显示界面从前台切换到后台,而前台显示主界面或其它应用的显示界面。再例如,电子设备在后台运行第三方相机应用,即第三方相机应用创建的activity当前是非焦点activity,前台显示主界面或者其他应用的显示界面,即主界面或其他应用的显示界面的activity是焦点activity。电子设备检测到用于将第三方相机应用切换到前台的操作,第三方相机应用创建的activity调用回调(onResume)功能,由非焦点activity变为焦点activity,在前台显示;而主界面或其他应用的显示界面对应的activity变为非焦点activity,在后台运行。
1010:升降管理服务模块从更新的摄像头的状态记录表中确定当前升起的摄像头。
如前文所述,升降管理服务模块升起前置摄像头后更新了摄像头的状态记录表。当升降管理服务模块监听到activity从前台切换到后台时,查询更新后的摄像头状态记录表比如上述表2,确定处于升起状态的是前置摄像头。升降管理服务模块可以向HAL层发送收回前置摄像头的命令。
1011:升降管理服务模块向HAL层发送收回前置摄像头的命令。
在一些实施例中,HAL层可以通过下层比如内核层控制前置摄像头收回。比如,以图2所示的结构为例,HAL层可以通过内核层控制前置摄像头所在的升降件收回,带动前置摄像头收回。在一实施例中,手机100收回前置摄像头之后,可以关闭前置摄像头。
示例性的,升降管理服务模块确定收回前置摄像头之后,可以更新摄像头记录状态表。比如更新上述表3,得到下表3。
摄像头 收回/升起 开启/关闭
前置摄像头 收回 开启
后置摄像头 NA 关闭
表3
1012:第三方相机应用从后台切换到前台运行。
在一些示例中,以图8中的(b)为例,手机100显示主界面802,后台运行第三方相机应用。触摸传感器驱动检测到输入事件(比如,点击主界面802中的第三方相机应用的输入事件),将该输入事件通过上层上报给第三方相机应用。第三方相机应用从后台切换到前台运行,比如,第三方相机应用可以调用activity中回调(onResume)功能,使得第三方相机应用从后台切到前台运行。
1013:升降管理服务模块监听到该activity从非焦点activity变化为焦点activity。
在一些实施例中,第三方相机应用创建的activity后,若该activity调用onResume,则从非焦点activity改变为非焦点activity,所以第三方相机应用从后台切换到前台。
1014:升降管理服务模块根据摄像头的记录状态表,确定当前打开的摄像头是前置摄像头。
在一些实施例中,升降管理服务模块可以根据最新的摄像头状态记录表比如上表3,确定当前处于开启状态的摄像头,即前置摄像头,然后向HAL层发送升起前置摄像头的命令。
1015:升降管理服务模块向HAL层发送升起前置摄像头的命令。
因此,图8所示的实施例中,手机100将第三方相机应用从前台切换到后台时,可以收回前置摄像头,将第三方相机应用从后台切换到前台时,可以升起前置摄像头。
在一些实施例中,第三方相机应用启动前置摄像头后,若第三方相机应用始终在前台运行,该第三方相机应用对应的activity不会发生变化,也就是说,手机100显示第三方相机应用的取景界面时,若手机100检测到针对取景界面中的一个或多个控件的操作时,activity不会发生变化。升降管理服务模块检测到activity未变化时,可以保持前置摄像头处于升起状态。
举例来说,以图3中的(c)为例,手机100启动第三方相机应用,升起前置摄像头,显示取景界面307,取景界面307中包括分辨率切换控件309。触摸传感器驱动检测到输入事件,比如点击分辨率控件309的输入事件。触摸传感器驱动将该输入事件经过上层发送给第三方相机应用。第三方相机应用切换预览图像的分辨率。在该过程中,升降管理服务模块检测到activity未发生变化,所以可以不收回前置摄像头。
在其它实施例中,本申请实施例提供的摄像头升降控制方法,还可以适用于视频录制、视频通话等场景。视频录制场景,比如手机100通过系统相机或第三方相机应用录制视频;视频通话场景,比如手机100使用微信/QQ等即时通讯应用与其他设备进行视频通话场景。
参见图11所示,为手机100通过图9所示的软件架构实现视频通话时对摄像头的处理过程。以下实施例以微信应用为例。如图11所示,该过程可以包括:
1101,微信应用启动后,创建activity;例如,该activity可以对应微信应用中与某个联系人的聊天界面。
1102,升降管理服务模块监听该activity的生命周期。
1103,微信应用调用音频通话接口,启动音频模块。
在一些实施例中,微信应用可以通过HAL层中的音视频接口调用内核层中的音视频驱动,以驱动音频模块播放通话声音,例如,音频模块可以包括一个或多个扬声器。
1104,系统进入音频通话模式。
在一些实施例中,安卓系统可以包括多种声音模式(aduio mode),例如,正常模式(mode_normal),即没有铃声和电话的情况,响铃模式(mode_ringtone)、通话模式(mode_in_communication)等。其中,通话模式可以包括音频通话模式和视频通话模块。在一些实施例中,音视频接口可以包括模式设置(setmode)接口。微信应用可以调用该setmode接口设置声音模式(mode),以实现不同的通话模式。例如,微信应用可以调用setmode接口设置mode的标志位为3,表征系统处于音频通话模式,再例如,微信应用可以调用setmode接口设置mode的标志位为2,表征系统处于视频通话模式。
1105,升降管理服务模块可以监听音频通话模式的变化情况。
在一些实施例中,升降系统或升降管理服务模块可以调用audio manager的扩展接口,注册声音模式(aduio mode)的监听事件,以监听系统的声音模式。比如,升降管理服务模块监听到声音模式的标志位被设置为3,则确定系统当前处于音频通话模式。
1106,微信应用向升降系统发送打开前置摄像头的指令。
1107,升降系统向升降管理服务模块发送打开前置摄像头的指令。
1108,升降管理服务模块向HAL层发送升起/弹出前置摄像头的指令。
1109,微信应用接通视频通话。
在一些实施例中,手机100检测到对方设备接听视频通话时,可以进入视频通话模式。在视频通话模式下,手机100可以将前置摄像头采集的图像实时的、不断地发送给对方设备。
1110,系统进入视频通话模式。
在一些实施例中,微信应用接通视频接通之后可以通过setmode接口设置mode标志位为2,表征当前处于视频通话模式。
1111,升降管理服务模块监听到系统由音频通话模式进入视频通话模式。
在一些实施例中,升降管理服务模块可以监听声音模式(mode),例如可以实时的查看声音模式的标志位,假设监听到该标志位被设置为2时,确定系统当前处于视频通话模式。
1112,升降管理服务模块记录处于视频通话模式的应用是微信应用,记录使用前置摄像头的activity是微信应用的activity。
在一些实施例中,升降管理服务模块可以记录处于视频通话模式的应用,即微信应用,还可以记录当前使用前置摄像头的activity是微信应用的activity,例如记录该activity的名称。
1113,微信应用从前台切换到后台运行。
1114,升降管理服务模块监听到微信应用的activity由焦点activity变为非焦点activity。
在该实施例中,升降服务管理模块监听到微信应用的activity从焦点activity变为非焦点activity,即微信应用从前台切换到后台运行时,可以进一步判断是否要保持前置摄像头处于升起状态。
1115,升降管理服务模块判断当前是否处于视频通话模式,若是,则执行1116,若否,则执行1118。
在一些实施例中,升降管理服务模块可以判断当前的mode的标志位是否为3,若是,确定系统处于视频通话模式;若否,说明系统当前不处于视频通话模式,无需使用摄像头,可以收回摄像头。
1116,升降管理服务模块判断当前处于视频通话模式的应用是否是微信应用,若是,则执行1117,若否,则执行1118。
如前文所述,升降管理服务模块记录处于视频通话模式的应用,所以,升降管理服务模块判断当前处于视频通话模式的仍然是微信应用时,可以继续执行1117,若不是微信应用,可以收回摄像头。
1117,升降管理服务模块判断当前使用前置摄像头的activity是微信应用的activity;若是,则执行1119,若否,则执行1118。
如前文所述,升降管理服务模块还可以记录当前使用前置摄像头的activity,例如 activity的名称。因此,升降管理服务模块可以判断使用前置摄像头的activity是否是微信应用的activity,若是,则升降管理服务模块可以不向HAL层发送收回前置摄像头的指令;若否,则向HAL层发送收回摄像头的指令。
1118,升降管理服务模块向HAL层发送收回摄像头的指令。
1119,升降管理服务模块不向HA层发送收回摄像头的指令。
在图11所示的实施例中,手机100中的微信应用进入视频通话模式后,若微信应用从前台切换到后台,手机100可以继续保持摄像头处于升起状态。在另一些实施例中,手机100中的微信应用进入视频通话模式后,若微信应用从前台切换到后台,但前台显示微信的悬浮窗口,该悬浮窗口中显示视频通话界面时,手机100可以继续保持摄像头处于升起状态。
本申请的各个实施方式可以任意进行组合,以实现不同的技术效果。
上述本申请提供的实施例中,从电子设备(手机100)作为执行主体的角度对本申请实施例提供的方法进行了介绍。为了实现上述本申请实施例提供的方法中的各功能,终端设备可以包括硬件结构和/或软件模块,以硬件结构、软件模块、或硬件结构加软件模块的形式来实现上述各功能。上述各功能中的某个功能以硬件结构、软件模块、还是硬件结构加软件模块的方式来执行,取决于技术方案的特定应用和设计约束条件。
上述实施例中所用,根据上下文,术语“当…时”可以被解释为意思是“如果…”或“在…后”或“响应于确定…”或“响应于检测到…”。类似地,根据上下文,短语“在确定…时”或“如果检测到(所陈述的条件或事件)”可以被解释为意思是“如果确定…”或“响应于确定…”或“在检测到(所陈述的条件或事件)时”或“响应于检测到(所陈述的条件或事件)”。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如DVD)、或者半导体介质(例如固态硬盘)等。
为了解释的目的,前面的描述是通过参考具体实施例来进行描述的。然而,上面的示例性的讨论并非意图是详尽的,也并非意图要将本申请限制到所公开的精确形式。根据以上教导内容,很多修改形式和变型形式都是可能的。选择和描述实施例是为了充分阐明本申请的原理及其实际应用,以由此使得本领域的其他技术人员能够充分利用具有适合于所构想的特定用途的各种修改的本申请以及各种实施例。

Claims (23)

  1. 一种摄像头升降控制方法,应用于电子设备,所述电子设备配置有第一摄像头,所述第一摄像头是升降式摄像头,所述电子设备中包括第三方相机应用,其特征在于,所述方法包括:
    检测到针对所述第三方相机应用的图标的第一操作;
    响应于所述第一操作,启动所述第三方相机应用,升起所述第一摄像头,并启动所述第一摄像头;
    显示取景界面,所述取景界面中包括预览图像,所述预览图像为所述第一摄像头采集的图像;
    检测到用于关闭所述取景界面的第四操作;
    响应于所述第四操作,显示所述第三方相机应用的第一界面;所述第一界面中不包括所述预览图像;
    保持所述第一摄像头处于升起状态;
    检测到将所述第三方相机应用从前台切换到后台运行或者熄灭屏幕的第二操作;
    响应于所述第二操作,收回所述第一摄像头。
  2. 如权利要求1所述的方法,其特征在于,在所述响应于所述第二操作,收回所述第一摄像头之前,所述方法还包括:
    确定在第一预设时长内,所述第三方相机应用未切回到前台运行;
    其中,所述第一预设时长是从检测到所述第二操作的时刻开始的预设时长,或者,是从所述第三方相机应用从前台切换到后台的时刻开始的预设时长,或者,是从熄灭屏幕的时刻开始的预设时长。
  3. 如权利要求1或2所述的方法,其特征在于,在所述检测到将所述第三方相机应用从前台切换到后台运行或者熄灭屏幕的第二操作之前,所述方法还包括:
    检测到针对所述取景界面中的分辨率切换控件的第三操作;
    响应于所述第三操作,切换所述预览图像的分辨率;
    保持所述第一摄像头处于升起状态。
  4. 如权利要求1-3任一所述的方法,其特征在于,在所述检测到将所述第三方相机应用从前台切换到后台运行或者熄灭屏幕的第二操作之前,所述方法还包括:
    检测到针对所述取景界面中的视频控件的第五操作;
    响应于所述第五操作,进入视频录制模式;
    保持所述第一摄像头处于升起状态。
  5. 如权利要求1-4任一所述的方法,其特征在于,所述第一摄像头是前置摄像头,所述电子设备还配置有第二摄像头,所述第二摄像头是后置摄像头,在所述检测到将所述第三方相机应用从前台切换到后台运行或者熄灭屏幕的第二操作之前,所述方法还包括:
    检测到针对所述取景界面中的摄像头切换控件的第六操作;
    响应于所述第六操作,启动所述后置摄像头,所述取景界面中包括所述后置摄像头采集的图像;
    保持所述前置摄像头处于升起状态。
  6. 如权利要求5所述的方法,其特征在于,所述方法还包括:
    所述电子设备确定在第二预设时长内,所述取景界面未重新显示所述前置摄像头采集的图像,收回所述前置摄像头。
  7. 如权利要求1-6任一所述的方法,其特征在于,所述方法还包括:
    检测到将所述第三方相机应用从后台切换到前台运行的第七操作;
    响应于所述第七操作,升起所述第一摄像头。
  8. 一种摄像头升降控制方法,应用于电子设备,所述电子设备配置有第一摄像头,所述第一摄像头是升降式摄像头,所述电子设备中包括第三方相机应用,其特征在于,所述方法包括:
    检测到针对所述第三方相机应用的图标的第一操作;
    响应于所述第一操作,启动所述第三方相机应用,升起所述第一摄像头,并启动所述第一摄像头;
    所述第三方应用创建第一活动;所述第一活动对应所述第三方相机应用的取景界面;
    显示所述取景界面,所述取景界面中包括所述第一摄像头采集的图像;
    监听所述第一活动的变化情况;
    当监听到所述第一活动发生变化时,收回所述第一摄像头。
  9. 如权利要求8所述的方法,其特征在于,所述监听到所述第一活动发生变化,收回所述第一摄像头,包括:
    监听到所述第一活动由焦点活动变为非焦点活动,收回所述第一摄像头。
  10. 如权利要求9所述的方法,其特征在于,在所述收回所述第一摄像头之前,所述方法还包括:
    确定在第一预设时长内,所述第一活动未变回成焦点活动。
  11. 如权利要求9或10所述的方法,其特征在于,监听到所述活动由焦点活动变为非焦点活动,包括:
    监听到所述第一活动调用暂停onPause功能,以启动第二活动,所述第二活动对应所述电子设备的主界面,或对应所述电子设备中除去所述第三方相机应用之外的其它应用的显示界面。
  12. 如权利要求9-11任一所述的方法,其特征在于,所述方法还包括:
    当监听到所述第一活动由非焦点活动变为焦点活动时,升起所述第一摄像头。
  13. 如权利要求12所述的方法,其特征在于,所述监听到所述第一活动由非焦点活动变为焦点活动,包括:
    监听到所述电子设备调用回调onResume功能,以使所述第一活动改变为焦点活动。
  14. 如权利要求8-13任一所述的方法,其特征在于,所述方法还包括:
    若未监听到所述第一活动发生变化,保持所述第一摄像头处于升起状态。
  15. 一种电子设备,其特征在于,所述电子设备包括第一摄像头,至少一个处理器,显示屏和输入设备;其中所述第一摄像头是升降式摄像头:
    所述输入设备,用于检测针对所述第三方相机应用的图标的第一操作;
    所述至少一个处理器,用于响应于所述第一操作,启动所述第三方相机应用,控制所述第一摄像头升起,并启动所述第一摄像头;
    所述第一摄像头,用于采集图像;
    所述显示屏,用于显示取景界面,所述取景界面中包括预览图像,所述预览图像为所 述第一摄像头采集的图像;
    所述输入设备还用于:检测用于关闭所述取景界面的第四操作;
    所述至少一个处理器,还用于响应于所述第四操作,通过所述显示屏显示所述第三方相机应用的第一界面;所述第一界面中不包括所述预览图像;
    所述至少一个处理器,还用于控制所述第一摄像头处于升起状态;
    所述输入设备,还用于检测将所述第三方相机应用从前台切换到后台运行或者熄灭屏幕的第二操作;
    所述至少一个处理器,还用于响应于所述第二操作,控制所述第一摄像头收回。
  16. 如权利要求15所述的电子设备,其特征在于,所述至少一个处理器在用于响应于所述第二操作,控制所述第一摄像头收回之前,还用于:确定在第一预设时长内,所述第三方相机应用未切回到前台运行;
    其中,所述第一预设时长是从检测到所述第二操作的时刻开始的预设时长,或者,是从所述第三方相机应用从前台切换到后台的时刻开始的预设时长,或者,是从熄灭屏幕的时刻开始的预设时长。
  17. 如权利要求15或16所述的电子设备,其特征在于,所述输入设备在用于检测将所述第三方相机应用从前台切换到后台运行或者熄灭屏幕的第二操作之前,还用于:检测针对所述取景界面中的分辨率切换控件的第三操作;
    所述至少一个处理器,还用于响应于所述第三操作,切换所述预览图像的分辨率,并控制所述第一摄像头处于升起状态。
  18. 如权利要求15-17任一所述的电子设备,其特征在于,在所述检测到将所述第三方相机应用从前台切换到后台运行或者熄灭屏幕的第二操作之前,所述方法还包括:
    检测到针对所述取景界面中的视频控件的第五操作;
    响应于所述第五操作,进入视频录制模式;
    保持所述第一摄像头处于升起状态。
  19. 如权利要求15-18任一所述的电子设备,其特征在于,所述第一摄像头是前置摄像头,所述电子设备还配置有第二摄像头,所述第二摄像头是后置摄像头,所述输入设备在用于检测将所述第三方相机应用从前台切换到后台运行或者熄灭屏幕的第二操作之前,还用于:检测到针对所述取景界面中的摄像头切换控件的第六操作;
    所述至少一个处理器,还用于响应于所述第六操作,启动所述后置摄像头,所述取景界面中包括所述后置摄像头采集的图像,并控制所述前置摄像头处于升起状态。
  20. 如权利要求19所述的电子设备,其特征在于,所述至少一个处理器还用于:确定在第二预设时长内,所述取景界面未重新显示所述前置摄像头采集的图像,控制所述前置摄像头收回。
  21. 如权利要求15-20任一所述的电子设备,其特征在于,所述输入设备还用于:检测到将所述第三方相机应用从后台切换到前台运行的第七操作;
    所述至少一个处理器,还用于响应于所述第七操作,控制所述第一摄像头升起。
  22. 一种电子设备,其特征在于,包括第一摄像头,所述第一摄像头是升降摄像头、显示屏、至少一个处理器和存储器;
    所述存储器用于存储一个或多个计算机程序;
    当所述存储器存储的一个或多个计算机程序被所述至少一个处理器执行时,使得所述 电子设备能够实现如权利要求8至14任一所述的方法。
  23. 一种计算机存储介质,其特征在于,所述计算机可读存储介质包括计算机程序,当计算机程序在电子设备上运行时,使得所述电子设备执行如权利要求1至14任一所述的方法。
PCT/CN2020/103114 2019-07-22 2020-07-20 一种摄像头升降控制方法与电子设备 WO2021013134A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910663345.8A CN110519506A (zh) 2019-07-22 2019-07-22 一种摄像头升降控制方法与电子设备
CN201910663345.8 2019-07-22

Publications (1)

Publication Number Publication Date
WO2021013134A1 true WO2021013134A1 (zh) 2021-01-28

Family

ID=68623075

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/103114 WO2021013134A1 (zh) 2019-07-22 2020-07-20 一种摄像头升降控制方法与电子设备

Country Status (2)

Country Link
CN (1) CN110519506A (zh)
WO (1) WO2021013134A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114374762A (zh) * 2021-12-09 2022-04-19 青岛海信移动通信技术股份有限公司 终端设备及拍摄控制方法
CN115484390A (zh) * 2021-06-16 2022-12-16 荣耀终端有限公司 一种拍摄视频的方法及电子设备
CN116048436A (zh) * 2022-06-17 2023-05-02 荣耀终端有限公司 应用界面显示方法、电子设备及存储介质

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110519506A (zh) * 2019-07-22 2019-11-29 华为技术有限公司 一种摄像头升降控制方法与电子设备
CN111246013B (zh) * 2020-01-09 2021-09-07 Oppo广东移动通信有限公司 移动终端消息的提醒方法、装置、移动终端和存储介质
CN111246059B (zh) * 2020-01-09 2021-09-21 Oppo(重庆)智能科技有限公司 升降摄像模组的控制方法、装置、电子设备及存储介质
CN111212206A (zh) * 2020-01-16 2020-05-29 维沃移动通信有限公司 一种电子设备
CN111586291A (zh) * 2020-04-22 2020-08-25 深圳市瀚邦为电子材料有限公司 升降摄像头系统、摄像设备和摄像头升降方法以及装置
CN113556460B (zh) * 2020-04-26 2023-05-02 华为技术有限公司 摄像头控制方法、系统及电子设备
CN113573124B (zh) * 2020-04-29 2023-05-09 海信视像科技股份有限公司 显示设备及摄像头检测方法
CN112954425A (zh) * 2020-08-21 2021-06-11 海信视像科技股份有限公司 显示设备及摄像头控制方法
CN112685099A (zh) * 2020-12-31 2021-04-20 联想(北京)有限公司 一种处理方法及装置
CN112954215B (zh) * 2021-02-10 2024-06-28 维沃移动通信有限公司 控制方法和装置、电子设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170302847A1 (en) * 2016-04-14 2017-10-19 Samsung Electronics Co., Ltd. Image capturing method and electronic device supporting the same
CN108924290A (zh) * 2018-06-12 2018-11-30 Oppo广东移动通信有限公司 摄像头控制方法、装置、移动终端及计算机可读介质
CN109167894A (zh) * 2018-06-15 2019-01-08 Oppo广东移动通信有限公司 摄像头控制方法、装置、移动终端及存储介质
CN110519506A (zh) * 2019-07-22 2019-11-29 华为技术有限公司 一种摄像头升降控制方法与电子设备

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106454067A (zh) * 2016-08-25 2017-02-22 乐视控股(北京)有限公司 图像采集装置的控制方法及装置
CN109040351B (zh) * 2018-06-12 2020-07-24 Oppo广东移动通信有限公司 摄像头控制方法、装置、移动终端及存储介质
CN109067964B (zh) * 2018-06-12 2020-06-23 Oppo广东移动通信有限公司 摄像头控制方法、装置、移动终端及存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170302847A1 (en) * 2016-04-14 2017-10-19 Samsung Electronics Co., Ltd. Image capturing method and electronic device supporting the same
CN108924290A (zh) * 2018-06-12 2018-11-30 Oppo广东移动通信有限公司 摄像头控制方法、装置、移动终端及计算机可读介质
CN109167894A (zh) * 2018-06-15 2019-01-08 Oppo广东移动通信有限公司 摄像头控制方法、装置、移动终端及存储介质
CN110519506A (zh) * 2019-07-22 2019-11-29 华为技术有限公司 一种摄像头升降控制方法与电子设备

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115484390A (zh) * 2021-06-16 2022-12-16 荣耀终端有限公司 一种拍摄视频的方法及电子设备
CN115484390B (zh) * 2021-06-16 2023-12-19 荣耀终端有限公司 一种拍摄视频的方法及电子设备
CN114374762A (zh) * 2021-12-09 2022-04-19 青岛海信移动通信技术股份有限公司 终端设备及拍摄控制方法
CN116048436A (zh) * 2022-06-17 2023-05-02 荣耀终端有限公司 应用界面显示方法、电子设备及存储介质
CN116048436B (zh) * 2022-06-17 2024-03-08 荣耀终端有限公司 应用界面显示方法、电子设备及存储介质

Also Published As

Publication number Publication date
CN110519506A (zh) 2019-11-29

Similar Documents

Publication Publication Date Title
WO2021013134A1 (zh) 一种摄像头升降控制方法与电子设备
WO2021037084A1 (zh) 一种分屏显示方法与电子设备
EP3872807B1 (en) Voice control method and electronic device
JP7326476B2 (ja) スクリーンショット方法及び電子装置
WO2021036628A1 (zh) 一种具有折叠屏的设备的触控方法与折叠屏设备
WO2020259461A1 (zh) 一种显示方法与电子设备
WO2021023030A1 (zh) 一种消息显示方法与电子设备
EP3674866A1 (en) Method for processing notification, and electronic device
KR20220058953A (ko) 화면 분할 디스플레이 방법 및 전자 디바이스
WO2021063090A1 (zh) 一种建立应用组合的方法与电子设备
WO2022068483A1 (zh) 应用启动方法、装置和电子设备
WO2022089208A1 (zh) 一种文件拖拽方法及电子设备
CN113805797B (zh) 网络资源的处理方法、电子设备及计算机可读存储介质
WO2020024108A1 (zh) 一种应用图标的显示方法及终端
WO2021057472A1 (zh) 一种显示控制方法与电子设备
WO2021052223A1 (zh) 快速进入应用的方法与折叠屏电子设备
EP4152782A1 (en) Message pushing method and apparatus
WO2023088459A1 (zh) 设备协同方法及相关装置
CN114115618B (zh) 一种应用窗口显示方法与电子设备
WO2023029983A1 (zh) 一种控件内容的拖拽方法、电子设备及系统
WO2022089122A1 (zh) 一种应用窗口的投屏方法与电子设备
EP4180918A1 (en) Method for moving control and electronic device
WO2024001972A1 (zh) 交互方法及相关设备
WO2024012398A1 (zh) 消息共享方法及相关设备
WO2024109481A1 (zh) 窗口控制方法及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20844613

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20844613

Country of ref document: EP

Kind code of ref document: A1