Method and device for transversely displaying camera interface and electronic equipment

By modifying the user interface display direction and camera rotation angle in large-screen devices on Android systems, the problem that the camera application does not support landscape display is solved, achieving a stable landscape display effect and improving user experience.

CN119012004APending Publication Date: 2024-11-22HEFEI JINGYI TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411072621.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

In the prior art, most camera applications of large-screen devices on Android systems do not support horizontal display, resulting in poor user experience.

Method used

By modifying the display direction of the user interface in the window management service at the frame layer, and setting the camera rotation angle in the camera system interface according to the shooting type, ensure that the camera interface of the target application can be displayed stably in landscape orientation.

Benefits of technology

The horizontal display of the camera interface for the target application in electronic devices is realized, which improves the user experience, avoids problems such as rotation angle deviation, and ensures the stability and accuracy of the horizontal display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119012004A_ABST
    Figure CN119012004A_ABST
Patent Text Reader

Abstract

The invention provides a camera interface transverse display method and device and electronic equipment, and relates to the technical field of electronics. The camera interface transverse display method comprises the following steps: creating a temporary file of a target application; under the condition that the target application is started, the display direction of a user interface is modified into transverse display in a window management service of a framework layer; under the condition that the target application calls the camera interface, judging whether the shooting type is a video type or a shooting type; recording a corresponding identifier in the temporary file according to the shooting type; and according to the identifier in the temporary file, setting a camera rotation angle in a camera system interface of the frame layer, so that a camera interface of the target application is transversely displayed. Through the technical scheme, for the target application program which cannot support transverse display in the electronic equipment, the camera interface of the target application can support stable transverse display by modifying the display direction of the user interface and the rotation angle of the camera, so that the use experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic technology, and more specifically, to a method, device and electronic device for displaying a camera interface horizontally. Background Art

[0002] In today's information age, screen display effects are crucial to user experience. However, some devices or applications do not work well when displayed horizontally, which causes some troubles to users and affects their comfort. For example, in some large-screen devices with Android systems, most camera-related applications do not support horizontal display, resulting in a poor user experience.

[0003] In view of this, how to solve the horizontal display adaptation of camera-related applications to improve the user experience is a technical problem that needs to be solved urgently. Summary of the invention

[0004] The present application provides a method, device and electronic device for horizontal display of a camera interface, which can adapt the horizontal display of camera-related applications to enhance the user experience.

[0005] In a first aspect, a method for displaying a camera interface horizontally is provided, comprising: creating a temporary file of a target application; when the target application is opened, modifying the display direction of the user interface to horizontal display in the window management service of the framework layer; when the target application calls a camera interface, determining whether the shooting type is video or photo; according to the shooting type, recording a corresponding identifier in a temporary file; according to the identifier in the temporary file, setting a camera rotation angle in the camera system interface of the framework layer, so that the camera interface of the target application is displayed horizontally.

[0006] Through the technical solution of the embodiment of the present application, for the target application in the electronic device that cannot support horizontal display, by modifying the display direction of the user interface in the framework layer and the camera rotation angle in the service layer, the camera interface of the target application can support stable horizontal display. Furthermore, the technical solution of the embodiment of the present application also takes into account the differentiation of photo taking and video taking in electronic devices, and performs different processing for different shooting types, which can make the horizontal display of the camera interface of the target application more stable and accurate, and will not have problems such as rotation angle deviation, thereby improving the user experience.

[0007] In some possible implementations, the above-mentioned recording a corresponding identifier in a temporary file according to the shooting type includes: when the shooting type is photo taking, recording a first identifier in the temporary file; or, when the shooting type is video, recording a second identifier in the temporary file; the above-mentioned setting the camera rotation angle in the camera system interface of the framework layer according to the identifier in the temporary file includes: setting the first camera rotation angle in the camera system interface according to the first identifier in the temporary file, or, setting the second camera rotation angle in the camera system interface according to the second identifier in the temporary file; wherein the first camera rotation angle is different from the second camera rotation angle.

