CN115827207B - Application program switching method and electronic equipment - Google Patents

Application program switching method and electronic equipment Download PDF

Info

Publication number
CN115827207B
CN115827207B CN202310122068.6A CN202310122068A CN115827207B CN 115827207 B CN115827207 B CN 115827207B CN 202310122068 A CN202310122068 A CN 202310122068A CN 115827207 B CN115827207 B CN 115827207B
Authority
CN
China
Prior art keywords
data
application program
module
interface
application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310122068.6A
Other languages
Chinese (zh)
Other versions
CN115827207A (en
Inventor
陈小乐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310122068.6A priority Critical patent/CN115827207B/en
Publication of CN115827207A publication Critical patent/CN115827207A/en
Application granted granted Critical
Publication of CN115827207B publication Critical patent/CN115827207B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The application program switching method and the electronic device are applicable to the technical field of terminal equipment, the application program switching method and the electronic device are applied to the electronic device adopting a first operating system, the adopted first operating system does not support background operation of the application program, the first interface is displayed, the first application program is exited under the condition that the first operation is detected, meanwhile, second data is obtained in response to the first operation, then when the second operation is detected, the second data is displayed in response to the second operation, wherein the first data is data collected by the first application program, the electronic device is based on the data collected by the first data after the first application program is exited, the fact that the data displayed when the first application program is reentered is initial data is avoided, and the condition that no association exists last time is avoided, and therefore the experience of a user is improved.

Description

Application program switching method and electronic equipment
Technical Field
The present disclosure relates to the technical field of terminal devices, and more particularly, to a method for switching an application program and an electronic device.
Background
At present, some terminal devices can meet the requirements only by processing simple services, such as terminal devices of a smart watch, a smart bracelet, a Bluetooth headset and the like. Applications on these terminal devices are typically developed based on a simpler operating system.
Illustratively, the application on the smart band was developed using the liteOS operating system. Under the condition that the intelligent bracelet adopts the liteOS operating system, the liteOS operating system does not support the background operation of the application program, so that when the user needs to enter the application program B under the condition that the intelligent bracelet is operating the application program A, the application program A can be closed first, and then the application program B can be clicked, so that the application program B can be operated. However, in some possible cases, the application a is an application that needs to continuously record data. Under the condition that the intelligent bracelet is running the application program A, the application program B needs to be temporarily run, the application program A can only be closed, then the application program B is run, and then the application program A is opened again. This will result in a discontinuity of the data recorded by application a, which in turn will result in a poor user experience.
Based on this, how to ensure the continuity of the data recorded by the application program when switching the application program in the terminal device using the simple operating system becomes a problem to be solved urgently.
Disclosure of Invention
The application program switching method can ensure the continuity of data recorded by the application program when the application program is switched in the terminal equipment adopting the simple operating system.
In a first aspect, a method for switching an application program is provided, where the method is applied to an electronic device, the electronic device adopts a first operating system, and the first operating system does not support a background running application program, and the method includes:
displaying a first interface, wherein the first interface comprises first data, and the first data is data acquired by a first application program;
detecting a first operation, wherein the first operation is used for indicating to exit the first application program;
responding to the first operation, and acquiring second data, wherein the second data is acquired by the electronic equipment based on the first data after the first application program exits;
detecting a second operation, wherein the second operation is used for indicating to run the first application program;
in response to the second operation, second data is displayed.
The embodiment of the application provides a switching method of an application program, the application is applied to electronic equipment adopting a first operating system, the adopted first operating system does not support background operation of the application program, the first interface is displayed, under the condition that the first operation is detected, the first application program is exited, meanwhile, second data is obtained in response to the first operation, then, when the second operation is detected, the second data is displayed in response to the second operation, wherein the first interface comprises the first data, the first data are data collected by the first application program, the second data are data collected by the first application program when the first application program is exited, the electronic equipment is based on the data collected by the first data, after the first application program is exited, the first data can be obtained by continuously collecting the data on the basis of the first data displayed when the first application program is exited again, the second data obtained on the basis of the first data displayed when the first application program is exited last time can be displayed, the first application program is prevented from being displayed as initial data when the first application program is reentered, the condition that the first application program is not displayed last time is not related to the first application program is displayed, the condition that the first application program is not used for the first application program is continuously displayed, and the user can be continuously operated, and the user experience is improved.
With reference to the first aspect, in an embodiment of the first aspect, the second data is data collected by the electronic device in a cumulative manner based on the first data after the first application exits.
With reference to the first aspect, in an embodiment of the first aspect, the second data is data obtained by determining, by the electronic device, a data type of the first data after the first application exits, and collecting according to the data type. With reference to the first aspect, in an embodiment of the first aspect, the electronic device further includes a sample Model module and a user interaction module, and the method further includes: the business module sends second data to the Model module; the Model module stores the second data; responding to the second operation, and acquiring second data in the Model module by the user interaction module; the user interaction module displays the second data.
Among other things, a User Interface (UI) module may include a view module and a display presenter module.
The view module is used for displaying an interface of user interaction.
The presenter module is used for feeding back various operations of the user on the user interaction interface and processing various operations of the user on the user interaction interface.
The Model module is used for storing the data and the prompt message reported by the service module.
The service module can comprise a series of application programs, and can call threads to trigger related sensors to collect data.
In the embodiment of the application, the function of storing data by the Model module is utilized, and the second data acquired by the service module is sent to the Model module for storage, so that the function of storing the second data acquired on the basis of the first data when the first application program is exited is realized.
The application program switching method provided by the embodiment of the application program is applied to the electronic equipment adopting the first operating system, wherein the first operating system does not support background operation of the application program, the electronic equipment comprises a user interaction module, a Model module and a service module, when the user interaction module detects a first operation of exiting the first application program, the service module acquires second data based on the first data, then the service module sends the second data to the Model module, and the function of storing the data by utilizing the Model module is utilized to store the second data, so that the user interaction module can acquire the second data from the Model module when detecting the second operation of re-operating the first application program, and display the second data on an interaction interface.
With reference to the first aspect, in an embodiment of the first aspect, the method further includes: the user interaction module responds to the first operation to obtain identification information of the first interface, wherein the identification information is used for indicating the number of layers of the first interface in a display interface corresponding to the first application program; the user interaction module sends identification information to the Model module; the Model module stores the identification information.
With reference to the first aspect, in an embodiment of the first aspect, displaying the second data in response to the second operation includes: the user interaction module responds to the second operation and calls the identification information stored in the Model module; the user interaction module displays the second data on the first interface based on the identification information.
It should be appreciated that the first application may be displayed through a plurality of display interfaces. The identification information may be used to indicate the number of layers of the first interface in the display interface corresponding to the first application.
According to the application program switching method, when the first operation is detected, the user interaction module can respond to the first operation to acquire the identification information of the first interface, the identification information is sent to the Model module, the identification information is stored by utilizing the function of the Model module for storing data, then when the second operation is detected, the user interaction module can acquire the identification information and the second data from the Model module, the user interaction module can select the first interface from the display interfaces corresponding to the first application program based on the identification information, the second data is displayed on the first interface, so that the display interface is displayed when the first application program is reentered to display the second data, the display interface is displayed when the first application program is reentered, the effect of the first application program running in the background is further simulated, and the user experience is further improved.
With reference to the first aspect, in an embodiment of the first aspect, the sending, by the service module, second data to the Model module includes: the service module sends second data and prompt information to the Model module, wherein the prompt information is used for prompting the second data to a user; the Model module stops sending prompt information to the user interaction module.
Typically, the first application may also send a prompt to the user during the process of running the first application. In an electronic device applying an android system, when a first application program is transferred to a background operation, sending of prompt information to a user is usually stopped. In order to further simulate the effect of transferring the first application program to the background operation in the electronic equipment applying the first operating system, the Model module can intercept prompt information sent by the service module based on the acquired data.
According to the application program switching method provided by the embodiment of the application program switching method, when the service module sends the second data to the Model module, the prompt information is sent to the Model module at the same time, when the Model module receives the second data and the prompt information, the second data is stored in the Model module, and the prompt information is stopped from being sent to the user interaction module, so that a channel for sending the prompt information to the user interaction module can be interrupted, the user interaction module can not output the prompt information, the effect that the first application program is transferred to the background operation can be simulated in the electronic equipment adopting the first operating system more accurately, and the user experience is improved.
With reference to the first aspect, in an embodiment of the first aspect, the electronic device further includes a motor, and the prompt information is output by a mode that the motor vibrates, and the method further includes: the Model module controls the motor to stop vibrating.
In one possible case, the prompt information is output in a vibration mode. In general, the vibration of the electronic device needs to be driven by the motor to vibrate, so, in order to avoid outputting the prompt information to the user, the Model module may also control the motor in the electronic device to stop vibrating to stop outputting the prompt information to the user.
The application program switching method provided by the embodiment of the application program switching device is applied to the electronic equipment, the electronic equipment further comprises a motor, and the prompt information is output in a motor vibration mode, so that when the Model module receives the prompt information sent by the service module, the Model module stops sending the prompt information to the user interaction module, and meanwhile, the motor in the electronic equipment is controlled to stop vibrating, so that the electronic equipment can stop outputting the prompt information to a user in all aspects, the situation that the prompt information is output to the user in a motor vibration mode when the prompt information is stopped to be output on a display interface is avoided, and further, the effect that the first application program is transferred to a background operation is simulated in the electronic equipment adopting the first operating system more accurately, and the user experience is improved.
With reference to the first aspect, in one embodiment of the first aspect, the first application includes a sports health application.
With reference to the first aspect, in an embodiment of the first aspect, the electronic device includes a smart watch or a smart bracelet. In a second aspect, there is provided a switching device for an application comprising means for performing any of the methods of the first aspect. The device can be a terminal device or a chip in the terminal device. The apparatus may include an acquisition unit and a processing unit.
When the apparatus is a terminal device, the processing unit may be a processor, and the acquiring unit may be a communication interface; the terminal device may further comprise a memory for storing computer program code which, when executed by the processor, causes the terminal device to perform any of the methods of the first aspect.
When the device is a chip in the terminal equipment, the processing unit may be a processing unit inside the chip, and the obtaining unit may be an output interface, a pin, a circuit, or the like; the chip may also include memory, which may be memory within the chip (e.g., registers, caches, etc.), or memory external to the chip (e.g., read-only memory, random access memory, etc.); the memory is for storing computer program code which, when executed by the processor, causes the chip to perform any of the methods of the first aspect.
In one possible implementation, the memory is used to store computer program code; a processor executing the computer program code stored in the memory, the processor, when executed, configured to perform: displaying a first interface, wherein the first interface comprises first data, and the first data is data acquired by a first application program; detecting a first operation, wherein the first operation is used for indicating to exit the first application program; responding to the first operation, and acquiring second data, wherein the second data is acquired by the electronic equipment based on the first data after the first application program exits; detecting a second operation, wherein the second operation is used for indicating to run the first application program; in response to the second operation, second data is displayed.
In a third aspect, there is provided a computer readable storage medium storing computer program code which, when run by a switching device of an application program, causes the switching device of the application program to perform the switching method of any one of the application programs of the first aspect.
In a fourth aspect, there is provided a computer program product comprising: computer program code which, when run by a switching device of an application, causes the switching device of the application to perform any one of the device methods of the first aspect.
The application program switching method is applied to the electronic equipment adopting the first operating system, the adopted first operating system does not support background operation of the application program, the first interface is displayed, the first application program is exited under the condition that the first operation is detected, meanwhile, second data is obtained in response to the first operation, then, the second data is displayed in response to the second operation when the second operation is detected, wherein the first interface comprises the first data, the first data are data collected by the first application program, the second data are data collected by the first application program after the first application program is exited, the electronic equipment is based on the data collected by the first data, so that the second data can be obtained by continuously collecting the data on the basis of the first data displayed when the first application program is exited again, the first data obtained on the basis of the first data displayed when the first application program is exited last time can be displayed when the first application program is reentered, the first data displayed when the first application program is reentered is not related to the first application program, the condition that the first application program is not displayed last time is avoided, and the first application program is not displayed continuously is not used when the first application program is exited, and the user experience is improved continuously.
Drawings
FIG. 1 is an interface schematic of a multiple entry sports health App in a smart bracelet;
FIG. 2 is a schematic interface diagram of an athletic health App;
FIG. 3 is a schematic diagram of a hardware system suitable for use with the electronic device of the present application;
FIG. 4 is a schematic diagram of a software system suitable for use with the electronic device of the present application;
FIG. 5 is a schematic view of an application scenario of a switching method suitable for application programs of the present application;
fig. 6 is a flowchart of a method for switching an application program according to an embodiment of the present application;
FIG. 7 is a schematic interface diagram of a sports health App provided in an embodiment of the present application;
FIG. 8 is a schematic interface diagram of a sports health App provided in an embodiment of the present application;
FIG. 9 is a schematic diagram of an interface provided by an embodiment of the present application to an athletic health App;
FIG. 10 is a schematic diagram of an interface providing a two-time entry sports health App in accordance with an embodiment of the present application;
FIG. 11 is a schematic diagram of an interface providing another two-entry sports health App in accordance with an embodiment of the present application;
FIG. 12 is a schematic diagram of an interface providing another two-entry sports health App in accordance with an embodiment of the present application;
fig. 13 is a flowchart of another method for switching an application program according to an embodiment of the present application;
Fig. 14 is a flowchart of another method for switching an application program according to an embodiment of the present application;
fig. 15 is a flowchart of another switching method of an application provided in an embodiment of the present application;
FIG. 16 is a schematic diagram of an application switching device provided herein;
fig. 17 is a schematic diagram of an electronic device for image processing provided herein.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Wherein, in the description of the embodiments of the present application, "/" means or is meant unless otherwise indicated, for example, a/B may represent a or B; "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In addition, in the description of the embodiments of the present application, "plurality" means two or more than two.
The terms "first," "second," "third," and the like, are used below for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first", "a second", or a third "may explicitly or implicitly include one or more such feature.
At present, some electronic devices can meet the requirements only by processing simple services, such as terminal devices of a smart watch, a smart bracelet, a Bluetooth headset and the like. Applications on these terminal devices are typically developed based on a simpler operating system.
Illustratively, the application on the smart band was developed using the liteOS operating system. In the case that the smart band adopts the liteOS operating system, since the liteOS operating system does not support the background running of the Application program, when the smart band is running the sports health Application program (App), as shown in fig. 1 (a), the user only can close the sports health App first, enter the main interface shown in fig. 1 (b), and then enter the interface where the Application program list is located, as shown in fig. 1 (c), find the instant chat App and click the instant chat App, so that the instant chat App can be run. When the user needs to continue to use the sports health App to record the sports data after completing the processing task on the instant chat App, the sports health App needs to be clicked again to enter the sports health App.
However, the exercise health App is an application program that needs to continuously record data, and information such as "distance", "time", "pace" and "heart rate" is generally displayed on the corresponding display interface, as shown in (a) of fig. 2. The "distance" refers to the accumulated distance of the current exercise, and the "time" refers to the accumulated time of the current exercise. Because the liteOS operating system does not support background running of the application, when the user turns off the sports health App, the sports health App stops sampling the sports distance and the sports time, and thus cannot continue to acquire relevant sports data. When the user clicks into the sports health App again, the last recorded "distance" and "time" data cannot be inherited, displaying an interface as shown in (b) of fig. 2, with the "distance" option displayed as "0" and the "time" option displayed as "0". This will result in a discontinuity in the data recorded by the sports health App, which in turn results in a poor user experience.
In view of this, an embodiment of the present application provides a method for switching an application program, which is applied in an electronic device that adopts a first operating system, where the first operating system does not support background running of the application program, by displaying a first interface, and in case of detecting the first operation, exiting the first application program, while obtaining second data in response to the first operation, and then in response to the second operation, displaying the second data in response to the second operation, where the first interface includes first data, the first data is data collected by the first application program, and the second data is data collected by the electronic device based on the first data when the first application program exits, which is equivalent to after exiting the first application program, the method and the device can further acquire the data continuously on the basis of the first data displayed when the first application program is exited to obtain the second data, so that the second data obtained on the basis of the first data displayed when the first application program is exited last time can be displayed when the first application program is re-entered, the situation that the data displayed when the first application program is re-entered is initial data and is not related to the first data displayed by the first application program last time is avoided, the continuity of the data displayed by the first application program is improved under the condition that the first application program is re-operated by adopting the electronic equipment of a simple operating system, and user experience is further improved.
The application program switching method provided by the embodiment of the application program switching method can be applied to electronic equipment. Optionally, the electronic device includes a terminal device, which may also be referred to as a terminal (terminal), a User Equipment (UE), a Mobile Station (MS), a Mobile Terminal (MT), and so on. The terminal device may be a smart television, a wearable device, a tablet (Pad), a computer with a wireless transceiving function, a Virtual Reality (VR) terminal device, an Augmented Reality (AR) terminal device, a wireless terminal in industrial control (industrial control), a wireless terminal in unmanned (self-driving), a wireless terminal in teleoperation (remote medical surgery), a wireless terminal in smart grid (smart grid), a wireless terminal in transportation security (transportation safety), a wireless terminal in smart city, a wireless terminal in smart home (smart home), etc. The embodiment of the application does not limit the specific technology and the specific equipment form adopted by the terminal equipment. The electronic device may be a wearable device, such as a smart bracelet, or a smart watch, as one possible scenario.
By way of example, fig. 3 shows a schematic structural diagram of the electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriber identificationmodule, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units. For example, the processor 110 may include at least one of the following processing units: application processors (application processor, AP), modem processors, graphics processors (graphicsprocessing unit, GPU), image signal processors (imagesignal processor, ISP), controllers, video codecs, digital signal processors (digital signal processor, DSP), baseband processors, neural-Network Processors (NPU). The different processing units may be separate devices or integrated devices.
The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. For example, the processor 110 may include at least one of the following interfaces: inter-integrated circuit, I2C) interfaces, inter-integrated circuit audio (inter-integratedcircuit sound, I2S) interfaces, pulse code modulation (pulsecode modulation, PCM) interfaces, universal asynchronous receiver transmitter (universalasynchronous receiver/transmitter, UART) interfaces, mobile industry processor interfaces (mobile industry processor interface, MIPI), general-purpose input/output (GPIO) interfaces, SIM interfaces, USB interfaces.
The connection relationship between the modules shown in fig. 3 is merely illustrative, and does not limit the connection relationship between the modules of the electronic device 100. Alternatively, the modules of the electronic device 100 may also use a combination of the various connection manners in the foregoing embodiments.
The electronic device 100 may implement display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 may be used to display images or video. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquidcrystal display, LCD), an organic light-emitting diode (OLED), an active-matrixorganic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini light-emitting diode (MiniLED), a micro light-emitting diode (micro led), a micro OLED (Micro OLED), or a quantum dot light-emitting diode (quantum dotlight emitting diodes, QLED). In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device 100 may implement audio functions, such as music playing and recording, through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like.
The audio module 170 is used to convert digital audio information into an analog audio signal output, and may also be used to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 or a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also referred to as a horn, is used to convert audio electrical signals into sound signals. The electronic device 100 may listen to music or hands-free conversation through the speaker 170A.
A receiver 170B, also referred to as an earpiece, converts the audio electrical signal into a sound signal. When a user uses the electronic device 100 to answer a phone call or voice message, the voice can be answered by placing the receiver 170B close to the ear.
Microphone 170C, also known as a microphone or microphone, is used to convert sound signals into electrical signals. When a user makes a call or transmits voice information, a sound signal may be input to the microphone 170C by sounding near the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C to achieve a noise reduction function. In other embodiments, the electronic device 100 may also be provided with three, four, or more microphones 170C to perform functions such as identifying the source of sound and directing recordings. The processor 110 may process the electrical signal output by the microphone 170C, for example, the audio module 170 and the wireless communication module 160 may be coupled through a PCM interface, and after the microphone 170C converts the environmental sound into an electrical signal (such as a PCM signal), the electrical signal is transmitted to the processor 110 through the PCM interface; the electrical signal is subjected to volume analysis and frequency analysis from the processor 110 to determine the volume and frequency of the ambient sound.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be a USB interface 130 or a 3.5mm open mobile electronic device 100 platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellulartelecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A may be of various types, such as a resistive pressure sensor, an inductive pressure sensor, or a capacitive pressure sensor. The capacitive pressure sensor may be a device comprising at least two parallel plates with conductive material, and when a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes, and the electronic device 100 determines the strength of the pressure based on the change in capacitance. When a touch operation acts on the display screen 194, the electronic apparatus 100 detects the touch operation according to the pressure sensor 180A. The electronic device 100 may also calculate the location of the touch based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations that act on the same touch location, but at different touch operation strengths, may correspond to different operation instructions. For example: executing an instruction for checking the short message when the touch operation with the touch operation intensity smaller than the first pressure threshold acts on the short message application icon; and executing the instruction of newly creating the short message when the touch operation with the touch operation intensity being larger than or equal to the first pressure threshold acts on the short message application icon.
The gyro sensor 180B may be used to determine a motion gesture of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., x-axis, y-axis, and z-axis) may be determined by gyro sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects the shake angle of the electronic device 100, calculates the distance to be compensated by the lens module according to the angle, and makes the lens counteract the shake of the electronic device 100 through the reverse motion, so as to realize anti-shake. The gyro sensor 180B can also be used for scenes such as navigation and motion sensing games.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude from barometric pressure values measured by barometric pressure sensor 180C, aiding in positioning and navigation.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip cover using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip machine, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. The electronic device 100 may set the characteristics of automatic unlocking of the flip cover according to the detected open-close state of the leather sheath or the open-close state of the flip cover.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically, x-axis, y-axis, and z-axis). The magnitude and direction of gravity may be detected when the electronic device 100 is stationary. The acceleration sensor 180E may also be used to recognize the gesture of the electronic device 100 as an input parameter for applications such as landscape switching and pedometer.
The distance sensor 180F is used to measure a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, for example, in a shooting scene, the electronic device 100 may range using the distance sensor 180F to achieve fast focus.
The proximity light sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, for example, a photodiode. The LED may be an infrared LED. The electronic device 100 emits infrared light outward through the LED. The electronic device 100 detects infrared reflected light from nearby objects using a photodiode. When the reflected light is detected, the electronic device 100 may determine that an object is present nearby. When no reflected light is detected, the electronic device 100 may determine that there is no object nearby. The electronic device 100 can use the proximity light sensor 180G to detect whether the user holds the electronic device 100 close to the ear for talking, so as to automatically extinguish the screen for power saving. The proximity light sensor 180G may also be used for automatic unlocking and automatic screen locking in holster mode or pocket mode.
The ambient light sensor 180L is used to sense ambient light level. The electronic device 100 may adaptively adjust the brightness of the display 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust white balance when taking a photograph. Ambient light sensor 180L may also cooperate with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent false touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 may utilize the collected fingerprint feature to perform functions such as unlocking, accessing an application lock, taking a photograph, and receiving an incoming call.
The temperature sensor 180J is for detecting temperature. In some embodiments, the electronic device 100 performs a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, electronic device 100 performs a reduction in the performance of a processor located in the vicinity of temperature sensor 180J in order to reduce power consumption to implement thermal protection. In other embodiments, when the temperature is below another threshold, the electronic device 100 heats the battery 142 to avoid the low temperature causing the electronic device 100 to be abnormally shut down. In other embodiments, when the temperature is below a further threshold, the electronic device 100 performs boosting of the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperatures.
The touch sensor 180K, also referred to as a touch device. The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a touch screen. The touch sensor 180K is for detecting a touch operation acting thereon or thereabout. The touch sensor 180K may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 and at a different location than the display 194.
The keys 190 include a power-on key and an volume key. The keys 190 may be mechanical keys or touch keys. The electronic device 100 may receive a key input signal and implement a function related to the case input signal.
The motor 191 may generate vibration. The motor 191 may be used for incoming call alerting as well as for touch feedback. The motor 191 may generate different vibration feedback effects for touch operations acting on different applications. The motor 191 may also produce different vibration feedback effects for touch operations acting on different areas of the display screen 194. Different application scenarios (e.g., time alert, receipt message, alarm clock, and game) may correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
The indicator 192 may be an indicator light, which may be used to indicate a change in state of charge and charge, or may be used to indicate a message, missed call, and notification.
It should be noted that any of the electronic devices mentioned in the embodiments of the present application may include more or fewer modules in the electronic device 100.
The software system of the electronic device 100 may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the present application exemplifies a layered architecture liteOS system, and illustrates a software structure of the electronic device 100.
Fig. 4 is a software configuration block diagram of the electronic device 100 of the embodiment of the present application.
The layered architecture of the electronic device 100 divides the software into several layers, each with a distinct role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the liteOS system is divided into three layers, an application layer, an application framework layer, and a hardware abstraction layer, from top to bottom, respectively.
The application layer may include a User Interface (UI) module, a sample Model module, and a business module.
The UI module may include a view module and a display presenter module, among others.
The view module is used for displaying an interface of user interaction.
The presenter module is used for feeding back various operations of the user on the user interaction interface and processing various operations of the user on the user interaction interface.
The Model module is used for storing the data and the prompt message reported by the service module.
A series of applications, such as a sports health App, may be included in the business module. The exercise health App can be used for acquiring exercise data and sending the exercise data and prompt information to the Model module.
The business module can call a thread to trigger the related sensor to collect data.
The framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
The hardware abstraction layer is an interface layer between software and hardware, and aims to abstract the hardware. The hardware abstraction layer can hide the hardware interface details of a specific platform, providing a virtual hardware platform for the operating system.
It should be noted that, the electronic device according to the embodiment of the present application may include more or fewer modules in the electronic device.
The application scenario used in the embodiment of the present application is described below.
Fig. 5 is a schematic diagram of an application scenario applicable to the embodiment of the present application. When the user performs exercise by using the exercise health App in the smart bracelet, the exercise health App records exercise data of the user, such as heart rate data, exercise mileage data, exercise duration data and the like as shown in (a) of fig. 5, wherein the exercise mileage is 1.0km, and the exercise duration is 20min. At this point, the user needs to process tasks in other apps, e.g., the user needs to reply to WeChat TM A message. At this time, the user switches from the display interface of the sports health App to WeChat TM The display interface of the dialog box is shown in fig. 5 (b). In the process of replying to the message, if the user still keeps the motion state, the motion health App continuously records motion data. And when the user enters the sports health App again, the displayed sports data is continuously updated sports data. Wherein, the movement mileage is 1.5km, the movement duration is 23min, as shown in (c) of fig. 5. And in the process of replying to the message, if the user stops moving, recording the current movement data. The displayed athletic data is the recorded athletic data when the user reenters the athletic health App. Wherein, the movement mileage is 1.0km, the movement duration is 23min, as shown in (d) of fig. 5. When switching back from the interface shown in fig. 5 (b) to the interface of the sports health App, it is generally necessary to return to the main interface (not shown in the figure) and then enter the interface of the sports health App from the main interface.
The following describes in detail the method for switching application programs provided in the embodiment of the present application with reference to fig. 6 to 15.
Fig. 6 is a flowchart of a method for switching an application program, where the method is applied to an electronic device, and the electronic device may be a wearable device, and the wearable device may use a first operating system, and the first operating system does not support background operation of the application program. By way of example, the first operating system may be referred to as a liteOS system, the hierarchical architecture of which may be as shown in fig. 4. The liteOS system is simpler than the android system, so that the liteOS system does not support background running of an application program, and when the application program is switched in the liteOS system, only the application program currently running can be closed first, and then another application program can be opened. In this case, the embodiment of the application provides a method for switching an application program, including:
s101, displaying a first interface, wherein the first interface comprises first data, and the first data is acquired by a first application program.
The first application program may refer to a sports health App, which may collect sports data of a user through a sensor, including "heart rate", "pace", "distance" and "time" as shown in (a) of fig. 5. Where distance and time are continuously increasing data, both of which need to be recorded continuously.
It should be appreciated that the sports health App may correspond to multiple interfaces. By way of example, the interface corresponding to the sports health App may be as shown in fig. 7, including the interface shown in (a) of fig. 7 and the interface shown in (c) of fig. 7. When entering the sports health App, the interface shown in fig. 7 (a) (i.e., the sports health first layer interface) is displayed, and the user clicks the "distance" option, as shown in fig. 7 (b), to enter the interface shown in fig. 7 (c) (i.e., the sports health second layer interface).
The first interface refers to an interface corresponding to the currently displayed exercise health App, and may be an interface as shown in (a) of fig. 7 or an interface as shown in (c) of fig. 7, which is not limited in this embodiment of the present application. The data displayed on the first interface is the first data.
In one possible scenario, the first interface may also display a piece of video data.
Illustratively, as shown in fig. 8, a section of motion teaching video is displayed in the first interface. The first data includes a number of frames corresponding to the video and a currently displayed one-frame image.
S102, detecting a first operation, wherein the first operation is used for indicating to exit the first application program.
The first operation may be a sliding operation, a pull-down operation, or an operation of clicking a physical control, which is not limited in this embodiment of the present application. The electronic device exits the first application when the electronic device detects the first operation. It should be understood that, in the embodiment of the present application, the electronic device refers to an electronic device that adopts the first operating system, and does not support background running of the application program, so after exiting the first application program, the first application program is usually closed, and the first application program does not run in the background. After exiting the first application, the electronic device may run other applications or may stay on the main interface, which is not limited in this embodiment of the present application.
And S103, responding to the first operation, and acquiring second data, wherein the second data is acquired by the electronic equipment based on the first data after the first application program exits.
It should be understood that the first data includes data that needs to be continuously recorded, such as a movement distance and a movement duration, and the first data is exemplary data corresponding to the "distance" and "duration" options displayed on the interface shown in fig. 5 (a). After exiting the first application program, the electronic device may further continuously record the movement distance and the movement duration on the basis of the first data, to obtain second data.
By way of example, as shown in fig. 5 (a), the first data may include a distance and a duration, wherein the distance is 1.0km and the time is 20 minutes. And when the first operation is detected to exit the first application program, the electronic equipment continuously collects the distance data and the time data to obtain second data.
In one possible scenario, after exiting the first application, the user continues to move, the distance data and the time data continue to grow with it, and the electronic device continues to collect the distance data and the time data, resulting in second data, where the distance in the second data is 1.5km and the time is 23 minutes.
In one possible case, after exiting the first application program, the user stops moving, the distance data does not change, but the time data continues to increase, the electronic device continues to collect the distance data and the time data, and second data is obtained, wherein the distance in the second data is still 1.0km, and the time continues to increase to 23 minutes.
In one possible scenario, a video may also be displayed on the first interface. Upon exiting the first application, the first data includes a frame image of the video at a current time. When the first application program is detected to be exited, the electronic device can use the video data played on the first interface and the frame number corresponding to the moment when the first application program is exited as the second data.
S104, detecting a second operation, wherein the second operation is used for indicating to run the first application program.
Wherein the second operation may be for indicating to re-run the first application.
By way of example, the second operation may be clicking on a "sports health" control under the main dial, as shown in fig. 9 (a); the second operation may also be clicking on the switch key of the smart watch, as shown in (b) of fig. 9; the second operation may also include an operation of entering the application list and clicking on the "sports health" control, as shown in fig. 9 (c); the second operation may also be a direct click of a function key, as shown in fig. 9 (d).
S105, in response to the second operation, displaying second data.
It should be appreciated that since the interface corresponding to the first application (sports health App) may include multiple interfaces, the interface displayed upon exiting the first application is the first interface. When the second data is displayed, the second data may be displayed in the same interface as the first interface displayed when the first application exits, or the second data may be displayed in an interface corresponding to any first application, which is not limited in this embodiment of the present application.
Illustratively, upon exiting the sports health App, the first interface is displayed as an interface for sports navigation, as shown in (a) in fig. 10. When the second data is displayed in response to the second operation, the second data may be displayed at an interface of the motion data as shown in (b) of fig. 10.
Illustratively, upon exiting the athletic health App, the first interface is an interface displaying athletic data, as shown in fig. 11 (a). When the second data is displayed in response to the second operation, four options of "heart rate", "pace", "distance" and "time" may be displayed in the same type of interface as the movement data displayed in the first interface, but specific display data is different from the first data displayed in the first interface, as shown in (b) of fig. 11.
Illustratively, upon exiting the sports health App, a video is displayed on the first interface, as shown in fig. 12, with the progress of the video being "upper back action active". While the second data is displayed in response to the second operation, the video as shown in fig. 12 continues to be displayed, and the progress of the video is also "upper back action activated".
The application program switching method provided by the embodiment of the application program is applied to the electronic equipment adopting the first operating system, the adopted first operating system does not support background operation of the application program, the first interface is displayed, and under the condition that the first operation is detected, the first application program is exited, meanwhile, the second data is obtained in response to the first operation, then, when the second operation is detected, the second data is displayed in response to the second operation, wherein the first interface comprises the first data, the first data is the data collected by the first application program, the second data is the data collected by the first application program after the first application program is exited, the electronic equipment is based on the data collected by the first data, and thus, after the first application program is exited, the first data can be obtained by continuously collecting the data on the basis of the first data displayed when the first application program is exited again, the second data obtained on the basis of the first data displayed when the first application program is exited last time can be displayed, the first application program is prevented from being the initial data displayed when the first application program is reentered, the condition that the first application program is not displayed last time is not related to the first application program is avoided, the condition that the first application program is not used for displaying the first application program is continuously, and the user experience is improved.
In one possible scenario, the software layering architecture of the electronic device is shown in fig. 4, where the software layering architecture includes a sample Model module, a user interaction module, and a service module, where the user interaction module includes a view module and a presenter module, and the service module includes a first application program. When the electronic device exits the first application program, the Model module can store second data collected by the electronic device based on the first data (data displayed on the first interface when the electronic device exits the first application program), and then when the electronic device enters the first application program again, the user interaction module can acquire the second data collected by the first application program on the basis of the first data from the Model module, so that the second data displayed on the user interface by the user interaction module is continuous with the first data. The following is a detailed description of the embodiment shown in fig. 13.
Fig. 13 is a flowchart of a method for switching an application program according to another embodiment of the present application, as shown in fig. 13, where the method includes:
s201, the user interaction module displays a first interface.
The first interface comprises first data, wherein the first data is data acquired by the first application program.
S202, the user interaction module detects a first operation.
The first operation is for indicating to exit the first application.
S203, the service module responds to the first operation to acquire second data.
After the first application program exits, the electronic device still stores threads corresponding to the first application program, and the threads can be used for triggering the sensor to collect data required to be collected by the first application program. The service module can call the thread, and trigger the related sensor to acquire second data on the basis of the first data.
The service module calls the thread corresponding to the first application program, triggers the same sensor, and accumulates collected data on the basis of the first data to obtain second data.
For example, the service module may first determine the data type of the first data, and then trigger the same sensor to acquire the data of the same data type, so as to obtain the second data.
S204, the business module sends the second data to the Model module.
S205, the Model module stores the second data.
It should be appreciated that the Model module may be generally used to store data and alert messages reported by the business module. In the embodiment of the application, the function of storing data by the Model module is utilized, and the second data acquired by the service module is sent to the Model module for storage, so that the function of storing the second data acquired by the service module on the basis of the first data when the first application program is exited is realized.
S206, the user interaction module detects a second operation.
The second operation is for indicating to run the first application.
S207, the user interaction module responds to the second operation to acquire second data from the Model module.
S208, the user interaction module displays the second data.
The application program switching method provided by the embodiment of the application program is applied to the electronic equipment adopting the first operating system, wherein the first operating system does not support background operation of the application program, the electronic equipment comprises a user interaction module, a Model module and a service module, when the user interaction module detects a first operation of exiting the first application program, second data are acquired through the first application program based on the first data, then the service module sends the second data to the Model module, the function of storing the data by utilizing the Model module is utilized, the second data are stored, and further the user interaction module can acquire the second data from the Model module when the second operation of re-operating the first application program is detected, and the second data are displayed on an interaction interface.
Under a possible condition that the display interfaces corresponding to the first application program are multiple, when the first application program exits, the user interaction module can also acquire the identification information of the first interface, so that when the first application program is rerun in response to the second operation, the display interfaces which are the same as the first interface can be displayed based on the identification information, and the running effect of the first application program in the background can be further simulated. This is explained in detail below with reference to fig. 14.
Fig. 14 is a flowchart of a method for switching an application program according to another embodiment of the present application, as shown in fig. 14, where the method includes:
s301, displaying a first interface by the user interaction module.
The first interface comprises first data, wherein the first data is data acquired by the first application program.
S302, the user interaction module detects a first operation.
The first operation is for indicating to exit the first application.
S303, the user interaction module responds to the first operation to acquire the identification information of the first interface.
It should be appreciated that the first application may be displayed through a plurality of display interfaces. For example, an interface shown in (a) in fig. 7 and an interface shown in (c) in fig. 7. When the user enters the sports health App (first application program), the displayed interface is the interface shown in fig. 7 (a), that is, the first layer interface of the sports health App, and the user clicks the "distance" option to enter the interface shown in fig. 7 (c), that is, the second layer interface of the sports health App. The identification information may be used to indicate the number of layers of the first interface in the display interface corresponding to the first application program.
Illustratively, the identification information is "1", which may be used to indicate that the first interface is a first-layer interface as shown in (a) of fig. 7, and the identification information is "2", which may be used to indicate that the first interface is a second-layer interface as shown in (c) of fig. 7.
S304, the user interaction module sends the identification information to the Model module.
S305, the Model module stores the identification information.
It should be appreciated that the Model module may be generally used to store data and alert messages reported by the business module. In the embodiment of the application, the function that the Model module can store data is utilized, and the identification information is sent to the Model module for storage.
S306, the service module responds to the first operation to acquire second data.
After the first application program exits, the electronic device still stores threads corresponding to the first application program, and the threads can be used for triggering the sensor to collect data required to be collected by the first application program. The service module can call the thread, and trigger the related sensor to acquire second data on the basis of the first data.
S307, the business module sends the second data to the Model module.
S308, the Model module stores the second data.
S309, the user interaction module detects a second operation.
The second operation is for indicating to run the first application.
S310, the user interaction module responds to the second operation to acquire second data and identification information from the Model module.
S311, the user interaction module displays the second data on the first interface based on the identification information.
According to the application program switching method, when the first operation is detected, the user interaction module can respond to the first operation to acquire the identification information of the first interface, the identification information is sent to the Model module, the identification information is stored by utilizing the function of the Model module for storing data, then when the second operation is detected, the user interaction module can acquire the identification information and the second data from the Model module, the user interaction module can select the first interface from the display interfaces corresponding to the first application program based on the identification information, the second data is displayed on the first interface, so that the display interface is displayed when the first application program is reentered to display the second data, the display interface is displayed when the first application program is reentered, the effect of the first application program running in the background is further simulated, and the user experience is further improved.
Typically, the first application may also send a prompt to the user during the process of running the first application. In an electronic device applying an android system, when a first application program is transferred to a background operation, sending of prompt information to a user is usually stopped. In order to further simulate the effect of transferring the first application program to the background operation in the electronic equipment applying the first operating system, the Model module can intercept prompt information sent by the first application program based on the acquired data. This is explained in detail below by way of the embodiment shown in fig. 15.
Fig. 15 is a flowchart of a method for switching an application program according to another embodiment of the present application, as shown in fig. 15, where the method includes:
s401, the user interaction module displays a first interface.
The first interface comprises first data, wherein the first data is data acquired by the first application program.
S402, the user interaction module detects a first operation.
The first operation is for indicating to exit the first application.
S403, the user interaction module responds to the first operation to acquire the identification information of the first interface.
The identification information is used for indicating the number of layers of the first interface in the display interface corresponding to the first application program.
S404, the user interaction module sends the identification information to the Model module.
S405, the Model module stores the identification information.
It should be appreciated that the Model module may be generally used to store data and alert messages reported by the business module. In the embodiment of the application, the function that the Model module can store data is utilized, and the identification information is sent to the Model module for storage.
S406, the service module responds to the first operation to acquire second data.
After the first application program exits, the electronic device still stores threads corresponding to the first application program, and the threads can be used for triggering the sensor to collect data required to be collected by the first application program. The service module can call the thread, and trigger the related sensor to acquire second data on the basis of the first data. S407, the service module sends the second data and the prompt information to the Model module.
And S408, the Model module stops sending prompt information to the user interaction module.
It should be appreciated that when the first application program sends data to the Model module, the prompt message is typically sent to the Model module at the same time. In the conventional method, the Model module sends the prompt message to the user interaction module, and then outputs the prompt message to the user through the user interaction module. The prompt information may be output to the user in a voice playing manner, may be output in a vibration manner, or may be output to the user in a text information manner, which is not limited in the embodiment of the present application.
However, in the android system, when the first application program is shifted to the background operation, the output of the prompt information to the user is stopped. Therefore, in the embodiment of the application, the Model module actively stops sending the prompt information to the user interaction module, so as to avoid the user interaction module from outputting the prompt information to the user based on the prompt information.
In one possible case, the prompt information is output in a vibration mode. In general, the vibration of the electronic device needs to be driven by the motor to vibrate, so, in order to avoid outputting the prompt information to the user, the Model module may also control the motor in the electronic device to stop vibrating to stop outputting the prompt information to the user.
In the embodiment of the application, the electronic equipment further comprises a motor, the prompt information is output in a motor vibration mode, so that when the Model module receives the prompt information sent by the first application program, the Model module stops sending the prompt information to the user interaction module, and meanwhile, the motor in the electronic equipment is controlled to stop vibrating, so that the electronic equipment can stop outputting the prompt information to a user in an all-around mode, the situation that the prompt information is output to the user in a motor vibration mode when the prompt information is stopped on a display interface is avoided, the effect that the first application program is converted into a background operation is more accurately simulated in the electronic equipment adopting the first operating system, and the user experience is improved.
S409, the Model module stores the second data.
S410, the user interaction module detects a second operation.
The second operation is for indicating to run the first application.
S411, the user interaction module responds to the second operation to acquire second data and identification information from the Model module.
And S412, the user interaction module displays the second data on the first interface based on the identification information.
According to the application program switching method provided by the embodiment of the application program switching method, when the service module sends the second data to the Model module, the prompt information is sent to the Model module at the same time, when the Model module receives the second data and the prompt information, the second data is stored in the Model module, and the prompt information is stopped from being sent to the user interaction module, so that a channel for sending the prompt information to the user interaction module can be interrupted, the user interaction module can not output the prompt information, the effect that the first application program is transferred to the background operation can be simulated in the electronic equipment adopting the first operating system more accurately, and the user experience is improved.
It should be understood that, although the steps in the flowcharts in the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least a portion of the steps in the flowcharts may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order in which the sub-steps or stages are performed is not necessarily sequential, and may be performed in turn or alternately with at least a portion of the sub-steps or stages of other steps or other steps.
Fig. 16 is a schematic structural diagram of a switching device for application program according to an embodiment of the present application.
It should be understood that the switching device 600 of the application program may perform the switching method of the application program shown in fig. 6 to 15; the application switching device 600 includes: an acquisition unit 610 and a processing unit 620.
The processing unit 620 is configured to display a first interface, where the first interface includes first data, and the first data is data collected by a first application program;
the processing unit 620 is configured to detect a first operation, where the first operation is configured to instruct to exit the first application program;
the processing unit 620 is configured to obtain second data in response to the first operation, where the second data is data acquired by the electronic device based on the first data after the first application exits;
the processing unit 620 is configured to detect a second operation, where the second operation is configured to instruct to run the first application program;
the processing unit 620 is configured to display the second data in response to the second operation.
In one embodiment, the electronic device further includes a sample Model module, a user interaction module, and a service module, and the processing unit 620 is configured to control the service module to send the second data to the Model module;
the processing unit 620 is configured to control the Model module to store the second data;
The processing unit 620 is configured to control the user interaction module to obtain second data in the Model module in response to the second operation;
the processing unit 620 is configured to control the user interaction module to display the second data.
In one embodiment, the processing unit 620 is configured to control the user interaction module to obtain, in response to the first operation, identification information of the first interface, where the identification information is used to indicate the number of layers of the first interface in a display interface corresponding to the first application program;
the processing unit 620 is configured to control the user interaction module to send identification information to the Model module;
the processing unit 620 is configured to control the Model module to store the identification information.
In one embodiment, the processing unit 620 is configured to control the user interaction module to invoke the identification information stored in the Model module in response to the second operation;
the processing unit 620 is configured to control the user interaction module to display the second data on the first interface based on the identification information.
In one embodiment, the processing unit 620 is configured to control the service module to send the second data and the prompt information to the Model module, where the prompt information is configured to prompt the user for the second data;
the Model module stops sending prompt information to the user interaction module.
In one embodiment, the electronic device further includes a motor, the prompt information is output by means of vibration of the motor, and the processing unit 620 is configured to control the Model module to control the motor to stop vibrating.
In one embodiment, the first application comprises a sports health application.
In one embodiment, the electronic device comprises a smart watch or smart bracelet.
The application program switching device provided in this embodiment is used to execute the application program switching method in the foregoing embodiment, and the technical principle and the technical effect are similar and are not repeated herein.
The switching device 600 for application program is embodied as a functional unit. The term "unit" herein may be implemented in software and/or hardware, without specific limitation.
For example, a "unit" may be a software program, a hardware circuit or a combination of both that implements the functions described above. The hardware circuitry may include application specific integrated circuits (application specific integrated circuit, ASICs), electronic circuits, processors (e.g., shared, proprietary, or group processors, etc.) and memory for executing one or more software or firmware programs, merged logic circuits, and/or other suitable components that support the described functions.
Thus, the elements of the examples described in the embodiments of the present application can be implemented in electronic hardware, or in a combination of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
Fig. 17 shows a schematic structural diagram of an electronic device provided in the present application. The dashed line in fig. 17 indicates that the unit or the module is optional. The electronic device 700 may be used to implement the switching method of the application program described in the above method embodiments.
The electronic device 700 includes one or more processors 701, which one or more processors 701 may support the electronic device 700 to implement a method of switching applications in a method embodiment. The processor 701 may be a general-purpose processor or a special-purpose processor. For example, the processor 701 may be a central processing unit (central processingunit, CPU), digital signal processor (digital signalprocessor, DSP), application specific integrated circuit (applicationspecific integrated circuit, ASIC), field programmable gate array (fieldprogrammable gate array, FPGA), or other programmable logic device such as discrete gates, transistor logic, or discrete hardware components.
The processor 701 may be used to control the electronic device 700, execute a software program, and process data of the software program. The electronic device 700 may further comprise a communication unit 705 for enabling input (reception) and output (transmission) of signals.
For example, the electronic device 700 may be a chip, the communication unit 705 may be an input and/or output circuit of the chip, or the communication unit 705 may be a communication interface of the chip, which may be an integral part of a terminal device or other electronic device.
For another example, the electronic device 700 may be a terminal device, the communication unit 705 may be a transceiver of the terminal device, or the communication unit 705 may be a transceiver circuit of the terminal device.
The electronic device 700 may include one or more memories 702 having a program 704 stored thereon, the program 704 being executable by the processor 701 to generate instructions 703 such that the processor 701 performs the impedance matching method described in the above method embodiments according to the instructions 703.
Optionally, the memory 702 may also have data stored therein. Alternatively, processor 701 may also read data stored in memory 702, which may be stored at the same memory address as program 704, or which may be stored at a different memory address than program 704.
The processor 701 and the memory 702 may be provided separately or may be integrated together; for example, integrated on a System On Chip (SOC) of the terminal device.
Illustratively, the memory 702 may be used to store a related program 704 of the switching method of the application provided in the embodiment of the present application, and the processor 701 may be used to invoke the related program 704 of the switching method of the application stored in the memory 702 when switching of the application is performed, to execute the switching method of the application of the embodiment of the present application; comprising the following steps: displaying a first interface, wherein the first interface comprises first data, and the first data is data acquired by a first application program; detecting a first operation, wherein the first operation is used for indicating to exit the first application program; responding to the first operation, and acquiring second data, wherein the second data is acquired by the electronic equipment based on the first data after the first application program exits; detecting a second operation, wherein the second operation is used for indicating to run the first application program; in response to the second operation, second data is displayed.
The present application also provides a computer program product which, when executed by the processor 701, implements the method for switching application programs according to any of the method embodiments of the present application.
The computer program product may be stored in the memory 702, for example, the program 704, and the program 704 is finally converted into an executable object file capable of being executed by the processor 701 through preprocessing, compiling, assembling, and linking.
The present application also provides a computer-readable storage medium, on which a computer program is stored, which when executed by a computer implements the method for switching application programs according to any of the method embodiments of the present application. The computer program may be a high-level language program or an executable object program.
Such as memory 702. The memory 702 may be volatile memory or nonvolatile memory, or the memory 702 may include both volatile and nonvolatile memory. The nonvolatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable Programmable ROM (EPROM), an electrically erasable programmable ROM (electricallyEPROM, EEPROM), or a flash memory, among others. The volatile memory may be random access memory (randomaccess memory, RAM) which acts as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (ddr SDRAM), enhanced SDRAM (enhancedSDRAM, ESDRAM), synchronous DRAM (synchlinkDRAM, SLDRAM), and direct memory bus RAM (DRRAM).
In the present application, "at least one" means one or more, and "a plurality" means two or more. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b, or c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or plural.
It should be understood that, in various embodiments of the present application, the sequence numbers of the foregoing processes do not mean the order of execution, and the order of execution of the processes should be determined by the functions and internal logic thereof, and should not constitute any limitation on the implementation process of the embodiments of the present application.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the device embodiments described above are merely illustrative; for example, the division of the units is only one logic function division, and other division modes can be adopted in actual implementation; for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of 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.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. The method for switching the application program is characterized in that the method is applied to electronic equipment, the electronic equipment adopts a first operating system, the first operating system is a liteOS system, the liteOS system does not support background operation of the application program, the liteOS system comprises a sample Model module, a user interaction module and a service module, the Model module is used for storing data and prompt messages reported by the service module, the electronic equipment comprises a smart watch or a smart bracelet, and the method comprises the following steps:
displaying a first interface, wherein the first interface comprises first data, and the first data is acquired by a first application program;
Detecting a first operation for indicating to exit the first application;
responding to the first operation, the business module acquires second data, wherein the second data is data collected by the electronic equipment in an accumulated way on the basis of the first data after the first application program exits;
the business module sends the second data to the Model module;
storing the second data to the Model module;
detecting a second operation, wherein the second operation is used for indicating to run the first application program;
invoking the second data from the Model module and displaying the second data in response to the second operation; wherein said invoking said second data from said Model module and displaying said second data in response to said second operation comprises:
in response to the second operation, the user interaction module acquires the second data in the Model module;
and the user interaction module displays the second data.
2. The method of claim 1, wherein the second data is data obtained by determining a data type of the first data by the electronic device and collecting the data according to the data type after the first application exits.
3. The method according to claim 1, wherein the method further comprises:
the user interaction module responds to the first operation to obtain identification information of the first interface, wherein the identification information is used for indicating the number of layers of the first interface in a display interface corresponding to the first application program;
the user interaction module sends the identification information to the Model module;
the Model module stores the identification information.
4. A method according to claim 3, wherein said displaying said second data in response to said second operation comprises:
the user interaction module responds to the second operation and calls the identification information stored in the Model module;
and the user interaction module displays the second data on the first interface based on the identification information.
5. The method of claim 1, wherein the service module sending the second data to the Model module comprises:
the service module sends the second data and prompt information to the Model module, wherein the prompt information is used for prompting the second data to a user;
and the Model module stops sending the prompt information to the user interaction module.
6. The method of claim 5, further comprising a motor in the electronic device, wherein the alert message is output by way of vibration of the motor, and wherein the method further comprises:
the Model module controls the motor to stop vibrating.
7. The method of claim 1, wherein the first application comprises a sports health application.
8. An application switching device, characterized in that the device comprises a processor and a memory for storing a computer program, the processor being adapted to call and run the computer program from the memory, so that the device performs the method according to any one of claims 1 to 7.
9. An electronic device comprising a processor for coupling with a memory and reading instructions in the memory and, in accordance with the instructions, causing the electronic device to perform the method of any one of claims 1 to 7.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program, which when executed by a processor causes the processor to perform the method of any of claims 1 to 7.
CN202310122068.6A 2023-02-16 2023-02-16 Application program switching method and electronic equipment Active CN115827207B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310122068.6A CN115827207B (en) 2023-02-16 2023-02-16 Application program switching method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310122068.6A CN115827207B (en) 2023-02-16 2023-02-16 Application program switching method and electronic equipment

