Application preloading method and device, storage medium and terminal
Abstract
The embodiments of the disclosure provide an Application (APP) preloading method and device, a storage medium and a terminal. The method includes that: when an APP preloading event is detected to be triggered, an APP to be preloaded is determined; whether a first APP which is being started in foreground exists or not is judged; and if NO, the APP to be preloaded is preloaded. According to the application, with adoption of the technical solution, not only low speed and non-fluency, caused by preloading the APP, for starting of the APP in foreground may be effectively avoided, but also a speed of preloading the APP to be preloaded may be effectively increased, so that a speed of starting the APP to be preloaded may be increased.
Claims
exact text as granted — not AI-modifiedThe invention claimed is:
1. A method for Application (APP) preloading, comprising:
determining, in response to detecting that an APP preloading event is triggered, an APP to be preloaded;
judging whether a first APP which is being started in foreground exists or not; and
in response to determining that the first APP which is not being started in foreground preloading, based on a preloading Activity stack which is pre-created in an Android system, an APP interface corresponding to the APP to be preloaded, a boundary coordinate of the preloading Activity stack being located outside a coordinate range of a display screen;
migrating, in response to receiving an instruction for starting a target APP in the APP to be preloaded, an APP interface corresponding to the target APP in the preloading Activity stack to the display screen for displaying; and
sending a falsified focus notification to the APP to be preloaded, and keeping performing continuous drawing and displaying updating on the APP interface corresponding to the APP to be preloaded in a preset time period based on the falsified focus notification, so that when the APP to be preloaded is started, a home page of the APP or other interfaces operable for the user is directly accessible.
2. The method of claim 1 , further comprising:
forbidding, in response to determining that the first APP which is being started in foreground exists, preloading the APP to be preloaded.
3. The method of claim 1 , wherein judging whether the first APP which is being started in foreground exists or not comprises:
judging whether the first APP in a starting stage exists in foreground or not, wherein the starting stage is from an initial starting moment of the first APP to a complete display moment of a display interface of the first APP.
4. The method of claim 1 , further comprising:
during a process of preloading the APP to be preloaded, terminating preloading the APP to be preloaded and releasing a preloaded starting resource corresponding to the APP to be preloaded, in response to detecting that a starting event of a foreground APP is triggered.
5. The method of claim 4 , wherein releasing the preloaded starting resource corresponding to the APP to be preloaded comprises:
releasing an active window exclusive lock occupied by the APP to be preloaded.
6. The method of claim 1 , wherein
the migrating the APP interface corresponding to the target APP in the preloading Activity stack to the display screen for displaying comprises:
migrating a task stack corresponding to the target APP in the preloading Activity stack to a top of an APP Activity stack; and
updating size information, configuration information and visibility of the task stack to display the APP interface corresponding to the target APP in the display screen.
7. A device for Application (APP) preloading, comprising:
a memory for storing a computer program; and
a processor, wherein the processor is configured to execute the computer program to implement steps of:
determining, in response to detecting that an APP preloading event is triggered, an APP to be preloaded;
judging whether a first APP which is being started in foreground exists or not; and
in a case that the first APP which is not being started in foreground, preloading, based on a preloading Activity stack which is pre-created in an Android system, an APP interface corresponding to the APP to be preloaded, a boundary coordinate of the preloading Activity stack being located outside a coordinate range of a display screen;
migrating, in response to receiving an instruction for starting a target APP in the APP to be preloaded, an APP interface corresponding to the target APP in the preloading Activity stack to the display screen for displaying; and
sending a falsified focus notification to the APP to be preloaded, and keeping performing continuous drawing and displaying updating on the APP interface corresponding to the APP to be preloaded in a preset time period based on the falsified focus notification, so that when the APP to be preloaded is started, a home page of the APP or other interfaces operable for the user is directly accessible.
8. The device of claim 7 , wherein the processor is further configured to execute the computer program to implement a step of:
forbidding, in response to determining that the first APP which is being started in foreground exists, preloading the APP to be preloaded.
9. The device of claim 7 , wherein the processor is configured to execute the computer program to further implement a step of:
judging whether the first APP in the starting stage exists in foreground or not, wherein the starting stage is from an initial starting moment of the first APP to a complete display moment of a display interface of the first APP.
10. The device of claim 7 , wherein the processor is further configured to execute the computer program to implement a step of:
during a process of preloading the APP to be preloaded, terminating, in response to detecting that a starting event of a foreground APP is triggered, the preloading the APP to be preloaded and releasing a preloaded starting resource corresponding to the APP to be preloaded.
11. The device of claim 10 , wherein the processor is configured to execute the computer program to further implement a step of:
releasing an active window exclusive lock occupied by the APP to be preloaded.
12. The device of 8 , wherein
the migrating the APP interface corresponding to the target APP in the preloading Activity stack to the display screen for displaying comprises:
migrating a task stack corresponding to the target APP in the preloading Activity stack to a top of an APP Activity stack; and
updating size information, configuration information and visibility of the task stack to display the APP interface corresponding to the target APP in the display screen.
13. A non-transitory computer-readable storage medium, in which a computer program is stored, wherein the computer program is executable by a processor to implement a method for Application (APP) preloading, the method comprising:
determining, in response to detecting that an APP preloading event is triggered, an APP to be preloaded;
judging whether a first APP which is being started in foreground exists or not; and
in response to determining that the first APP which is not being started in foreground, preloading, based on a preloading Activity stack which is pre-created in an Android system, an APP interface corresponding to the APP to be preloaded, a boundary coordinate of the preloading Activity stack being located outside a coordinate range of a display screen;
migrating, in response to receiving an instruction for starting a target APP in the APP to be preloaded, an APP interface corresponding to the target APP in the preloading Activity stack to the display screen for displaying; and
sending a falsified focus notification to the APP to be preloaded, and keeping performing continuous drawing and displaying updating on the APP interface corresponding to the APP to be preloaded in a preset time period based on the falsified focus notification, so that when the APP to be preloaded is started, a home page of the APP or other interfaces operable for the user is directly accessible.
14. A terminal, having the device for Application (APP) preloading of claim 7 .
15. The terminal of claim 14 , further comprising a circuit board, wherein the memory and the processor are arranged on the circuit board.
16. The terminal of claim 14 , further comprising a power circuit for providing power to each circuit of the terminal.
17. The terminal of claim 14 , further comprising at least one of:
a peripheral interface, a Radio Frequency (RF) circuit, an audio circuit, a speaker, a power management chip, an I/O subsystem, an input/control device, a touch screen, or an external port.
18. The terminal of claim 15 , further comprising a shell, wherein the circuit board is arranged in a space enclosed by the shell.Join the waitlist — get patent alerts
Track US11467855B2 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.