[0008] In some possible implementations, the method further includes: setting the size of the preview image display frame in the view system of the frame layer according to the identifier in the temporary file, wherein the ratio of the length of the preview image display frame in the first direction to the second direction is equal to the ratio of the length of the display screen in the second direction to the first direction, and the first direction and the second direction are respectively the length direction and the width direction of the display screen.

[0009] Through the technical solution of this implementation, the display direction of the user interface, the camera rotation angle and the size of the preview image display frame are comprehensively set, which can further effectively ensure the horizontal display effect of the target application in the electronic device, thereby further improving the user experience.

[0010] In some possible implementations, the above-mentioned creation of a temporary file of the target application includes: creating a temporary file including a default identifier; the above-mentioned recording the corresponding identifier in the temporary file according to the shooting type includes: modifying the default identifier in the temporary file to a corresponding identifier according to the shooting type.

[0011] In some possible implementations, the method further includes: upon exiting the call to the camera interface, restoring the identifier in the temporary file to a default identifier; based on the default identifier, restoring the camera rotation angle in the camera system interface to a default angle; and / or, restoring the preview image display box in the view system to a default preview image display box.

[0012] In some possible implementations, the method further includes: when exiting the target application, restoring the display direction of the user interface in the window management service to a default display direction.

[0013] Through the technical solution of the above implementation, firstly, by setting a default identifier in a temporary file, when the target application exits the call to the camera interface, the relevant display of the electronic device can be restored to the default state according to the default identifier, which will not affect the camera interface display when other applications call the camera interface. Secondly, when exiting the target application, the display direction of the user interface can be further modified in the framework layer to the default direction, which will not affect the display interface of other applications, thereby comprehensively ensuring the visual experience of the user when using the electronic device.

[0014] In some possible implementations, the creating a temporary file of the target application includes: creating a temporary file in a storage space of the target application.

[0015] In some possible implementations, the above method is applied to an electronic device having only a single front camera.

[0016] In some possible implementations, the above method is applied to a tablet computer.

[0017] In a second aspect, a device for displaying a camera interface horizontally is provided, comprising: a creation unit for creating a temporary file of a target application; a setting unit for modifying the display direction of the user interface to horizontal display in the window management service of the framework layer when the target application is turned on; an operation unit for determining whether the shooting type is video or photo when the target application calls the camera interface, recording a corresponding identifier in a temporary file according to the shooting type, and setting a camera rotation angle in the camera system interface of the framework layer according to the identifier in the temporary file, so that the camera interface of the target application is displayed horizontally.

[0018] In a third aspect, a device for displaying a camera interface horizontally is provided, comprising: a processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program stored in the memory to execute: a method as provided in the first aspect or any possible implementation manner of the first aspect.

[0019] In a fourth aspect, an electronic device is provided, comprising: a display screen, a camera module, and a device as provided in the second aspect or the third aspect; wherein the device is used to display a shooting interface of the camera module horizontally on the display screen. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is a schematic framework diagram of an electronic device provided in an embodiment of the present application.

[0021] Figure 2 It is a schematic flowchart of a method for horizontally displaying a camera interface provided in an embodiment of the present application.

[0022] Figure 3It is a schematic flowchart of another method for horizontal display of a camera interface provided in an embodiment of the present application.

[0023] Figure 4 It is a schematic structural block diagram of a device for horizontally displaying a camera interface provided in an embodiment of the present application.

[0024] Figure 5 It is a schematic structural block diagram of another device for horizontally displaying a camera interface provided in an embodiment of the present application.

[0025] Figure 6 It is a schematic structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0027] The embodiments of the present application can be applied to various electronic devices, and are particularly suitable for 3C electronic products such as communications and consumer electronics, for example, smart phones, tablet computers, smart wearable devices, etc.

[0028] It should be understood that the specific examples in this article are only intended to help those skilled in the art better understand the embodiments of the present application, rather than to limit the scope of the embodiments of the present application.

[0029] It should also be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0030] It should also be understood that the various implementation methods described in this specification can be implemented individually or in combination, and the embodiments of the present application are not limited to this.