Publications (2)

Publication Number Publication Date
CN115827207A CN115827207A (en) 2023-03-21
CN115827207B true CN115827207B (en) 2023-07-14

Family

ID=85521570

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310122068.6A Active CN115827207B (en) 2023-02-16 2023-02-16 Application program switching method and electronic equipment

Country Status (1)

Country Link
CN (1) CN115827207B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022042326A1 (en) * 2020-08-31 2022-03-03 华为技术有限公司 Display control method and related apparatus

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150355825A1 (en) * 2014-06-05 2015-12-10 International Business Machines Corporation Recorded history feature in operating system windowing system
KR102446325B1 (en) * 2015-06-24 2022-09-22 삼성전자주식회사 Operating Method For Application Program and electronic device supporting the same
CN105183172A (en) * 2015-09-28 2015-12-23 联想(北京)有限公司 Information processing method and electronic equipment
CN106974656A (en) * 2016-01-15 2017-07-25 赵敏岗 For gathering motion state and carrying out the system and implementation method of real time contrast's correction

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022042326A1 (en) * 2020-08-31 2022-03-03 华为技术有限公司 Display control method and related apparatus

Also Published As

Publication number Publication date
CN115827207A (en) 2023-03-21

Similar Documents

Publication Publication Date Title
CN113704014B (en) Log acquisition system, method, electronic device and storage medium
CN115866121B (en) Application interface interaction method, electronic device and computer readable storage medium
CN111543042B (en) Notification message processing method and electronic equipment
CN111371938B (en) Fault detection method and electronic equipment
CN113704205B (en) Log storage method, chip, electronic device and readable storage medium
CN112087649B (en) Equipment searching method and electronic equipment
CN114070928B (en) Method for preventing false touch and electronic equipment
CN115129196A (en) Application icon display method and terminal
CN113688019B (en) Response time duration detection method and device
CN113641271A (en) Application window management method, terminal device and computer readable storage medium
CN111249728B (en) Image processing method, device and storage medium
CN113382156A (en) Pose acquisition method and device
CN116048831B (en) Target signal processing method and electronic equipment
CN115032640B (en) Gesture recognition method and terminal equipment
CN111104295A (en) Method and equipment for testing page loading process
CN115827207B (en) Application program switching method and electronic equipment
CN113380240B (en) Voice interaction method and electronic equipment
CN117009005A (en) Display method, automobile and electronic equipment
CN114637392A (en) Display method and electronic equipment
CN113467821A (en) Application program repairing method, device, equipment and readable storage medium
CN114740986A (en) Handwriting input display method and related equipment
CN116489272B (en) Voice message playing method and electronic equipment
CN116400974B (en) Method for entering long standby mode, electronic device and readable storage medium
CN115792431B (en) Abnormal position detection method and electronic equipment
CN115016666B (en) Touch processing method, terminal equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant