Application startup method and electronic device
By displaying the first interface for activating device management permissions during the boot of the custom machine and controlling the first application control desktop, the problem of failure of third-party management and control applications when the custom machine is started is solved, ensuring the normal operation of the custom business.
Patent Information
- Application Number
- CN202410706303.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2044-05-31
AI Technical Summary
When the custom machine is turned on, the third-party control application may fail in management, resulting in the custom machine being unable to realize custom business.
An application startup method is provided, by displaying a first interface after the electronic device is first turned on, to trigger the device management permission to activate the first application. In response to user operations, the electronic device controls the first application to control the desktop and disables the function of switching the desktop manager.
It effectively avoids the problem of third-party control application failure when the custom machine is started, and ensures that the custom machine can realize custom services normally.
Smart Images

Figure CN119046921B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of terminal technology, and in particular to an application startup method and an electronic device. Background Art
[0002] With the popularity of smart terminals, more and more industries can customize customized machines that meet industry needs. For example, ordering tablets in the catering industry, medical tablets in the medical care industry, learning tablets in the education industry, and elderly care tablets customized for the elderly.
[0003] Customized machines include customized third-party control applications, which can manage customized machines and implement customized services. However, when the customized machine is turned on, the third-party control application may fail to control it. If the third-party control application fails to control it, the customized machine may be unable to implement customized services. Summary of the invention
[0004] The embodiments of the present application provide an application startup method and an electronic device, which effectively avoid the failure of third-party control application management when a customized machine is started.
[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0006] In a first aspect, an application startup method is provided, which is applied to a customized electronic device, wherein the electronic device includes a first application, and the first application is a customized application. The method includes: after the electronic device is powered on for the first time, the electronic device displays a first interface after displaying a power-on wizard interface; the first interface is an interface for triggering and activating the device management authority of the first application; in response to a user's operation on the first interface, the electronic device controls the first application to manage the desktop; when the first application manages the desktop, the function of switching the desktop manager is disabled.
[0007] In this application, in response to the user's operation on the activation interface, the first application can immediately control the desktop and prohibit the function of switching the desktop manager, which can avoid the problem of the first application failing to control due to the user switching the desktop manager.
[0008] In a possible implementation of the first aspect, in response to a user's operation on a first interface, the electronic device sets device management permissions for a first application and displays a second interface of the first application. In response to the second interface being displayed, the electronic device controls the first application to manage the desktop. A possible implementation of the electronic device controlling the first application to manage the desktop is provided.
[0009] In a possible implementation of the first aspect, in response to a user's operation on a first interface, the operating system of the electronic device writes first information into a database and displays a second interface; the first information indicates that the device management authority of the first application has been activated. The first application can monitor the state of the second interface, and when the first application recognizes that the second interface is displayed, the first application can immediately read the first information from the database and manage the desktop after reading the first information. In this way, the first application can obtain the activation success information in a timely manner and manage the desktop in a timely manner.
[0010] In a possible implementation of the first aspect, after the operating system of the electronic device writes the first information into the database, the operating system of the electronic device sends a first broadcast, where the first broadcast includes the first information. When the first application receives the first broadcast, it ignores the first broadcast.
[0011] In a possible implementation of the first aspect, after the electronic device controls the first application to manage the desktop, the electronic device sets the first application as a default management application and sets the second interface as the default desktop. In this way, when the mobile phone is turned on again, the second interface can be directly displayed and the first application can be started.
[0012] In a possible implementation of the first aspect, the customized electronic device is a customized machine corresponding to a first industry; the first application is a customized application corresponding to the first industry. The first industry is any one of an education industry, a catering industry, and a medical care industry.
[0013] In a possible implementation manner of the first aspect, the customized electronic device is a customized tablet computer. The function of switching the desktop manager is disabled, including disabling a control center and / or a function bar of the electronic device.
[0014] In a second aspect, an electronic device is provided, the electronic device comprising: a memory, a communication module and one or more processors; the memory, the communication module and the processor are coupled; wherein the communication module is used to interact with the electronic device, the memory is used to store computer program code, and the computer program code includes computer instructions; when the computer instructions are executed by the processor, the server executes the method as in the second aspect
[0015] In a third aspect, the present application provides a chip system, which can be applied to an electronic device including a memory. The chip system includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected by a line. The interface circuit is used to receive a signal from the above-mentioned memory and send the signal to the processor, and the signal includes a computer instruction stored in the memory. When the processor executes the computer instruction, the electronic device executes the method as in the first aspect and any possible design thereof.
[0016] In a fourth aspect, the present application provides a computer-readable storage medium, the computer-readable storage medium comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method of the first aspect or the second aspect and any possible design thereof.
[0017] In a fifth aspect, the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the method of the first aspect or the second aspect and any possible design thereof.
[0018] It can be understood that the beneficial effects that can be achieved by the electronic device of any possible design of the second aspect, the chip system of the third aspect, the computer-readable storage medium of the fourth aspect, and the computer program product of the fifth aspect can be referred to as the beneficial effects in the first aspect and any possible design of the electronic device, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0020] Figure 2 A schematic diagram of a software architecture of an electronic device provided in an embodiment of the present application;
[0021] Figure 3 A flowchart of an application startup method provided in an embodiment of the present application;
[0022] Figure 4 A schematic diagram of a first interface provided in an embodiment of the present application;
[0023] Figure 5 A comparison diagram of an application startup method provided in an embodiment of the present application;
[0024] Figure 6 A schematic diagram of an internal interaction process of an electronic device provided in an embodiment of the present application;
[0025] Figure 7 A comparison diagram of another application startup method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] With the popularity of smart terminals, more and more industries can customize customized machines that meet industry needs. The industry can be any one of the education industry, catering industry, and medical care industry. Customized machines can be, for example, ordering tablets in the catering industry, medical tablets in the medical care industry, learning tablets in the education industry, and elderly care tablets customized for middle-aged and elderly people. Optionally, the customized machine can also be customized mobile phones, customized personal computers, customized smart watches and other types of terminals.
[0027] Usually, a customized machine is installed with a third-party control application for the control system, which can be provided by the customizer and installed in the customized machine before the customized machine leaves the factory. That is, the third-party control application is an industry customized application. After the third-party control application obtains the device management authority, the third-party control application has the authority to manage the customized machine. Management authority includes but is not limited to application management authority and security management authority. Among them, application management authority includes but is not limited to restricting the use of some applications, obtaining application installation packages, automatically updating applications, prohibiting the enablement of drop-down menus, prohibiting the enablement of some functions, such as prohibiting the enablement of Wi-Fi functions, prohibiting the enablement of Bluetooth functions, etc. Security management authority includes but is not limited to changing the lock screen password, deleting all data, setting password rules, monitoring the number of screen unlock attempts, locking the screen, setting the device global proxy, setting the validity period of the lock screen password, etc. After obtaining the device management authority, the third-party control application can display the main interface of the third-party control application on the customized machine, and the main interface includes background images and application icons of other APPs. Other APPs can be APPs that the third-party control application allows to run. The third-party control application can be, for example, a third-party desktop launcher (Launcher). Launcher can be an application in the terminal device, used to present and organize the desktop, interact with the user to access other applications, manage the device, etc. The functions of the third-party Launcher are consistent with the system's native Launcher. In some embodiments, the third-party Launcher has higher device management permissions.
[0028] When a customized machine is generally started for the first time, a third-party control application will be started and the third-party control application will take over the customized machine. However, in conventional technologies, the third-party control application may fail to control the customized machine when it is started for the first time. The failure of the third-party control application may cause the customized machine to be unable to implement customized services. For example, in response to the user triggering the activation process, the customized machine sets management permissions for the third-party control application. However, because the third-party control application fails to control the device in time, the user may switch the device management permissions to another control application in the customized machine, causing the third-party control application to lose management permissions. The customized machine may include two control applications, one is the built-in system control application, and the other is a third-party control application. The system's built-in control application can be, for example, System desktop.
[0029] To this end, the embodiment of the present application provides an application startup method that can effectively avoid the failure of third-party control application control when the customized machine is started. The method is used on customized terminal devices including third-party control applications, such as customized tablets, customized mobile phones, customized smart watches, customized personal computers, etc.
[0030] The method provided in the embodiments of the present application can be applied to electronic devices with data processing capabilities and display screens. The above-mentioned electronic devices may include mobile phones, tablet computers, laptops, personal computers (PCs), ultra-mobile personal computers (UMPCs), handheld computers, netbooks, smart home devices (e.g., smart TVs, smart screens, large screens, smart speakers, smart air conditioners, etc.), personal digital assistants (PDAs), wearable devices (e.g., smart watches, smart bracelets, etc.), vehicle-mounted devices, virtual reality devices, etc., and the embodiments of the present application do not impose any restrictions on this. In the embodiments of the present application, the above-mentioned electronic devices are electronic devices that can run operating systems and install applications. Optionally, the operating system running on the electronic device may be system, system, System, etc.
[0031] For example, please refer to Figure 1 , which shows a schematic diagram of the structure of an electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, an audio module 130, a speaker 130A, a microphone 130B, a display screen 140, a communication module 150, a power module 160, an input device 170, a sensor module 180, a camera 190, etc. Among them, the sensor module 180 may include a pressure sensor, a touch sensor, etc.
[0032] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0033] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), and / or a neural-network processing unit (NPU). Different processing units may be independent components or integrated into one or more processors. In some embodiments, the electronic device 100 may also include one or more processors 110.
[0034] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0035] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0036] The internal memory 121 may be used to store one or more computer programs, which include instructions. The processor 110 may enable the electronic device 100 to execute the application startup method provided in some embodiments of the present application, as well as various applications and data management, by running the above instructions stored in the internal memory 121. In some embodiments, the processor 110 may enable the electronic device 100 to execute the application startup method provided in the embodiments of the present application by running the instructions stored in the internal memory 121 and / or the instructions stored in the memory provided in the processor 110.
[0037] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 130, the speaker 130A, the microphone 130B, and the application processor. The speaker 130A, also called a "speaker", is used to convert audio electrical signals into sound signals.
[0038] The microphone 130B, also called a "microphone" or "speaker", is used to convert a sound signal into an electrical signal. A user can make a sound by approaching the microphone 130B with his or her mouth, and input the sound signal into the microphone 130B.
[0039] The communication function of the electronic device 100 can be realized through the antenna 1, the antenna 2 and the communication module 150.
[0040] The communication module 150 can provide solutions for wireless communications including cellular, Wi-Fi, Bluetooth (BT), wireless data transmission modules (e.g., 433MHz, 868MHz, 915MHz) applied to the electronic device 100. The communication module 150 can be one or more devices integrating at least one communication processing module. The communication module 150 receives electromagnetic waves via antenna 1 or antenna 2, filters and frequency modulates the electromagnetic wave signals, and sends the processed signals to the processor 110. The communication module 150 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through antenna 1 or antenna 2.
[0041] The electronic device 100 implements the display function through a GPU, a display screen 140, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 140 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
[0042] The display screen 140 is used to display images, videos, etc. The display screen 140 includes a display panel. In some embodiments, the electronic device 100 may include 1 or N display screens 140, where N is a positive integer greater than 1. In the embodiment of the present application, the display screen 140 may be used to display a UI and receive user operations on the UI.
[0043] The power module 160 can be used to supply power to various components included in the electronic device 100. In some embodiments, the power module 160 can be a battery, such as a rechargeable battery.
[0044] The input device 170 may include a keyboard, a mouse, etc. The keyboard is used to input English letters, numbers, punctuation marks, etc. into the electronic device 100, thereby issuing commands to the electronic device 100, inputting data, etc.
[0045] The electronic device 100 can realize the shooting function through an ISP, a camera 190, a video codec, a GPU, a display screen 140, and an application processor. The ISP is used to process the data fed back by the camera 190. The camera 190 is used to capture static images or videos. In some embodiments, the electronic device 100 includes 1 or N cameras 190, where N is a positive integer greater than 1. The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc. The video codec is used to compress or decompress digital video.
[0046] Take the above electronic device 100 as a mobile phone as an example. The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The system is taken as an example to illustrate the software structure of the electronic device 100. Figure 2 shown.
[0047] The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. The system is divided into five layers, from top to bottom: application layer, application framework layer, system library, kernel layer, and hardware layer.
[0048] The application layer may include a series of application packages. The application packages may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, social networking and other applications. Figure 2 As shown, in the embodiment of the present application, the application layer may include a first application, a setting application, and a startup wizard application.
[0049] The first application is a third-party management application. When the phone is turned on for the first time, the phone can execute an application startup method provided in an embodiment of the present application to configure device management permissions for it. When running, the first application has the ability to present and organize the desktop, interact with the user to access other applications, and manage devices.
[0050] The boot wizard application is used to display the boot wizard interface when the device is powered on for the first time. The setting application provides a visual user interaction interface for interacting with the user, responding to the user's operations, and setting relevant parameters of the electronic device.
[0051] The application framework layer provides an application programming interface (API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions. The application framework layer may include a view system, a notification manager, an input system, a policy management service, surfaceFlinger, etc.
[0052] The input system is used to monitor the input module of the mobile phone (such as the touch screen driver), and convert the parameters input by the input module into usable events and pass them to the relevant modules in the upper layer. For example, the input system is used to monitor the touch screen of the mobile phone through the touch screen driver, and convert the touch parameters generated by the touch operation input by the touch screen into usable events and pass them to the upper layer APP.
[0053] The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build the display interface of an application.
[0054] The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages and disappear automatically after a short stay without user interaction.
[0055] The policy management service is used to start an application in the mobile phone, such as a first application, when the mobile phone is turned on. After starting the first application, an application startup method provided in an embodiment of the present application is executed.
[0056] SurfaceFlinger is used to draw the interface and send it to the display.
[0057] Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for scheduling and management of the Android system. The core library consists of two parts: one is the function that the Java language needs to call, and the other is the Android core library. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0058] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0059] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0060] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0061] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0062] A 2D graphics engine is a drawing engine for 2D drawings.
[0063] The core layer may include touch screen driver, display driver, sensor driver, audio driver, etc.
[0064] The hardware layer includes but is not limited to a display screen. The display screen is used to display the boot wizard interface, the first interface, and the second interface in the embodiment of the present application.
[0065] The following describes this solution by taking a customized mobile phone (hereinafter referred to as mobile phone) as an example. Figure 3 A method for starting an application is provided for an embodiment of the present application, the method comprising:
[0066] S301, after the phone is turned on for the first time, the phone displays the startup wizard interface.
[0067] In response to the user's power-on operation, the mobile phone is powered on. When the mobile phone determines that this power-on is the first time, the mobile phone displays the power-on wizard interface. The power-on wizard interface refers to one or more interfaces that guide the user to configure parameters when the phone is powered on for the first time. While displaying the power-on wizard interface, the mobile phone synchronously starts the software and hardware modules of the mobile phone, such as the mobile phone synchronously starts the application in the mobile phone. The application may include system applications and third-party applications. The third-party application may include a third-party management and control application. The third-party management and control application is the first application.
[0068] S302, the mobile phone starts the third-party management and control application and displays the first interface.
[0069] The mobile phone can display the first interface during the process of starting the third management and control application.
[0070] For example, when the mobile phone is starting an application, it can identify whether the current application to be started is a third-party controlled application. When it is identified that the application to be started is a third-party controlled application, the mobile phone starts the third-party controlled application and displays the first interface. For example, the customized manufacturer will apply for a certificate for the third-party controlled application. Since the device management authority of the third-party controlled application is high and has sensitive authority, in order to protect the rights and interests of consumers, the mobile phone developer will review the qualifications of the customizer, the specific usage scenarios of the third-party controlled application, etc. After the review is passed, the mobile phone can issue a certificate for the third-party controlled application. The certificate indicates that the third-party controlled application can apply for device management authority. After applying for the certificate, the customized manufacturer can add the certificate to the installation package (APK) of the third-party controlled application. After that, the APK of the third-party controlled application can be installed in the mobile phone. After leaving the factory, after the first startup, when the mobile phone starts the application, it can identify whether the application to be started includes a certificate. When it is identified that the application to be started includes a certificate, the mobile phone can determine that the application to be started is a third-party controlled application, and the mobile phone can start the third-party controlled application and display the first interface.
[0071] The mobile phone may display the first interface after starting the third management and control application.
[0072] For example, after the third-party management and control application is started, the third-party management and control application can apply for device management permissions. For example, the third-party management and control application can apply for the permission to call the device management interface. After applying for the permission to call the device management interface, the third-party management and control application has the device management permission, such as being able to manage the device by calling the device management interface. The device management interface can be, for example, a mobile device management (MDM) interface. The MDM interface includes a device management API and an application management API, which provide system-level permission management functions for applications installed on mobile phones. It is mainly used for the security management of mobile phones and applications in business scenarios such as mobile office and mobile education. For example, a third-party management and control application can call an interface to apply for the permission to call the device management interface. The interface can be, for example, a SetForcedActiveDevic eAd im interface. Therefore, after the mobile phone recognizes that the interface is called, the mobile phone can further identify whether the application calling the interface is a third-party management and control application. If the application calling the interface is a third-party management and control application, the mobile phone displays the first interface.
[0073] For example, the mobile phone stores the application identifier of a third-party controlled application. The mobile phone can obtain the application identifier of the application that calls the interface, and identify whether the application identifier is consistent with the application identifier of the third-party controlled application. When the two identifiers are consistent, the mobile phone identifies that the application that calls the interface is a third-party controlled application. When the two identifiers are inconsistent, the mobile phone identifies that the application that calls the interface is not a third-party controlled application. Optionally, the cloud server stores the application identifier of a third-party controlled application, and the mobile phone can send the application identifier of the application that calls the interface to the cloud server, and the cloud server identifies whether the application is a third-party controlled application. For another example, the third-party controlled application includes the certificate mentioned above, and the mobile phone can identify whether the application that calls the interface includes a certificate. When the application includes a certificate, the mobile phone identifies that the application is a third-party controlled application.
[0074] The first interface is an interface for triggering the activation of the device management authority of the first application, i.e., the third-party control application. The first interface may be, for example, a mandatory activation interface. When the mobile phone is turned on for the first time, the boot wizard interface is displayed first, and then the first interface is displayed. Figure 4 As shown, the first interface may include a first control 402. The first control 402 is used to trigger the mobile phone to display the second interface and set device management permissions for the third-party management application. The first interface also includes a first text 401, and the first text 401 includes a list of management permissions that can be obtained by the third-party management application. Figure 4 As shown, after setting the device management permission for the third-party management application, the third-party management application has the management permission included in the first text 401. It should be understood that there are many types of device management permissions for third-party management applications. Figure 4 The device management permissions in are only an example.
[0075] S303, in response to the user's operation on the first interface, the mobile phone controls the third-party control application to control the desktop. When the third-party control application controls the desktop, the function of switching the desktop manager is disabled.
[0076] For example, in response to the user's operation of the first control on the first interface, the mobile phone controls the third-party control application to control the desktop. That is, in response to the user's operation of the first control on the first interface, the third-party control application can immediately control the desktop and prohibit the function of switching the desktop manager in the mobile phone. For example, the third-party control application prohibits the switching of the desktop manager by prohibiting the control center and / or function bar of the mobile phone. Among them, the control center of the mobile phone can be, for example, a drop-down menu, which includes various function switches. For example, including but not limited to a location information switch, a wireless screen projection switch, a sharing switch, a flying mode switch, etc. Prohibiting the control center includes prohibiting the response user from pulling down the drop-down menu or prohibiting the response user's operation on the drop-down menu. The function bar includes a return key, a home key, and a task management key. Prohibiting the function bar includes prohibiting the response user's operation on each case in the function key.
[0077] In this way, in response to the user's operation on the activation interface, the third-party control application can immediately control the desktop and prohibit the function of switching the desktop manager, which can avoid the problem of the third-party control application failing to control due to the user switching the desktop manager.
[0078] Optionally, S303 may include: S303a-S303b.
[0079] S303a, in response to the user's operation on the first interface, the mobile phone displays the second interface and sets device management permissions for the third-party management application.
[0080] The second interface is a preset interface of the third-party control application, such as the main interface of the third-party control application. The main interface may include, for example, a background image and an application icon, and the application icon may be an icon of an APP that the third-party control application allows to run.
[0081] In response to the user's operation on the first interface, the mobile phone (such as the operating system of the mobile phone) adds the first information of the third-party control application to the database. After the first information of the third-party control application is added to the database, the third-party control application has device management authority. In other words, when the mobile phone adds the first information of the third-party control application to the database, the mobile phone activates the device management authority for the third-party control application, or the mobile phone sets the device management authority for the third-party control application. The operating system of the mobile phone can be, for example, a policy management service in the operating system of the mobile phone.
[0082] The first information may include an application identifier and a first status identifier of a third-party control application. For example, a mobile phone may add the application identifier and the first status identifier of a third-party control application to a database. The first status identifier indicates that the device management authority is possessed, and the second status identifier indicates that the device management authority is not possessed. The database may be a local database built into the mobile phone, or it may be a cloud database located in the cloud. The embodiments of the present application do not make specific limitations on this.
[0083] After the mobile phone adds the first information of the third-party control application to the database, when the third-party control application calls the device management interface to issue a management policy, the mobile phone can authenticate the third-party control application based on the first information in the database. For example, the mobile phone can obtain the application identifier of the application that calls the device management interface, and query the database for the status identifier corresponding to the application identifier. If the status identifier is the second status identifier, the mobile phone prohibits the application from calling the device management interface. If the status identifier is the first status identifier, the mobile phone allows the application to call the device management interface.
[0084] S303b, identifying that the second interface is displayed and that a third-party control application controls the desktop. In the case where the third-party control application controls the desktop, a function of switching the desktop manager is disabled.
[0085] Exemplarily, when the third-party management and control application recognizes that the second interface is displayed, it reads the first information from the database, manages the desktop after reading the first information, and prohibits switching of the desktop manager.
[0086] The third-party control application can automatically identify whether it has device management authority to avoid delays. For example, the third-party control application recognizes that the second interface is displayed, and the third-party control application reads the status identifier and application identifier of the third-party control application from the database. Specifically, the third-party control application can monitor whether the second interface is displayed. After the third-party control application monitors that the second interface is displayed, the third-party control application can read the status identifier and application identifier of the third-party control application from the database. For example, the third-party control application filters out the application identifier from the database and obtains the status identifier corresponding to the application identifier. When the status identifier is the first status identifier, the third-party control application recognizes that it has device management authority.
[0087] After the electronic device controls the third-party management and control application to manage the desktop, the electronic device can set the second interface as the default interface and set the third-party management and control application as the default management and control application.
[0088] Optionally, after the mobile phone's operating system adds the first information of the third-party control application to the database, the mobile phone's operating system may send a first broadcast, which includes the first information. The third-party control application may ignore the first broadcast when receiving the first broadcast. Since the applications in the mobile phone are started at the same time when the mobile phone is turned on, the mobile phone needs to process a large number of startup tasks, which may cause the mobile phone to fail to send the first broadcast in time. Alternatively, when the mobile phone is turned on, it may give priority to sending broadcasts related to applications with higher priority, and then send the first broadcast, causing the mobile phone to fail to send the broadcast in time. Therefore, the third-party control application generally receives the first broadcast after reading the first information. Therefore, the third-party control application can ignore the first broadcast.
[0089] Figure 3 This article describes the process of a third-party control application obtaining device management permissions when the phone is turned on for the first time. When the phone is turned on again, the phone starts the software / hardware modules in the phone in response to the user's power-on operation. The phone starts the third-party control application. Since the second interface is set as the default interface, the phone draws the second interface. The third-party control application calls the device management interface to issue a control policy. After the control policy takes effect, the phone displays the second interface. Optionally, when the third-party control application calls the device management interface, the phone can authenticate the third-party control application, and after the authentication is passed, execute the control policy issued by the third-party control application. For example, the mobile phone can obtain the status identifier of the third-party control application from the database. When the status identifier is the first status identifier, the authentication is passed, and the mobile phone executes the control policy issued by the third-party control application.
[0090] Figure 5 a in the figure is an application startup method of the related technology. The mobile phone is turned on for the first time and displays the startup wizard interface. The mobile phone starts the third-party control application, and the third-party control application registers a broadcast. The mobile phone displays a forced activation interface. In response to the user clicking the activation button in the forced activation interface, the mobile phone displays the second interface to store the application identifier and activation status of the third-party control application in the database. The mobile phone sends the first broadcast. The third-party control application answers the first broadcast. After answering the first broadcast, the third-party control application controls the desktop. Since the mobile phone has just started, many applications in the mobile phone are starting and initializing, and the mobile phone will send broadcasts for different applications based on priority. This causes the mobile phone to send the first broadcast with a delay of about 10 seconds. During this delay, the user may switch the desktop manager. For example, clicking a button in the drop-down menu or function bar causes the activation to be interrupted, the mobile phone starts its own desktop manager, and the third-party control application fails to start.
[0091] Figure 5b in it is an application startup method provided in an embodiment of the present application. The mobile phone is turned on for the first time and displays the startup wizard interface. The mobile phone starts a third-party management and control application. The mobile phone displays a forced activation interface, and in response to the user clicking the activation button in the forced activation interface, the mobile phone displays a second interface to store the application identifier and activation status in the database. The third-party management and control application monitors that the second interface is displayed, and calls the interface to obtain the activation status from the database. After the third-party management and control application recognizes that the device management authority has been activated, it controls the desktop and prohibits switching of the desktop manager. It can be seen that changing the third-party management and control application from passively waiting for the first broadcast to the third-party management and control application actively obtaining the activation status can effectively avoid delays and thus avoid activation failures.
[0092] The above describes an application startup method provided by an embodiment of the present application with a mobile phone as the execution subject in combination with the accompanying drawings. Figure 6 A method for starting an application provided in an embodiment of the present application is introduced.
[0093] The mobile phone can include settings applications, third-party management applications, surfaceFlinger, policy management services, startup wizard applications, display screens, etc.
[0094] S1, the boot wizard application is started when the device is powered on for the first time.
[0095] The boot wizard application is a system application in the mobile phone. The boot wizard application can be started when the mobile phone is turned on for the first time. The boot wizard application is an application that guides the user to complete the initialization and setup of the device.
[0096] S2, the boot wizard application instructs surfaceFlinger to draw a synthetic boot wizard interface and send it for display.
[0097] The boot wizard application can send the image information of the boot wizard interface to surfaceFlinger and instruct surfaceFlinger to draw the composite boot wizard interface and send it for display. After drawing the composite boot wizard interface, surfaceFlinger can store the interface data of the boot wizard interface in the buffer.
[0098] The boot wizard interface includes the language selection interface, region selection interface, protocol and description confirmation interface, network connection setting interface, data storage interface, etc.
[0099] S3, the display screen shows the startup wizard interface.
[0100] The display screen can read the interface data of the startup wizard interface from the buffer and display the startup wizard interface.
[0101] S4, the policy management service is started, and after starting, the third-party management and control application is started.
[0102] The policy management service can be automatically started during the boot process of the mobile phone. It should be understood that in addition to the policy management service, other system services will also be started during the boot process of the mobile phone. Other system services include but are not limited to: activity management service, window management service, power management service, notification management service, location management service, connection management service, media session service, sensor service, etc.
[0103] After the policy management service is started, it can pull up (start) the applications in the mobile phone. It should be understood that the policy management service will not only pull up third-party control applications, but also pull up system applications in the mobile phone such as setting applications and other third-party applications. For example, instant messaging apps, bank client apps, learning client apps, etc.
[0104] S5: The policy management service identifies that the third-party control application is started and sends the first request to the setting application
[0105] When the policy management service starts the application, it identifies that the application to be started is a third-party management and control application, and the policy management service sends a first request to the setting application.
[0106] Alternatively, after the third-party control application is started, it will call the SetForcedActiveDeviceAdim interface to apply for device management permissions. The policy management service can identify whether the application calling the interface is a third-party control application. After identifying that the application calling the interface is a third-party control application, the policy management service sends a first request to the setting application.
[0107] The first request is used to request display of a first interface of a setting application.
[0108] S6. In response to the first request, the setting application instructs surfaceFlinger to draw a synthesized first interface and send it for display.
[0109] In response to the first request, the setting application can send the image information of the first interface to surfaceFlinger and instruct surfaceFlinger to draw and synthesize the first interface and send it for display. After drawing the synthesized first interface, surfaceFlinger can store the interface data of the first interface in the buffer.
[0110] S7, after the startup wizard interface is displayed, the display screen displays the first interface.
[0111] The display screen can sequentially obtain and display the interface data from the buffer, and after the startup wizard interface is displayed, the display screen displays the first interface.
[0112] S8, after the third-party control application is started, the third-party control application starts to instruct surfaceFlinger to draw a synthetic second interface.
[0113] After the policy management service pulls up the third-party control application, the third-party control application can give a synthesis instruction to surfaceFlinger, which is used to instruct surfaceFlinger to synthesize the second interface of the third-party control application. In response to the synthesis instruction, surfaceFlinger calls the CPU or GPU to draw the second interface. After drawing the interface data of the second interface, surfaceFlinger can cache the interface data of the second interface in the buffer.
[0114] S9, in response to the first control on the first interface being triggered, setting the application to instruct surfaceFlinger to display the second interface
[0115] For example, the mobile phone may also include an input system for monitoring touch events of the display screen of the mobile phone, and converting the parameters input by the input module into usable events, and passing them to the upper-layer settings application. In response to the first control on the first interface being triggered, the settings application may send an indication message to surfaceFlinger, and the indication message indicates that the second interface should be displayed. In response to the indication message, surfaceFlinger displays the second interface.
[0116] S10, the display screen displays the second interface.
[0117] S11, the third-party management and control application monitors that the second interface is displayed, and the third-party management and control application reads a status identifier from a database.
[0118] For example, a third-party management and control application can monitor whether the second interface is displayed based on the life cycle method of the activity. One activity corresponds to one interface. The life cycle of the activity includes running state, paused state, stopped state, deleted state, etc. Among them, the running state indicates that the interface corresponding to the activity is displayed, and the paused state indicates that the interface corresponding to the activity has lost focus but is still displayed, such as being covered by a transparent interface or partially unobstructed. The stopped state indicates that the interface corresponding to the activity is completely covered by an interface and is not displayed at all. The deleted state indicates that the interface corresponding to the activity has been destroyed. The third-party management and control application can monitor the life cycle of the second interface, and when the state of the activity corresponding to the second interface is the running state, the second interface is monitored to be displayed. After monitoring that the second interface is displayed, the third-party management and control application can read the status identifier from the database.
[0119] S12, the third-party management and control application identifies whether the device management permission is activated.
[0120] After reading the status identifier, the third-party management application can identify whether it is activated. For example, the third-party management application pre-stores the mapping relationship between the status identifier and the activation status. For example, the first status identifier corresponds to activated, and the second status identifier corresponds to inactivated.
[0121] S13, when activated, the third-party control application controls the desktop.
[0122] When a third-party management application controls the desktop, the function of switching desktop managers is disabled.
[0123] If it is not activated, the third-party management and control application may continue to execute S12-S13 until it is recognized that it has been activated.
[0124] For example, Figure 7 As shown, the original activation process is: after the first boot, the operating system starts the boot wizard application. The operating system pulls up the third-party control application. The operating system recognizes that the third-party control application applies for device management permissions and displays the first interface. In response to the user's operation on the first interface, the operating system writes the first information to the database and sends a first broadcast. The third-party control application identifies whether the first broadcast is received. If the first broadcast is received, the third-party control application controls the desktop. If the first broadcast is not received, the activation process ends. The difference in this solution is that in response to the user's operation on the first interface, the operating system displays the second interface and writes the first information to the database. When the third-party control application monitors that the second interface is displayed, it reads the first information from the database and controls the desktop. In this way, the third-party control application can immediately recognize that it has been activated and control the desktop immediately, avoiding the problem of the user switching the desktop manager and causing the third-party control application to fail to control.
[0125] The present application embodiment provides an electronic device, which includes: a memory, a display screen, and one or more processors. The display screen is coupled to the processor. The memory is used to store computer program code. The computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device can execute the various functions or steps executed by the mobile phone in the above method embodiment. The structure of the electronic device can refer to Figure 1 The structure of the electronic device 100 is shown.
[0126] The present application also provides a computer storage medium, which includes computer instructions. When the computer instructions are in the above electronic device (such as Figure 1 When the method is executed on the electronic device 100 shown in the figure, the electronic device executes each function or step in the above method embodiment.
[0127] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute each function or step in the above method embodiment.
[0128] The embodiment of the present application also provides a chip system, which includes at least one processor and at least one interface circuit. The processor and the interface circuit can be interconnected by lines. For example, the interface circuit can be used to receive signals from other devices (such as a memory of an electronic device). For another example, the interface circuit can be used to send signals to other devices (such as a processor). Exemplarily, the interface circuit can read instructions stored in the memory and send the instructions to the processor. When the instruction is executed by the processor, the electronic device can perform the various steps in the above embodiments. Of course, the chip system can also include other discrete devices, which is not specifically limited in the embodiment of the present application.
[0129] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0130] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, 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.
[0131] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0132] 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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0133] If the 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 readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is 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, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0134] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A method for starting an application, characterized in that: Applied to a customized electronic device, the electronic device includes a first application, the first application is a customized application, and the method includes: After the electronic device is powered on for the first time, the electronic device displays a first interface after displaying a power-on wizard interface; the first interface is an interface for triggering activation of the device management authority of the first application; In response to the user's operation on the first interface, the electronic device controls the first application to manage the desktop; when the first application manages the desktop, the function of switching the desktop manager is disabled.
2. The method according to claim 1, characterized in that In response to the user's operation on the first interface, the electronic device controls the first application management desktop, including: In response to a user operation on the first interface, the electronic device sets device management authority for the first application and displays a second interface of the first application; In response to the second interface being displayed, the electronic device controls the first application management desktop.
3. The method according to claim 2, characterized in that The step of, in response to the user's operation on the first interface, setting, by the electronic device, device management permissions for the first application, includes: In response to a user operation on the first interface, the operating system of the electronic device writes first information into a database; the first information indicates that the device management authority of the first application has been activated; In response to the second interface being displayed, the electronic device controls the first application management desktop, including: When the first application recognizes that the second interface is displayed, the first application reads the first information from the database and manages the desktop after reading the first information.
4. The method according to claim 3, characterized in that The method further comprises: After the operating system of the electronic device writes the first information into a database, the operating system of the electronic device sends a first broadcast, where the first broadcast includes the first information; Upon receiving the first broadcast, the first application ignores the first broadcast.
5. The method according to any one of claims 2 to 4, characterized in that: After the electronic device controls the first application management desktop, the method further includes: The electronic device sets the first application as a default management and control application, and sets the second interface as a default desktop.
6. The method according to any one of claims 1 to 4, characterized in that: The customized electronic device is a customized machine corresponding to the first industry; the first application is a customized application corresponding to the first industry; the first industry is any one of the education industry, the catering industry, and the medical care industry.
7. The method according to any one of claims 1 to 4, characterized in that: The customized electronic device is a customized tablet computer; the function of switching the desktop manager is disabled, including disabling the control center and / or function bar of the electronic device.
8. An electronic device, characterized in that: The electronic device comprises: a memory, a display screen, and one or more processors; the memory and the display screen are coupled to the processor; wherein the memory is used to store computer program code, and the computer program code comprises computer instructions; when the computer instructions are executed by the processor, the electronic device executes the method as described in any one of claims 1-7.
9. A computer-readable storage medium, characterized in that: The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method as claimed in any one of claims 1 to 7.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Starting method and device of Launchers in Android system
CN105045643A
Application running method and device, equipment and computer readable storage medium
CN111950012A