[0031] Unless otherwise stated, all technical and scientific terms used in the embodiments of the present application are the same as the meanings generally understood by those skilled in the art of the technical field of the present application. The terms used in the present application are only for the purpose of describing specific embodiments and are not intended to limit the scope of the present application. The term "and / or" used in the present application includes any and all combinations of one or more related listed items. The singular forms of "a kind of", "above" and "the" used in the embodiments of the present application and the appended claims are also intended to include majority forms, unless the context clearly indicates other meanings. In addition, the terms "first", "second" etc. are only used for description purposes and cannot be understood as indicating or suggesting relative importance.

[0032] In order to better understand the embodiments of the present application, the software system of the electronic device to which the embodiments of the present application are applicable is introduced below.

[0033] Figure 1 A schematic framework diagram of a software system 100 of an electronic device provided in an embodiment of the present application is shown.

[0034] like Figure 1 As shown, the software system 100 includes: a bottom layer 101 , a middle layer 102 and an application layer 103 .

[0035] The bottom layer 101 is the part of the software system 100 that is closest to the hardware, and includes a hardware abstraction layer 1012 and a kernel layer 1011. The kernel layer 1011 is specifically the kernel of the operating system. The operating system is the core of the software system and is responsible for managing the hardware and software resources of the device, while the kernel is the heart of the operating system and is responsible for processing the basic operations of the operating system, such as process scheduling, power management, and drivers, etc. The operating system may be, for example, a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a Windows operating system.

[0036] The hardware abstraction layer 1012 is a layer between the hardware and the operating system, which abstracts the specific implementation details of the hardware so that the operating system can run more conveniently on different hardware platforms. The hardware abstraction layer 1012 may include multiple interfaces, such as: audio and video interface, global positioning system (GPS) interface, call interface and WIFI interface, etc.

[0037] The upper layer of the bottom layer 101 is the middle layer 102, which can also be called the application framework layer (Application Framework), framework layer or framework layer. It provides a set of services to simplify the development and operation of applications (Application, App), so that different applications and systems can communicate and exchange data effectively. Figure 1As shown, the middle layer 102 may include: a system interface 1021, core class libraries (Libraries) 1022 and system services 1023. The system interface 1021 may provide various types of interfaces, for example, interfaces for different hardware modules. When the electronic device includes a camera module, the system interface 1021 may include a camera interface. The core class libraries 1022 are a collection of class libraries that provide basic functions and services in software development. They are usually the basis for building applications. The core class libraries provide developers with a large amount of precompiled code that implements common functions, thereby reducing the workload of developers and improving development efficiency. The system services 1023 provide structured and reusable components for application development, which can help developers quickly build and maintain applications. The system services 1023 can provide a variety of services, such as component management services (ActivityManager), window management services (Window Manager), resource management services (Resource Manager), installation package management services (Package Manager), view system (View System), etc. It can be understood that the middle layer 102 may include Figure 1 In addition to the three types of components shown, other components such as system management may also be included. For specific solutions, please refer to the relevant technology, and no further details will be given here.

[0038] In some embodiments, the purpose of the application layer 103 is to provide network services for the user's applications so that these applications can communicate through the network. As an example, the applications in the application layer 103 include but are not limited to: browsers, address books, word processing software, instant messaging software, etc.

[0039] It is understandable that the above-mentioned software system 100 needs to cooperate with the hardware layer of the electronic device to achieve specific functions. The hardware layer includes all physical components of the electronic device, that is, the actual physical components that constitute the electronic device. Each physical component in the hardware layer can interact with the software system 100, execute software instructions and process input / output operations. As an example, the hardware layer of the electronic device may include a processor, a memory, an input / output device, a power management device, a motherboard, a network card, a sound card, a camera device, and the like.

[0040] It should be noted that Figure 1 For illustration only, a framework diagram of an electronic device provided by an embodiment of the present application is shown. In some practical applications, the electronic device can also be divided into other types of multi-layer structures according to different scenarios and requirements. Different division methods and related functions of each layer structure can be found in the introduction of related technologies, and no further elaboration is given here.

[0041] At present, in some large-screen electronic devices, such as tablets, most camera-related applications do not support horizontal display. For R&D personnel, since third-party applications have no source code, it is impossible to implement a horizontal display adaptation solution by modifying the application code. Therefore, for such electronic devices, one way is to keep the relevant applications in the default vertical screen display and not adapt to the horizontal display. Another way is to force the relevant applications to display in horizontal screen, but this method can easily cause the program content to not display normally, such as the deviation of the screen angle rotation during a video call, resulting in a poor user experience.

