WO2020237545A1 - Camera starting method and related apparatus - Google Patents
Camera starting method and related apparatus Download PDFInfo
- Publication number
- WO2020237545A1 WO2020237545A1 PCT/CN2019/089121 CN2019089121W WO2020237545A1 WO 2020237545 A1 WO2020237545 A1 WO 2020237545A1 CN 2019089121 W CN2019089121 W CN 2019089121W WO 2020237545 A1 WO2020237545 A1 WO 2020237545A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- camera
- application
- thread
- target
- camera application
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/725—Cordless telephones
Definitions
- This application relates to the field of electronic technology, and in particular to a camera activation method and related devices.
- the embodiments of the present application provide a camera startup method and related devices, which can concurrently execute opening a camera application and a target camera associated with the camera application, thereby improving the startup speed of the camera application.
- an embodiment of the present application provides a camera startup method applied to an electronic device, and the method includes:
- the first thread is started and the camera application is started through the first thread to display the camera preview interface, and the second thread is started and passed through the second thread.
- the thread notifies the system service to perform a preset operation to start the target camera associated with the camera application;
- the preset operation includes the following operations: determining whether the selected application is a camera application according to the received intent; when detecting that the selected application is the camera application, opening the camera application association The target camera.
- an embodiment of the present application provides a camera activation device, which is applied to an electronic device, the camera activation device includes a processing unit and a communication unit, wherein:
- the processing unit is configured to start a first thread and start the camera application through the first thread to display the camera preview interface when the selection operation for the application icon of the camera application on the desktop is detected, and start the second Thread and notify the system service to execute a preset operation through the second thread to start the target camera associated with the camera application;
- the preset operation includes the following operations: determining whether the selected application is a camera application according to the intent received through the communication unit; when it is detected that the selected application is the camera application, opening The target camera associated with the camera application.
- embodiments of the present application provide an electronic device, including a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be processed by the above
- the above-mentioned program includes instructions for executing the steps in any method of the first aspect of the embodiments of the present application.
- an embodiment of the present application provides a computer-readable storage medium, wherein the foregoing computer-readable storage medium stores a computer program for electronic data exchange, wherein the foregoing computer program enables a computer to execute In one aspect, some or all of the steps described in any method.
- embodiments of the present application provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute For example, some or all of the steps described in any method of the first aspect.
- the computer program product may be a software installation package.
- the electronic device when the electronic device detects the selection operation for the application icon of the camera application on the desktop, it starts the first thread and starts the camera application through the first thread to display the camera preview Interface, start the second thread at the same time and notify the system service through the second thread to perform a preset operation to start the target camera associated with the camera application. Since the electronic device starts the first thread to start the camera application, it can also Concurrent execution starts the second thread to open the camera associated with the camera application, instead of waiting for the camera application to start, the camera application executes to open the camera, so that the camera application can use the camera faster and the application interface is presented as a camera preview The interface helps improve the startup speed of camera applications.
- FIG. 1 is a schematic flowchart of a camera startup method provided by an embodiment of the present application
- FIG. 2 is a schematic flowchart of another camera startup method provided by an embodiment of the present application.
- FIG. 3 is a schematic flowchart of another camera starting method provided by an embodiment of the present application.
- FIG. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
- Fig. 5 is a block diagram of functional units of a camera starting device provided by an embodiment of the present application.
- the electronic device involved in the embodiments of the application may be an electronic device with camera activation capability.
- the electronic device may include various handheld devices with wireless communication functions, vehicle-mounted devices, wearable devices, computing devices, or devices connected to a wireless modem.
- Other processing equipment, and various forms of user equipment User Equipment, UE), mobile station (Mobile Station, MS), terminal equipment (terminal device), etc.
- FIG. 1 is a schematic flowchart of a method for starting a camera provided in an embodiment of the present application, which is applied to an electronic device.
- the camera startup method includes:
- the electronic device obtains a selection operation for an application icon of a camera application on a desktop.
- the process of enabling the camera is that when the user clicks on the application icon of a certain camera application, the desktop determines whether it is a camera application, and if so, sends the intent intent to the system service, and the system service completes the intent.
- the camera application process is created.
- the camera application will read the identification of the camera that currently needs to be opened, and then execute the opening of the camera, so that the camera is opened and the camera application interface is presented as a camera preview interface.
- This series of operations are all serial. Therefore, from a visual point of view, the user cannot see the camera preview interface immediately after opening the camera application, because the camera may not be opened yet.
- the first thread and the second thread are started at the same time. Two threads can complete the work of the above one thread, thereby saving part of time and improving the startup efficiency of the camera application.
- S102 The electronic device starts a first thread and starts the camera application through the first thread to display a camera preview interface.
- camera applications are camera applications.
- Camera applications include system camera applications and third-party camera applications.
- system camera applications can present a camera preview interface after opening the application.
- the camera preview interface may be displayed directly after opening the application, such as the light camera, B612 camera, and other applications, and some may display the camera preview interface after opening the application after corresponding operations, such as beauty Camera, Meitu Xiuxiu and other applications.
- the camera application in this application mainly refers to an application that can directly present a camera preview interface after opening the camera application.
- S103 The electronic device simultaneously starts a second thread and notifies the system service to perform a preset operation through the second thread to start the target camera associated with the camera application.
- the preset operation includes the following operations: determining whether the selected application is a camera application according to the received intent; when detecting that the selected application is the camera application, opening the camera application association The target camera.
- the intent is mainly to solve the communication between the various components of the Android application, and is responsible for describing the action of an operation in the application, the action related data, and additional data.
- the system service can find the corresponding component according to the description of the intent, and Pass the intent to the called component and complete the invocation of the component. Therefore, the intent acts as a media intermediary, specifically providing information about the mutual invocation of components.
- the intent is used to tell the system to open a certain camera. This action corresponds to the rear camera 1.
- the system can determine whether to open the rear camera 1 based on this intent.
- the system service After detecting the selection operation of the application icon for the desktop, the system service will receive an intent related to the application icon.
- the system service can determine whether the selected application is a camera application based on the received intent. If it is, You need to start two threads to open the camera application and the camera respectively. If not, you only need to start one thread to open the application.
- starting the camera application is also executed by the system service, and then the camera application opens the camera, and in this application embodiment, after starting the first thread to start the camera application, it can also be started
- the second thread can notify the system service to perform preset operations to open the target camera, that is, the system service uses two threads to realize opening the camera application and opening the target camera associated with the camera application, instead of waiting for the camera application
- the camera application executes to turn on the camera.
- the electronic device when the electronic device detects the selection operation for the application icon of the camera application on the desktop, it starts the first thread and starts the camera application through the first thread to display the camera preview Interface, start the second thread at the same time and notify the system service through the second thread to perform a preset operation to start the target camera associated with the camera application. Since the electronic device starts the first thread to start the camera application, it can also Concurrent execution starts the second thread to open the camera associated with the camera application, instead of waiting for the camera application to start, the camera application executes to open the camera, so that the camera application can use the camera faster and the application interface is presented as a camera preview The interface helps improve the startup speed of camera applications.
- the system service determines whether the selected application is a camera application according to the received intent, including: the system service reads the application package name of the camera application after parsing the intent; The system service determines whether the camera application is a camera application according to the application package name.
- Intent needs to indicate where this communication request comes from, where to go, how to go, and the initiator carries the data content of this communication request, the receiver unpacks the received intent packet, and if the initiator requests to judge the reception As a result of the processing by the party, the intent is responsible for allowing the receiver to return the response data content.
- the system service After receiving the intent sent by the desktop, the system service analyzes the intent and reads the analysis result, and can determine whether the camera application is a camera application according to the application package name of the camera application selected by the user. In fact, before the two threads are executed at the same time, it is known that the camera application is targeted, but in the second thread, it will be judged again whether the target object is a camera application.
- the second thread by parsing the intent and reading the application package name of the camera application, it can be determined again whether the current target application is a camera application, and at the same time, the camera application can also be obtained Related information, determine the target task is to open the camera of the camera application.
- opening the target camera associated with the camera application includes: the system service determines whether the camera application is Have the authority to open the camera of the electronic device; if so, the system opens the target camera with this service.
- some applications may have the permission to use the camera of the electronic device, and some applications do not have the permission to use the camera, and the electronic device has at least one front camera and at least one rear camera.
- the user can set it so that Some applications (such as camera applications dedicated to facial beautification) only have the permission to use the front camera.
- Some applications such as camera applications dedicated to facial beautification
- the front camera can be used directly when opening such applications.
- some applications can You only have permission to use the rear camera.
- the advantage of this is that you can directly use the rear camera when opening such applications.
- the system service will detect whether the camera application has permission to open the target camera, and if so, will it agree to open the target camera in advance.
- the system service does not have the permission to open the camera before the application is fully started.
- the system service needs to determine whether there is permission to open the camera before opening the camera. If so, perform the opening camera application association If it is not the target camera, the second thread is ended, and the camera application is executed to open the camera.
- opening the target camera associated with the camera application includes: the system service reads the target camera And determine the target camera according to the identity; the system service calls the camera open program and opens the target camera.
- each camera application is associated with a target camera. Since the electronic device has multiple cameras, when using the camera application, the user can determine which camera is currently being used through settings. After exiting the application, when the camera application is opened again, Directly use the camera used before closing the application last time, that is, the target camera. For example, the electronic device has four cameras, and each camera corresponds to an identity. When the camera application was exited last time, the second camera was used. Therefore, the second camera is the target camera associated with the camera application, and the system service reads the target After the identification of the camera, you can know that the second camera is to be opened. The system service opens the target camera by calling the camera open program. Among them, if the program requests camera open during operation but does not actually obtain the permission to operate the camera, it will cause the camera open to fail to open all the time. Therefore, the target camera has the permission to open camera.
- the method further includes: notifying the system service to send a notification message to the camera application through the second thread, and ending In the second thread, the notification message is used to notify the camera application that the target camera has been opened.
- the second thread after the target camera is opened, the second thread will notify the system service to send a notification message to the camera application function, and terminate the second thread. At this time, the first thread is still running. After the camera application is opened in the first thread, the camera application will receive this notification message to know that the camera has been opened.
- a notification message is sent to the camera application being started by the first thread through the second thread to inform the camera application that the target camera is already open at this time, so that in the first thread, the camera application does not need to be opened after it is started.
- the target camera but directly uses the target camera that has been opened, which is conducive to the camera application interface can quickly present the camera preview interface.
- the method further includes: informing the camera application to turn on the target camera when it is detected that the camera application has not received the notification message through the first thread.
- the camera application function does not know whether the camera is turned on at this time, it may have been turned on but the notification message has not been received, or it may not have been turned on and therefore cannot be received Notification message, at this time, the camera application needs to take the initiative to open the target camera.
- the camera application when it receives a notification message from the second thread, it does not need to turn on the camera. If it receives a notification message from the second thread, the target camera can be used directly, eliminating the need for the camera application This process of opening the camera.
- the method before starting the first thread and starting the camera application through the first thread to display the camera preview interface, the method further includes: determining whether the application icon corresponding to the selection operation is all The application icon of the camera application; if so, it is determined whether the selection operation corresponds to opening the camera application and displaying the camera preview interface of the camera application.
- the application to be started is the camera application. Therefore, in the process of starting the camera application, two threads are started. One thread is used to start the camera application, and the other thread is used to open the camera. Therefore, after starting the camera application, the application interface can be directly presented as the camera preview interface, because the camera is already turned on at this time.
- an embodiment of the present application provides a camera startup method that opens the camera device in advance, speeds up the startup time of the camera application, recognizes the camera click operation in advance, reads the camera to be opened, and starts the thread to complete the operation of opening the camera.
- the desktop sends the application intent that needs to be started to the Activity Manager Service (AMS), where AMS has functions such as managing Activity behavior, controlling the activity life cycle, dispatching message events, and memory management.
- AMS Activity Manager Service
- the AMS process is actually the System Server process of the system service. It is just a service started by the system service. It runs in a thread of the system service.
- the user clicks the application icon in the Launcher program it will notify AMS to enable the main activity of the application.
- AMS parses the intent, reads the package name of the application to be opened, and identifies whether it is a camera application. If it is, AMS reads whether the camera application that needs to be opened has the permission to open the camera of the electronic device, if it is, AMS reads the camera that needs to be opened For example, the electronic device has a front camera and three rear cameras, so there are four camera IDs. AMS determines which camera of the electronic device needs to be opened based on the ID of the camera to be opened. After reading the camera’s identity, AMS starts the thread to perform the Camera open operation to open the camera, and after creating the Camera object, the Camera object is sent to another thread. At this time, in another thread, the opening has been executed.
- the camera application the camera application will receive the Camera object that opened the camera, the camera application will first determine whether the passed Camera object is empty, if it is not, it means that the camera has been opened, and there is no need to execute the Camera open method, if it is, it means that If the camera is not opened successfully, the camera application needs to execute the opening of the camera.
- the application currently to be launched by the electronic device is a camera application
- the selection operation for the application is to open the camera application and display the camera preview interface
- the camera operation and the camera application start are just opened. Parallel execution to improve the camera startup time, users do not need a long waiting time when opening the camera application, and can use the camera faster.
- the selection operation is a touch operation on the touch display screen of the electronic device; the determining whether the application icon corresponding to the selection operation is the application icon of the camera application includes : Determine that the application icon of the camera application is in the target display area of the application desktop; when the selection operation is acquired, determine the touch area corresponding to the selection operation; when the touch area and the target are detected When the display area matches, it is determined that the application icon selected by the selection operation is the application icon of the camera application.
- the electronic device when the selection operation for the application icon of the camera application on the desktop is detected, the electronic device first obtains the selection operation, and then determines the application icon of the camera application selected during the selection operation. Since the electronic device now has multiple camera applications, the target display area of these multiple camera applications on the application desktop can be determined first. Therefore, when the selection operation is obtained, the touch area corresponding to the selection operation can be immediately determined. It is determined whether the application icon selected by the selection operation is an application icon of a camera application, and there is no need for the desktop to determine the selected application through a series of processes such as obtaining the application identifier and analyzing the application identity.
- the method further includes: when the camera application is in a video shooting scene or a video call scene, after exiting the application interface of the camera application, controlling the target camera to remain in an open state.
- the camera after opening the camera application, the camera will be opened to present the camera preview interface. Since the camera is called by the camera application and controlled to open and close, the camera is closed after exiting the application interface, for example, during video During a call, if you quit the application interface of the currently open camera, the caller cannot see the face or sees the picture freezes, because the camera is actually turned off at this time. In this application, the camera is turned on and off by the system service. Therefore, even after exiting the application interface, the camera can be kept open, that is, the application can close the camera and the system service can also close the camera.
- the application scene of the camera application is recognized.
- the camera application function is in the video shooting scene or the video call scene, it can be set so that after exiting the camera preview interface, or after the shooting interface, the camera can still be kept in In the open state, continue to record or shoot video.
- the camera can be closed after exiting the application interface of the camera application.
- the system service can control the opening and closing of the camera. In this type of scenario, after the front desk exits the application interface, you can continue to shoot and record the video without turning off the camera, thereby improving user experience.
- FIG. 2 is a schematic flowchart of a camera startup method provided by an embodiment of the present application, which is applied to an electronic device. As shown in the figure, the camera startup method includes:
- S201 The electronic device obtains a selection operation for an application icon of a camera application on the desktop.
- S202 The electronic device starts a first thread and starts the camera application through the first thread to display a camera preview interface.
- S203 The electronic device starts a second thread and notifies the system service through the second thread to determine whether the selected application is a camera application according to the received intent.
- the electronic device notifies the system service to send a notification message to the camera application through the second thread, and ends the second thread, where the notification message is used to notify the camera application that the target camera has been turn on.
- the electronic device when the electronic device detects the selection operation for the application icon of the camera application on the desktop, it starts the first thread and starts the camera application through the first thread to display the camera preview Interface, start the second thread at the same time and notify the system service through the second thread to perform a preset operation to start the target camera associated with the camera application. Since the electronic device starts the first thread to start the camera application, it can also Concurrent execution starts the second thread to open the camera associated with the camera application, instead of waiting for the camera application to start, the camera application executes to open the camera, so that the camera application can use the camera faster and the application interface is presented as a camera preview The interface helps improve the startup speed of camera applications.
- the second thread sends a notification message to the camera application being started by the first thread to inform the camera application that the target camera has been opened at this time, so that in the first thread, the camera application does not need to open the target camera after the camera application is started. It is to directly use the opened target camera, which is conducive to the camera application interface can quickly present the camera preview interface.
- FIG. 3 is a schematic flowchart of a camera startup method provided by an embodiment of the present application, which is applied to an electronic device. As shown in the figure, the camera startup method includes:
- S301 The electronic device obtains a selection operation for an application icon of the camera application on the desktop.
- S302 The electronic device starts a first thread and starts the camera application through the first thread to display a camera preview interface.
- S303 The electronic device starts a second thread and notifies the system service through the second thread to determine whether the selected application is a camera application according to the received intent.
- the electronic device notifies the system service to send a notification message to the camera application through the second thread, and ends the second thread, where the notification message is used to notify the camera application that the target camera has been turn on.
- the electronic device when the electronic device detects the selection operation for the application icon of the camera application on the desktop, it starts the first thread and starts the camera application through the first thread to display the camera preview Interface, start the second thread at the same time and notify the system service through the second thread to perform a preset operation to start the target camera associated with the camera application. Since the electronic device starts the first thread to start the camera application, it can also Concurrent execution starts the second thread to open the camera associated with the camera application, instead of waiting for the camera application to start, the camera application executes to open the camera, so that the camera application can use the camera faster and the application interface is presented as a camera preview The interface helps improve the startup speed of camera applications.
- the second thread sends a notification message to the camera application being started by the first thread to inform the camera application that the target camera has been opened at this time, so that in the first thread, the camera application does not need to open the target camera after the camera application is started. It is to directly use the opened target camera, which is conducive to the camera application interface can quickly present the camera preview interface.
- the camera can be closed.
- special application scenarios such as video shooting scenes and video call scenes
- the system service can control the opening and closing of the camera, in such scenes
- FIG. 4 is a schematic structural diagram of an electronic device 400 provided by an embodiment of the present application.
- the electronic device 400 has one or Multiple application programs and operating systems.
- the electronic device 400 includes a processor 410, a memory 420, a communication interface 430, and one or more programs 421, wherein the one or more programs 421 are stored in the In the memory 420 and configured to be executed by the processor 410, the one or more programs 421 include instructions for executing the following steps;
- the first thread is started and the camera application is started through the first thread to display the camera preview interface, and the second thread is started and passed through the second thread.
- the thread notifies the system service to perform a preset operation to start the target camera associated with the camera application;
- the preset operation includes the following operations: determining whether the selected application is a camera application according to the received intent; when detecting that the selected application is the camera application, opening the camera application association The target camera.
- the electronic device when the electronic device detects the selection operation for the application icon of the camera application on the desktop, it starts the first thread and starts the camera application through the first thread to display the camera preview Interface, start the second thread at the same time and notify the system service through the second thread to perform a preset operation to start the target camera associated with the camera application. Since the electronic device starts the first thread to start the camera application, it can also Concurrent execution starts the second thread to open the camera associated with the camera application, instead of waiting for the camera application to start, the camera application executes to open the camera, so that the camera application can use the camera faster and the application interface is presented as a camera preview The interface helps improve the startup speed of camera applications.
- the instructions in the program are specifically used to perform the following operations: the system service parses the intent Then read the application package name of the camera application; the system service determines whether the camera application is a camera application according to the application package name.
- the system service when the system service detects that the selected application is the camera application, in terms of opening the target camera associated with the camera application, the instructions in the program are specifically used to execute The following operations: the system service determines whether the camera application has the permission to open the camera of the electronic device; if so, the system opens the target camera by the service.
- the instructions in the program are specifically used to execute The following operations: the system service reads the identity of the target camera, and determines the target camera according to the identity; the system service calls the camera open program and opens the target camera.
- the instructions in the program are specifically used to perform the following operations: notify the system service to the camera through the second thread
- the application sends a notification message and ends the second thread, where the notification message is used to notify the camera application that the target camera has been opened.
- the instructions in the program are specifically used to perform the following operations: when the first thread detects that the camera application has not received the notification message, notify the camera application to open the Target camera.
- the instructions in the program are specifically used to perform the following operations: determining the selection operation Whether the corresponding application icon is the application icon of the camera application; if so, it is determined whether the selection operation corresponds to opening the camera application and displaying the camera preview interface of the camera application.
- the selection operation is a touch operation on the touch display screen of the electronic device; in the aspect of determining whether the application icon corresponding to the selection operation is the application icon of the camera application ,
- the instructions in the program are specifically used to perform the following operations: determine that the application icon of the camera application is in the target display area of the application desktop; when the selection operation is obtained, determine the touch area corresponding to the selection operation When detecting that the touch area and the target display area match, determine that the application icon selected by the selection operation is the application icon of the camera application.
- the instructions in the program are specifically used to perform the following operations: when the camera application is in a video shooting scene or a video call scene, after exiting the application interface of the camera application, control the The target camera remains open.
- the electronic device includes hardware structures and/or software modules corresponding to each function.
- the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
- the embodiment of the present application may divide the electronic device into functional units according to the method example.
- each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit.
- the integrated unit can be implemented in the form of hardware or software functional unit. It should be noted that the division of units in the embodiments of the present application is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
- FIG. 5 is a block diagram of the functional unit composition of the camera activation device 500 involved in an embodiment of the present application.
- the camera starting device 500 is applied to electronic equipment, and includes a processing unit 501 and a communication unit 502, wherein,
- the processing unit 501 is configured to start a first thread and start the camera application through the first thread to display the camera preview interface when the selection operation for the application icon of the camera application on the desktop is detected, and at the same time start the first thread Two threads and notify the system service through the second thread to perform a preset operation to start the target camera associated with the camera application;
- the preset operation includes the following operations: determining whether the selected application is a camera application according to the intent received through the communication unit 502; when it is detected that the selected application is the camera application, Open the target camera associated with the camera application.
- the camera starting device 500 may further include a storage unit 503, which is used to store program codes and data of the electronic device.
- the processing unit 501 may be a processor
- the communication unit 502 may be a touch screen or a transceiver
- the storage unit 503 may be a memory.
- the electronic device when the electronic device detects the selection operation for the application icon of the camera application on the desktop, it starts the first thread and starts the camera application through the first thread to display the camera preview Interface, start the second thread at the same time and notify the system service through the second thread to perform a preset operation to start the target camera associated with the camera application. Since the electronic device starts the first thread to start the camera application, it can also Concurrent execution starts the second thread to open the camera associated with the camera application, instead of waiting for the camera application to start, the camera application executes to open the camera, so that the camera application can use the camera faster and the application interface is presented as a camera preview The interface helps improve the startup speed of camera applications.
- the processing unit 501 is specifically configured to: control the system service to parse the intent and then read The application package name of the camera application; and for controlling the system service to determine whether the camera application is a camera application according to the application package name.
- the processing unit 501 when the system service detects that the selected application is the camera application and opens the target camera associated with the camera application, the processing unit 501 is specifically configured to: control The system service determines whether the camera application has the permission to open the camera of the electronic device; if so, the system uses the service to open the target camera.
- the processing unit 501 when the system service detects that the selected application is the camera application and opens the target camera associated with the camera application, the processing unit 501 is specifically configured to: control The system service reads the identity of the target camera, and determines the target camera according to the identity; and is used to control the system service to call the camera open program and open the target camera.
- the processing unit 501 is specifically configured to: notify the system service to send a notification message to the camera application through the second thread , And end the second thread, and the notification message is used to notify the camera application that the target camera has been opened.
- the processing unit 501 is specifically configured to notify the camera application to turn on the target camera when it is detected through the first thread that the camera application does not receive the notification message.
- the processing unit 501 is specifically configured to: determine the application icon corresponding to the selection operation Whether it is the application icon of the camera application; if so, it is determined whether the selection operation corresponds to opening the camera application and displaying the camera preview interface of the camera application.
- the selection operation is a touch operation on the touch display screen of the electronic device; in the aspect of determining whether the application icon corresponding to the selection operation is the application icon of the camera application
- the processing unit 501 is specifically configured to: determine that the application icon of the camera application is in the target display area of the application desktop; and, when the selection operation is acquired, determine the touch area corresponding to the selection operation; And for determining that the application icon selected by the selection operation is the application icon of the camera application when it is detected that the touch area and the target display area match.
- the processing unit 501 is specifically configured to: when the camera application is in a video shooting scene or a video call scene, after exiting the application interface of the camera application, control the target camera to remain at Open state.
- An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any method as recorded in the above method embodiment ,
- the aforementioned computer includes electronic equipment.
- the embodiments of the present application also provide a computer program product.
- the above-mentioned computer program product includes a non-transitory computer-readable storage medium storing a computer program.
- the above-mentioned computer program is operable to cause a computer to execute any of the above-mentioned method embodiments. Part or all of the steps of the method.
- the computer program product may be a software installation package, and the above-mentioned computer includes electronic equipment.
- the disclosed device may be implemented in other ways.
- the device embodiments described above are only illustrative.
- the division of the above-mentioned units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or integrated. To another system, or some features can be ignored, or not implemented.
- the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical or other forms.
- the units described above as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
- each unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
- the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
- the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable memory.
- the technical solution of the present application essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, A number of instructions are included to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the foregoing methods of the various embodiments of the present application.
- the aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other various media that can store program codes.
- the program can be stored in a computer-readable memory, and the memory can include: flash disk , Read-only memory (English: Read-Only Memory, abbreviation: ROM), random access device (English: Random Access Memory, abbreviation: RAM), magnetic disk or optical disc, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- User Interface Of Digital Computer (AREA)
- Studio Devices (AREA)
- Stored Programmes (AREA)
- Telephone Function (AREA)
Abstract
Description
Claims (20)
- 一种相机启动方法,其特征在于,应用于电子设备,所述方法包括:A method for starting a camera, characterized in that it is applied to an electronic device, and the method includes:在检测到针对桌面上的相机应用的应用图标的选取操作时,启动第一线程并通过所述第一线程启动所述相机应用以显示相机预览界面,同时启动第二线程并通过所述第二线程通知系统服务执行预设操作以启动所述相机应用关联的目标摄像头;When the selection operation for the application icon of the camera application on the desktop is detected, the first thread is started and the camera application is started through the first thread to display the camera preview interface, and the second thread is started and passed through the second thread. The thread notifies the system service to perform a preset operation to start the target camera associated with the camera application;其中,所述预设操作包括以下操作:根据接收到的intent确定被选取的应用是否为相机类应用;在检测到所述被选取的应用为所述相机类应用时,打开所述相机应用关联的目标摄像头。Wherein, the preset operation includes the following operations: determining whether the selected application is a camera application according to the received intent; when detecting that the selected application is the camera application, opening the camera application association The target camera.
- 根据权利要求1所述的方法,其特征在于,所述系统服务根据接收到的intent确定被选取的应用是否为相机类应用,包括:The method according to claim 1, wherein the system service determines whether the selected application is a camera application according to the received intent, comprising:所述系统服务解析所述intent后读取所述相机应用的应用包名;The system service reads the application package name of the camera application after parsing the intent;所述系统服务根据所述应用包名确定所述相机应用是否为相机类应用。The system service determines whether the camera application is a camera application according to the application package name.
- 根据权利要求1或2所述的方法,其特征在于,所述系统服务在检测到所述被选取的应用为所述相机类应用时,打开所述相机应用关联的目标摄像头,包括:The method according to claim 1 or 2, wherein when the system service detects that the selected application is the camera application, opening the target camera associated with the camera application includes:所述系统服务确定所述相机应用是否有打开所述电子设备的摄像头的权限;The system service determines whether the camera application has permission to open the camera of the electronic device;若是,所述系统该服务打开所述目标摄像头。If so, the system opens the target camera for this service.
- 根据权利要求1或2所述的方法,其特征在于,所述系统服务在检测到所述被选取的应用为所述相机类应用时,打开所述相机应用关联的目标摄像头,包括:The method according to claim 1 or 2, wherein when the system service detects that the selected application is the camera application, opening the target camera associated with the camera application includes:所述系统服务读取所述目标摄像头的身份标识,并根据所述身份标识确定所述目标摄像头;The system service reads the identity of the target camera, and determines the target camera according to the identity;所述系统服务调用camera open程序,并打开所述目标摄像头。The system service calls the camera open program and opens the target camera.
- 根据权利要求1-4任一项所述的方法,其特征在于,所述系统服务打开所述相机应用关联的目标摄像头之后,所述方法还包括:The method according to any one of claims 1 to 4, wherein after the system service opens the target camera associated with the camera application, the method further comprises:通过所述第二线程通知所述系统服务向所述相机应用发送通知消息,并结束所述第二线程,所述通知消息用于通知所述相机应用所述目标摄像头已打开。The system service is notified by the second thread to send a notification message to the camera application and ends the second thread, and the notification message is used to notify the camera application that the target camera has been opened.
- 根据权利要求5所述的方法,其特征在于,所述方法还包括;The method of claim 5, wherein the method further comprises;通过所述第一线程在检测到所述相机应用未接收到所述通知消息时,通知所述相机应用打开所述目标摄像头。When it is detected that the camera application has not received the notification message through the first thread, the camera application is notified to turn on the target camera.
- 根据权利要求1所述的方法,其特征在于,所述启动第一线程并通过所述第一线程启动所述相机应用以显示相机预览界面之前,所述方法还包括:The method according to claim 1, wherein before the starting the first thread and starting the camera application through the first thread to display the camera preview interface, the method further comprises:确定所述选取操作对应的应用图标是否为所述相机类应用的应用图标;Determining whether the application icon corresponding to the selection operation is an application icon of the camera application;若是,确定所述选取操作是否对应打开所述相机应用并显示所述相机应用的相机预览界面。If yes, it is determined whether the selection operation corresponds to opening the camera application and displaying the camera preview interface of the camera application.
- 根据权利要求7所述的方法,其特征在于,所述选取操作为针对所述电子设备的触控显示屏的触控操作;所述确定所述选取操作对应的应用图标是否为所述相机类应用的应用图标,包括:8. The method according to claim 7, wherein the selection operation is a touch operation on the touch screen of the electronic device; and the determining whether the application icon corresponding to the selection operation is the camera type The application icon of the application, including:确定所述相机类应用的应用图标在应用桌面的目标显示区域;Determining that the application icon of the camera application is in the target display area of the application desktop;在获取到所述选取操作时,确定所述选取操作对应的触控区域;When the selection operation is acquired, determining the touch area corresponding to the selection operation;在检测到所述触控区域和所述目标显示区域匹配时,确定所述选取操作选取的应用图标为所述相机类应用的应用图标。When it is detected that the touch area matches the target display area, it is determined that the application icon selected by the selection operation is the application icon of the camera application.
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, wherein the method further comprises:在所述相机类应用处于视频拍摄场景或视频通话场景时,在退出所述相机应用的应用界面后,控制所述目标摄像头保持在打开状态。When the camera application is in a video shooting scene or a video call scene, after exiting the application interface of the camera application, the target camera is controlled to remain in the open state.
- 一种相机启动装置,其特征在于,应用于电子设备,所述相机启动装置包括处理单元和通信单元,其中,A camera activation device, characterized in that it is applied to electronic equipment, the camera activation device includes a processing unit and a communication unit, wherein,所述处理单元,用于在检测到针对桌面上的相机应用的应用图标的选取操作时,启动第一线程并通过所述第一线程启动所述相机应用以显示相机预览界面,同时启动第二线程并通过所述第二线程通知系统服务执行预设操作以启动所述相机应用关联的目标摄像头;The processing unit is configured to start a first thread and start the camera application through the first thread to display the camera preview interface when the selection operation for the application icon of the camera application on the desktop is detected, and start the second Thread and notify the system service to execute a preset operation through the second thread to start the target camera associated with the camera application;其中,所述预设操作包括以下操作:根据通过所述通信单元接收到的intent确定被选取的应用是否为相机类应用;在检测到所述被选取的应用为所述相机类应用时,打开所述相机应用关联的目标摄像头。Wherein, the preset operation includes the following operations: determining whether the selected application is a camera application according to the intent received through the communication unit; when it is detected that the selected application is the camera application, opening The target camera associated with the camera application.
- 根据权利要求10所述的相机启动装置,其特征在于,在所述系统服务根据接收到的intent确定被选取的应用是否为相机类应用方面,所述处理单元具体用于:控制所述系统服务解析所述intent后读取所述相机应用的应用包名;以及用于控制所述系统服务根据所述应用包名确定所述相机应用是否为相机类应用。The camera activation device according to claim 10, wherein the system service determines whether the selected application is a camera application according to the received intent, the processing unit is specifically configured to: control the system service After parsing the intent, reading the application package name of the camera application; and controlling the system service to determine whether the camera application is a camera application according to the application package name.
- 根据权利要求10或11所述的相机启动装置,其特征在于,在所述系统服务在检测到所述被选取的应用为所述相机类应用时,打开所述相机应用关联的目标摄像头方面,所述处理单元具体用于:控制所述系统服务确定所述相机应用是否有打开所述电子设备的摄像头的权限;若是,所述系统该服务打开所述目标摄像头。The camera activation device according to claim 10 or 11, wherein when the system service detects that the selected application is the camera application, the target camera aspect associated with the camera application is opened, The processing unit is specifically configured to: control the system service to determine whether the camera application has the permission to open the camera of the electronic device; if so, the system opens the target camera by the service.
- 根据权利要求10或11所述的相机启动装置,其特征在于,在所述系统服务在检测到所述被选取的应用为所述相机类应用时,打开所述相机应用关联的目标摄像头方面,所述处理单元具体用于:控制所述系统服务读取所述目标摄像头的身份标识,并根据所述身份标识确定所述目标摄像头;以及用于控制所述系统服务调用camera open程序,并打开所述目标摄像头。The camera activation device according to claim 10 or 11, wherein when the system service detects that the selected application is the camera application, the target camera aspect associated with the camera application is opened, The processing unit is specifically configured to: control the system service to read the identity of the target camera, and determine the target camera according to the identity; and to control the system service to call the camera open program and open The target camera.
- 根据权利要求10-13任一项所述的相机启动装置,其特征在于,所述系统服务打开所述相机应用关联的目标摄像头之后,所述处理单元具体用于:通过所述第二线程通知所述系统服务向所述相机应用发送通知消息,并结束所述第二线程,所述通知消息用于通知所述相机应用所述目标摄像头已打开。The camera activation device according to any one of claims 10-13, wherein after the system service opens the target camera associated with the camera application, the processing unit is specifically configured to: notify via the second thread The system service sends a notification message to the camera application and ends the second thread, where the notification message is used to notify the camera application that the target camera has been opened.
- 根据权利要求14所述的相机启动装置,其特征在于,所述处理单元具体用于:通过所述第一线程在检测到所述相机应用未接收到所述通知消息时,通知所述相机应用打开所述目标摄像头。The camera activation device according to claim 14, wherein the processing unit is specifically configured to notify the camera application when it is detected that the camera application has not received the notification message through the first thread Turn on the target camera.
- 根据权利要求10所述的相机启动装置,其特征在于,所述启动第一线程并通过所述第一线程启动所述相机应用以显示相机预览界面之前,所述处理单元具体用于:确定所述选取操作对应的应用图标是否为所述相机类应用的应用图标;若是,确定所述选取操作是否对应打开所述相机应用并显示所述相机应用的相机预览界面。The camera startup device according to claim 10, wherein before the first thread is started and the camera application is started through the first thread to display the camera preview interface, the processing unit is specifically configured to: determine Whether the application icon corresponding to the selection operation is an application icon of the camera application; if so, it is determined whether the selection operation corresponds to opening the camera application and displaying the camera preview interface of the camera application.
- 根据权利要求16所述的相机启动装置,其特征在于,所述选取操作为针对所述电子设备的触控显示屏的触控操作;在所述确定所述选取操作对应的应用图标是否为所述相机类应用的应用图标方面,所述处理单元具体用于:确定所述相机类应用的应用图标在应用桌面的目标显示区域;以及用于在获取到所述选取操作时,确定所述选取操作对应的触控区域;以及用于在检测到所述触控区域和所述目标显示区域匹配时,确定所述选取操作选取的应用图标为所述相机类应用的应用图标。The camera activation device according to claim 16, wherein the selection operation is a touch operation on the touch screen of the electronic device; in the determining whether the application icon corresponding to the selection operation is Regarding the application icon of the camera application, the processing unit is specifically configured to: determine that the application icon of the camera application is in the target display area of the application desktop; and to determine the selection when the selection operation is obtained The touch area corresponding to the operation; and when detecting that the touch area matches the target display area, determine that the application icon selected by the selection operation is the application icon of the camera application.
- 根据权利要求10所述的相机启动装置,其特征在于,所述处理单元具体用于:在所述相机类应用处于视频拍摄场景或视频通话场景时,在退出所述相机应用的应用界面后, 控制所述目标摄像头保持在打开状态。The camera activation device according to claim 10, wherein the processing unit is specifically configured to: when the camera application is in a video shooting scene or a video call scene, after exiting the application interface of the camera application, Control the target camera to remain in the open state.
- 一种电子设备,其特征在于,包括处理器、存储器、通信接口,以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行如权利要求1-9任一项所述的方法中的步骤的指令。An electronic device, comprising a processor, a memory, a communication interface, and one or more programs, the one or more programs are stored in the memory and configured to be executed by the processor, The program includes instructions for performing the steps in the method according to any one of claims 1-9.
- 一种计算机可读存储介质,其特征在于,存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行如权利要求1-9任一项所述的方法。A computer-readable storage medium, characterized in that it stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute the method according to any one of claims 1-9.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201980090943.9A CN113366819B (en) | 2019-05-29 | 2019-05-29 | Camera starting method, related device, electronic equipment and storage medium |
PCT/CN2019/089121 WO2020237545A1 (en) | 2019-05-29 | 2019-05-29 | Camera starting method and related apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2019/089121 WO2020237545A1 (en) | 2019-05-29 | 2019-05-29 | Camera starting method and related apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020237545A1 true WO2020237545A1 (en) | 2020-12-03 |
Family
ID=73552454
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/089121 WO2020237545A1 (en) | 2019-05-29 | 2019-05-29 | Camera starting method and related apparatus |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113366819B (en) |
WO (1) | WO2020237545A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112767707A (en) * | 2021-01-11 | 2021-05-07 | 深圳智优停科技有限公司 | Parking space sensor and parking space sensing shooting system |
CN115484386A (en) * | 2021-06-16 | 2022-12-16 | 荣耀终端有限公司 | Video shooting method and electronic equipment |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116193244A (en) * | 2021-11-25 | 2023-05-30 | Oppo广东移动通信有限公司 | Camera module initializing method and device, computer readable medium and electronic equipment |
CN114554078B (en) * | 2022-01-10 | 2023-01-31 | 荣耀终端有限公司 | Camera calling method and electronic equipment |
CN116744106B (en) * | 2022-10-25 | 2024-04-30 | 荣耀终端有限公司 | Control method of camera application and terminal equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104333704A (en) * | 2014-11-28 | 2015-02-04 | 广东欧珀移动通信有限公司 | Photographing scene previewing method, photographing scene previewing device and terminal |
CN105120112A (en) * | 2015-09-25 | 2015-12-02 | 维沃移动通信有限公司 | Camera starting method for mobile terminal and mobile terminal |
EP3166288A2 (en) * | 2015-11-05 | 2017-05-10 | BlackBerry Limited | Device configuration dependent on bar-code on accessory |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8169461B2 (en) * | 2007-09-28 | 2012-05-01 | Sony Ericsson Mobile Communications Ab | Method and system for a quick start camera application in a camera |
CN105898149A (en) * | 2016-06-01 | 2016-08-24 | 广东欧珀移动通信有限公司 | Camera starting method and system |
CN106027900A (en) * | 2016-06-22 | 2016-10-12 | 维沃移动通信有限公司 | Photographing method and mobile terminal |
CN106572299B (en) * | 2016-10-31 | 2020-02-28 | 北京小米移动软件有限公司 | Camera opening method and device |
CN109819168B (en) * | 2019-01-31 | 2020-09-01 | 维沃移动通信有限公司 | Camera starting method and mobile terminal |
-
2019
- 2019-05-29 WO PCT/CN2019/089121 patent/WO2020237545A1/en active Application Filing
- 2019-05-29 CN CN201980090943.9A patent/CN113366819B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104333704A (en) * | 2014-11-28 | 2015-02-04 | 广东欧珀移动通信有限公司 | Photographing scene previewing method, photographing scene previewing device and terminal |
CN105120112A (en) * | 2015-09-25 | 2015-12-02 | 维沃移动通信有限公司 | Camera starting method for mobile terminal and mobile terminal |
EP3166288A2 (en) * | 2015-11-05 | 2017-05-10 | BlackBerry Limited | Device configuration dependent on bar-code on accessory |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112767707A (en) * | 2021-01-11 | 2021-05-07 | 深圳智优停科技有限公司 | Parking space sensor and parking space sensing shooting system |
CN112767707B (en) * | 2021-01-11 | 2023-10-31 | 深圳智优停科技有限公司 | Parking stall inductor and parking stall response shooting system |
CN115484386A (en) * | 2021-06-16 | 2022-12-16 | 荣耀终端有限公司 | Video shooting method and electronic equipment |
CN115484386B (en) * | 2021-06-16 | 2023-10-31 | 荣耀终端有限公司 | Video shooting method and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN113366819B (en) | 2022-08-16 |
CN113366819A (en) | 2021-09-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020237545A1 (en) | Camera starting method and related apparatus | |
CN109152095B (en) | Wireless network connection method for terminal | |
CN107766128B (en) | Method and device for starting application | |
CN107861814B (en) | Resource allocation method and equipment | |
CN107783803B (en) | System optimization method and device of intelligent terminal, storage medium and intelligent terminal | |
CN106098061B (en) | Voice interaction method and device based on android system | |
EP2843979A1 (en) | Method and apparatus for preventing sound recording during the call | |
CN108132735B (en) | Terminal and application control method | |
WO2019085840A1 (en) | Resource adjustment method and apparatus | |
WO2022100724A1 (en) | Video playback method and apparatus | |
CN107888965B (en) | Image gift display method and device, terminal, system and storage medium | |
WO2020094036A1 (en) | Wireless network connection method for terminal | |
CN110618806B (en) | Application program control method and device, electronic equipment and storage medium | |
US20130205302A1 (en) | Information processing terminal and resource release method | |
CN112751971A (en) | Voice playing method and device and electronic equipment | |
CN112468833A (en) | Live broadcast interactive information processing method, device, terminal, server and storage medium | |
WO2021114709A1 (en) | Live video interaction method and apparatus, and computer device | |
CN111538574B (en) | Task stack management method, device, terminal and storage medium | |
CN111465016B (en) | Control method and device | |
CN116578422A (en) | Resource allocation method and electronic equipment | |
EP3174244B1 (en) | Video communication ending method and apparatus, computer program and recording medium | |
WO2022028607A1 (en) | Virtual resource acquisition method and apparatus | |
CN112395242B (en) | Multi-chip control method, device, electronic equipment and computer readable storage medium | |
CN117472321B (en) | Audio processing method and device, storage medium and electronic equipment | |
WO2024160136A1 (en) | Task scheduling method and apparatus, and electronic device |
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: 19930616 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: 19930616 Country of ref document: EP Kind code of ref document: A1 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19930616 Country of ref document: EP Kind code of ref document: A1 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19930616 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC DATED 18.05.2022 (EPO FORM 1205A) |