[0042] In view of this, the present application provides a new method for horizontally displaying a camera interface, which can enable related applications in an electronic device to present a good horizontal display interface, thereby improving the user experience.

[0043] Figure 2 A schematic flowchart of a method 200 for horizontally displaying a camera interface provided in an embodiment of the present application is shown.

[0044] like Figure 2 As shown, the method 200 for displaying the camera interface horizontally includes the following steps.

[0045] S210: Create a temporary file of the target application.

[0046] S220: When the target application is started, modify the display direction of the user interface to horizontal display in the window management service of the framework layer.

[0047] S230: When the target application calls the camera interface, determine whether the shooting type is video or photo.

[0048] S240: Record a corresponding identifier in a temporary file according to the shooting type.

[0049] S250: According to the identifier in the temporary file, set the camera rotation angle in the camera system interface of the framework layer so that the camera interface of the target application is displayed horizontally.

[0050] The method 200 provided in the embodiment of the present application can be applied to Figure 1The electronic device of the software system 100 shown. More specifically, the method 200 can be applied to a processor in an electronic device. In other words, the processor can be used as the execution subject of the method 200. As an example but not a limitation, the processor can be a central processing unit (CPU), a microcontroller unit (MCU), a field programmable gate array (FPGA), an application-specific integrated circuit (ASIC), etc. The embodiment of the present application does not limit the specific type of the processor.

[0051] Multiple applications may be installed in the electronic device, wherein the target application is an application that needs to call the camera interface to implement a shooting function. The target application may be a specific application specified according to user needs. As an example, the target application may include at least one of the following applications: an instant messaging application with a video call function, a photo / video editing application, a photo / video sharing application, and the like.

[0052] In the above step S210, the processor may first create a temporary file of the target application, and when the target application calls the camera interface, the temporary file may be used to identify the specific type of camera shooting. The camera interface may be a system interface, and the camera interface may be located in the framework layer of the software system of the electronic device. By calling the camera interface, the camera device of the electronic device may be opened and controlled to realize functions such as taking pictures and / or videos.

[0053] Optionally, in some embodiments, the processor may create a temporary file of the target application in the memory. As an example, after the target application is installed in the electronic device, the processor may create the temporary file in the storage directory of the target application. Alternatively, in some alternative examples, the temporary file may also be stored in other paths, so that the target application can read the temporary file when calling the camera interface.

[0054] In step S220, the processor may receive an operation from the user to open the target application. When the target application is opened, the processor may further modify the display direction of the user interface in the framework layer (or also referred to as the Framework layer) to be horizontal. Specifically, the processor may modify the display direction of the user interface in the window manager service (Window Manager) in the framework layer.

[0055] In the window management service, an angle value of the display direction of the user interface (UI) may be provided. As an example but not limitation, by default, the display direction of the UI is vertical, and the angle value of the display direction is α. The angle value of the display direction is modified to (α+90°) or (α+270°), so that the display direction of the UI can be changed to horizontal.

[0056] In steps S230 to S250, the processor may receive various operations of the user on the target application, thereby performing corresponding processing. When the user clicks the photo and / or video tag in the target application, the target application will call the camera interface to open the camera device of the electronic device.

[0057] When the target application calls the camera interface, the processor may first determine whether the shooting type is video or photo. Specifically, when the user clicks the photo tag or video tag of the target application, the processor may obtain the user's input information to determine whether the shooting type is photo or video. After determining the shooting type, the processor may further record the corresponding identifier in a temporary file based on the shooting type. As an example, when the shooting type is photo, a first identifier is recorded in a temporary file; or, when the shooting type is video, a second identifier is recorded in a temporary file.

[0058] Furthermore, the processor may set a corresponding camera rotation angle in the middle layer of the software system according to the identifier in the temporary file, so that the camera interface of the target application is displayed horizontally. Figure 1 As shown, the middle layer may include multiple system interfaces, and the camera rotation angle may be set in a camera system interface among the multiple system interfaces. In some embodiments, when the identifier in the temporary file is a first identifier, the first camera rotation angle may be set in the camera system interface, and when the identifier in the temporary file is a second identifier, the second camera rotation angle may be set in the camera system interface, wherein the first camera rotation angle is different from the second camera rotation angle.

[0059] The first camera rotation direction and the second camera rotation direction can be determined according to the camera's processing mode for different shooting types. As an example, the first camera rotation direction and the second camera rotation direction can be obtained through testing so that the target application can realize horizontal display when running photos and videos.

[0060] By setting the parameters of the above-mentioned camera system interface, various functions of the camera can be managed and set. As an example, the camera system interface can be used to provide at least one of the following functions: providing the setting of the camera rotation angle, providing an interface for setting and obtaining the camera resolution, providing the switching and configuration of the camera focus mode, providing the setting of various camera effects such as camera exposure, white balance, flash, color effect, etc.

[0061] In other words, by setting relevant parameters in the camera system interface, the rotation angle of the camera can be controlled, which is beneficial to improving the reliability of the horizontal display of the camera interface.

[0062] Through the technical solution of the embodiment of the present application, for the target application in the electronic device that cannot support horizontal display, by modifying the display direction of the user interface in the framework layer and the camera rotation angle in the service layer, the camera interface of the target application can support stable horizontal display. Furthermore, the technical solution of the embodiment of the present application also takes into account the differentiation of photo taking and video taking in electronic devices, and performs different processing for different shooting types, which can make the horizontal display of the camera interface of the target application more stable and accurate, and will not have problems such as rotation angle deviation, thereby improving the user experience.

[0063] Figure 3 A schematic flowchart of another method 300 for horizontally displaying a camera interface provided by an embodiment of the present application is shown.

[0064] like Figure 3 As shown, the method 300 for displaying the camera interface horizontally includes the following steps.

[0065] S310: Create a temporary file of the target application, where the temporary file includes a default identifier.

[0066] S320: When the target application is started, modify the display direction of the user interface to horizontal display in the window management service of the framework layer.

[0067] S330: When the target application calls the camera interface, determine whether the shooting type is video or photo.

[0068] S340: According to the shooting type, the default identifier is modified into a corresponding identifier in the temporary file.

[0069] S350: According to the identifier in the temporary file, modify the default camera rotation angle to the target camera rotation angle in the camera system interface of the framework layer.

[0070] S360: According to the identifier in the temporary file, modify the default size of the preview image display frame to the target size in the view system of the framework layer.

[0071] S370: When exiting from calling the camera interface, the identifier in the temporary file is restored to the default identifier.

[0072] S380: According to the default identifier, the camera rotation angle in the camera system interface is restored to the default camera rotation angle.

[0073] S390: According to the default identifier, the preview image display frame in the view system is restored to the default preview image display frame.

[0074] S3100: When exiting the target application, restore the display direction of the user interface in the window management service to the default display direction.

[0075] With the above Figure 2 Similar to the illustrated embodiment, the method 300 provided in the embodiment of the present application may also be applied to a processor in an electronic device.

[0076] In step S310, the processor may create a temporary file including a default identifier, which may be used to subsequently restore parameters in the service layer and / or the view layer to default values.

[0077] The relevant technical solutions of the above steps S320 to S330 can be found in the above Figure 2 The relevant descriptions of steps S220 to S230 are not repeated here.

[0078] In steps S340 to S350, the processor may modify the default identifier in the temporary file to a first identifier or a second identifier according to the shooting type, and the default identifier is different from the first identifier and the second identifier. Further, the processor may modify the default camera rotation angle in the camera system interface to a target camera rotation angle (i.e., the first camera rotation angle or the second camera rotation angle described above) according to the first identifier or the second identifier. The default camera rotation angle can be used to set the camera interface to be displayed vertically.

[0079] In order to achieve a stable horizontal display effect, in addition to setting the camera rotation angle in the camera system interface, further, in an embodiment of the present application, the size of the preview image display frame can also be set in the view system of the frame layer, wherein the ratio of the length of the preview image display frame in the first direction and the second direction is equal to the ratio of the length of the display screen in the second direction to the first direction, and the first direction and the second direction are respectively the length direction and the width direction of the display screen.

[0080] In the default display mode of the electronic device, for example, the default display mode of the electronic device is vertical display, then the camera image and / or video will be adapted according to the vertical scale size of the display screen. When the electronic device enters horizontal display, its camera image and / or video screen will still use the previous scale, and the display screen may only be able to display part of the original screen, and the entire display screen presents an "enlarged" display effect, resulting in a poor user experience. Therefore, in an embodiment of the present application, the size of the preview image display frame can also be set so that after the electronic device enters horizontal display, the scale of its preview image display frame is the same as the vertical scale size of the display screen, and the camera image and / or video screen displayed in the preview image display frame is still a complete and clear picture.

[0081] In summary, through the technical solution of this implementation, the display direction of the user interface, the camera rotation angle and the size of the preview image display frame are comprehensively set, which can further effectively ensure the horizontal display effect of the target application in the electronic device, thereby further improving the user experience.

[0082] Continue to see Figure 3 In step S370, when the target application exits calling the camera interface, the identifier in the temporary file can be restored to the default identifier. Further, in steps S380 to S390, the processor can restore the camera rotation angle in the camera system interface to the default angle according to the default identifier in the temporary file, and / or restore the preview image display frame in the view system to the default preview image display frame. As an example, the default angle corresponding to the default identifier can make the photographed image and / or video displayed vertically. The default preview image display frame corresponding to the default identifier is a full-screen display frame in the vertical state.

[0083] In step S3100, when the target application is exited, the display direction of the user interface in the window management service may be further restored to the default display direction, for example, the horizontal display direction of the user interface is restored to the default vertical display direction.

[0084] Through the technical solution of the embodiment of the present application, firstly, by setting a default identifier in a temporary file, when the target application exits the call to the camera interface, the relevant display of the electronic device can be restored to the default state according to the default identifier, which will not affect the camera interface display when other applications call the camera interface. Secondly, when exiting the target application, the display direction of the user interface can be further modified in the framework layer to the default direction, which will not affect the display interface of other applications, thereby comprehensively ensuring the visual experience of the user when using the electronic device.

[0085] In some possible implementations, the method provided in any of the above embodiments can be applied to an electronic device with only a single front camera. In an electronic device with only a single front camera, the horizontal display of the electronic device is usually not supported, and the vertical display is still maintained, which will cause great inconvenience to the user. However, by using the method for horizontal display of the camera interface provided in the embodiment of the present application, the photos and / or videos taken by the single front camera can be well and stably displayed horizontally.

[0086] In some possible implementations, the method provided in any of the above embodiments may be applied to a tablet computer, such as a children's tablet computer. Optionally, in the tablet computer, only a single front camera may be provided for the convenience of children.

[0087] Combination of the above Figure 2 and Figure 3 , the method embodiment provided by the present application is introduced, and the following is combined with Figure 4 and Figure 5 , the device embodiment provided by the present application is introduced. It can be understood that the device embodiment can correspond to the method embodiment above, and the actions performed by each unit or module in the device embodiment can refer to the relevant description of the method embodiment above, and no further details will be given below.

[0088] Figure 4 A schematic structural block diagram of a device 400 for horizontally displaying a camera interface provided in an embodiment of the present application is shown.

[0089] like Figure 4 As shown, the device 400 for displaying the camera interface horizontally includes: a creation unit 410, a setting unit 420 and an operation unit 430. Among them, the creation unit 410 is used to create a temporary file of the target application in the electronic device. The setting unit 420 is used to modify the display direction of the user interface to horizontal display in the window management service of the framework layer when the target application is turned on. The operation unit 430 is used to determine whether the shooting type is video or photo when the target application calls the camera interface, and record the corresponding identifier in the temporary file according to the shooting type, and set the camera rotation angle in the camera system interface of the framework layer according to the identifier in the temporary file, so that the camera interface of the target application is displayed horizontally.

[0090] In some possible implementations, the operating unit 430 is used to: when the shooting type is photo taking, record a first identifier in a temporary file; set a first camera rotation angle in the camera system interface according to the first identifier in the temporary file; or, when the shooting type is video taking, record a second identifier in a temporary file; set a second camera rotation angle in the camera system interface according to the second identifier in the temporary file; wherein the first camera rotation angle is different from the second camera rotation angle.

[0091] In some possible implementations, the operating unit 430 is also used to: set the size of the preview image display frame in the view system of the frame layer according to the identifier in the temporary file, the ratio of the length of the preview image display frame in the first direction to the second direction is equal to the ratio of the length of the display screen in the second direction to the first direction, and the first direction and the second direction are respectively the length direction and the width direction of the display screen.

[0092] In some possible implementations, the creation unit 410 is used to create a temporary file including a default identifier; and the operation unit 430 is used to modify the default identifier in the temporary file to a corresponding identifier according to the shooting type.

[0093] In some possible implementations, the operating unit 430 is also used to: restore the identifier in the temporary file to the default identifier when exiting the call to the camera interface; restore the camera rotation angle in the camera system interface to the default angle based on the default identifier; and / or restore the preview image display box in the view system to the default preview image display box.

[0094] In some possible implementations, the setting unit 420 is further configured to restore the display direction of the user interface in the window management service to a default display direction when the target application is exited.

[0095] In some possible implementations, the creating unit 410 is used to create a temporary file in the storage space of the target application.

[0096] In some possible implementations, the apparatus 400 may be applied to an electronic device having only a single front camera.

[0097] In some possible implementations, the device 400 may be applied to a tablet computer.

[0098] Optionally, the above-mentioned device 400 may be a processor in an electronic device.

[0099] Figure 5 A schematic structural block diagram of another device 500 for horizontally displaying a camera interface provided in an embodiment of the present application is shown.

[0100] like Figure 5 As shown, the device 500 for displaying the camera interface horizontally includes: a processor 510 and a memory 520, the memory 520 is used to store a computer program, and the processor 510 is used to call and run the computer program stored in the memory 520 to execute: the method for displaying the camera interface horizontally provided in any of the above embodiments. The computer program may include application software.

[0101] An embodiment of the present application further provides a computer storage medium having a computer program stored thereon, wherein the computer program is used to execute: the method for horizontally displaying a camera interface provided in any of the above embodiments.

[0102] An embodiment of the present application also provides a computer program product including a computer program, where the computer program is used to execute the method for horizontally displaying a camera interface provided in any of the above embodiments.

[0103] Figure 6 A schematic structural block diagram of an electronic device 600 provided in an embodiment of the present application is shown.

[0104] like Figure 6 As shown, the electronic device 600 includes: a display screen 610, a camera module 620, and a processing device 630; wherein the processing device 630 can be used to display the shooting interface of the camera module 620 horizontally on the display screen 610.

[0105] Optionally, the processing device 630 may be Figure 4 or Figure 5 The device 400 or 500 is shown.

[0106] In some embodiments, the electronic device 600 includes only a single camera module 620 , which may be a front-facing camera of the electronic device 600 .

[0107] In some embodiments, the electronic device 600 may be a tablet computer, such as a children's tablet computer.

[0108] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0109] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0110] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0111] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0112] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0113] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0114] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for horizontally displaying a camera interface, characterized in that: include: Create a temporary file for the target application; When the target application is started, modifying the display direction of the user interface to landscape display in the window management service of the framework layer; When the target application calls a camera interface, determining whether the shooting type is a video or a photo; According to the shooting type, recording a corresponding identifier in the temporary file; According to the identifier in the temporary file, the camera rotation angle is set in the camera system interface of the framework layer so that the camera interface of the target application is displayed horizontally.

2. The method according to claim 1, characterized in that According to the shooting type, recording a corresponding identifier in the temporary file includes: In the case where the shooting type is taking a photo, recording a first identifier in the temporary file; or, When the shooting type is a video, recording a second identifier in the temporary file; The step of setting the camera rotation angle in the camera system interface of the framework layer according to the identifier in the temporary file includes: According to the first identifier in the temporary file, a first camera rotation angle is set in the camera system interface, or, setting a second camera rotation angle in the camera system interface according to the second identifier in the temporary file; The rotation angle of the first camera is different from the rotation angle of the second camera.

3. The method according to claim 1, characterized in that The method further comprises: According to the identifier in the temporary file, the size of the preview image display frame is set in the view system of the framework layer, and the ratio of the length of the preview image display frame in the first direction to the second direction is equal to the ratio of the length of the display screen in the second direction to the first direction, and the first direction and the second direction are respectively the length direction and the width direction of the display screen.

4. The method according to any one of claims 1 to 3, characterized in that The step of creating a temporary file of the target application includes: Creating the temporary file including a default identifier; According to the shooting type, recording a corresponding identifier in the temporary file includes: According to the shooting type, the default identifier in the temporary file is modified to a corresponding identifier.

5. The method according to claim 4, characterized in that The method further comprises: In case of exiting from calling the camera interface, restoring the identifier in the temporary file to the default identifier; According to the default identifier, the camera rotation angle in the camera system interface is restored to the default angle; and / or, the preview image display frame in the view system is restored to the default preview image display frame.

6. The method according to any one of claims 1 to 3, characterized in that The method further comprises: When the target application is exited, the display direction of the user interface in the window management service is restored to a default display direction.

7. The method according to any one of claims 1 to 3, characterized in that The step of creating a temporary file of the target application includes: The temporary file is created in the storage space of the target application.

8. The method according to any one of claims 1 to 3, characterized in that The method is applied to an electronic device having only a single front-facing camera.

9. The method according to any one of claims 1 to 3, characterized in that The method is applied to a tablet computer.

10. A device for displaying a camera interface in a horizontal orientation, characterized in that: include: A creation unit is used to create temporary files of the target application; A setting unit, configured to modify the display direction of the user interface to horizontal display in the window management service of the framework layer when the target application is started; An operating unit is used to determine whether the shooting type is video or photo when the target application calls the camera interface, record the corresponding identifier in the temporary file according to the shooting type, and set the camera rotation angle in the camera system interface of the framework layer according to the identifier in the temporary file, so that the camera interface of the target application is displayed horizontally.

11. The device according to claim 10, characterized in that The operating unit is used for: When the shooting type is taking a photo, recording a first identifier in the temporary file; setting a first camera rotation angle in the camera system interface according to the first identifier in the temporary file; or, When the shooting type is a video, recording a second identifier in the temporary file; setting a second camera rotation angle in the camera system interface according to the second identifier in the temporary file; The rotation angle of the first camera is different from the rotation angle of the second camera.

12. The device according to claim 10, characterized in that The operating unit is also used for: According to the identifier in the temporary file, the size of the preview image display frame is set in the view system of the framework layer, and the ratio of the length of the preview image display frame in the first direction to the second direction is equal to the ratio of the length of the display screen in the second direction to the first direction, and the first direction and the second direction are respectively the length direction and the width direction of the display screen.

13. The device according to any one of claims 10 to 12, characterized in that The creation unit is used to: create the temporary file including the default identifier; The operating unit is used to modify the default identifier in the temporary file to a corresponding identifier according to the shooting type.

14. The device according to claim 13, characterized in that The operating unit is also used for: In case of exiting from calling the camera interface, restoring the identifier in the temporary file to the default identifier; According to the default identifier, restoring the camera rotation angle in the camera system interface to a default angle; And / or, restoring the preview image display frame in the view system to a default preview image display frame.

15. The device according to any one of claims 10 to 12, characterized in that The setting unit is also used for: When the target application is exited, the display direction of the user interface in the window management service is restored to a default display direction.

16. The device according to any one of claims 10 to 12, characterized in that The creation unit is used for: The temporary file is created in the storage space of the target application.

17. The device according to any one of claims 10 to 12, characterized in that The device is applied to an electronic device having only a single front camera.

18. The device according to any one of claims 10 to 12, characterized in that The device is applied to a tablet computer.

19. A device for displaying a camera interface in a horizontal orientation, characterized in that: include: A processor and a memory, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute: the method according to any one of claims 1 to 9.

20. An electronic device, characterized in that: include: A display screen, a camera module, and a device for horizontally displaying a camera interface according to any one of claims 10 to 19; Wherein, the device for displaying the camera interface horizontally is used to display the shooting interface of the camera module horizontally on the display screen.