Application collaborative starting method, computer equipment and storage medium
By integrating push notification correction, UI initialization, and network monitoring during iOS app startup, user experience issues during the app startup phase are resolved, enabling fast startup and consistent prompts, thus improving user response speed and experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN LEAGSOFT TECH
- Filing Date
- 2026-01-16
- Publication Date
- 2026-04-24
AI Technical Summary
In iOS application development, the lack of coordinated integration of push notification correction, interface initialization, and hotspot monitoring during the application startup phase leads to user experience issues such as incorrect badges, delayed interface rendering, failure to provide timely feedback on network status, and inconsistent external wake-up paths.
By registering a remote push service when the application starts, performing badge correction, creating the application's main window and initializing the root view controller, setting up a top notification component, registering a network hotspot listener, and establishing their linkage, the system ensures that prompts are triggered in real time when the network status changes.
It achieves a solution for fast application startup, accurate status, timely prompts, and consistent user experience, improving user response speed and experience continuity, and avoiding status update competition and interface rendering delays.
Smart Images

Figure CN121924166A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of terminal application startup technology, and in particular to an application collaborative startup method, computer device and storage medium. Background Technology
[0002] In iOS app development, the app startup phase typically requires parallel processing of multiple tasks, including handling remote push notifications, monitoring network conditions, and initializing the user interface. Currently, these functions are mostly implemented as independent modules, executing separately at different stages of the app's lifecycle. This decentralized approach can easily lead to several issues that negatively impact user experience.
[0003] When an application cold starts due to remote push notifications, a lack of coordination between badge management and message notification logic can lead to incorrect badge counting or duplicate pop-ups. Furthermore, if window and navigation controller initialization is not prioritized, it can cause UI rendering delays during startup, resulting in noticeable black or white screens. Moreover, there is often a lack of coordination between network hotspot monitoring and the top notification component used to alert users, preventing timely and effective communication of network status changes. Finally, when the application is launched via external links, its internal page routing and login logic may differ from the normal startup path, leading to a fragmented user experience.
[0004] Therefore, existing technologies lack effective coordination and integration of key tasks during the startup phase, resulting in user experience defects in areas such as push notification processing, interface loading, network status awareness, and external invocation. Summary of the Invention
[0005] This invention provides an application collaborative startup method, a computer device, and a storage medium. The technical problem it aims to solve is: how to provide a complete solution that can uniformly coordinate push correction, interface initialization, and hotspot monitoring during the application startup phase, thereby achieving fast startup, accurate status, timely prompts, and a consistent user experience.
[0006] In a first aspect, embodiments of the present invention provide an application collaborative startup method, comprising: Register the remote push service when the application starts, and perform subscript correction when it is determined that this startup is a cold start based on remote push messages; Create the application's main window, initialize the root view controller, set the root view controller as the root view controller of the application's main window, and display the application's main window; Initialize the top notification component, which is used to display prompt information at the top of the application interface; Register a network hotspot listener, which is used to monitor changes in the network status of the device; Establish a linkage between the network hotspot listener and the top notification component. When the network hotspot listener detects a network status change event of a preset type, it triggers the top notification component to display a prompt message corresponding to the network status change event.
[0007] Optionally, performing superscript correction includes: Retrieve the index correction value associated with the remote push message that triggered this startup; Set the count of the application icon badges to the badge correction value.
[0008] Optionally, the first UI rendering of the application's main window is completed after the application's main window is displayed, and before the application initiates any network data requests or performs any background initialization tasks unrelated to UI rendering.
[0009] Optionally, the preset type of network status change event is a device accessing a wireless network hotspot that requires authentication; The registered network hotspot listener includes: listening to network status change notifications issued by the system; when the network status changes to a wireless network that requires web page authentication or specific account authentication, it is determined that the preset type of network status change event has been detected.
[0010] Optionally, the method further includes: Listen for lifecycle events when the application switches from the background to the foreground; When the application switches from the background to the foreground lifecycle event is detected, the system interface is called to obtain the current wireless network connection information; The current wireless network connection information is announced via an in-application broadcast mechanism.
[0011] Optionally, the method further includes: Provides a unified interface for handling external invocation requests; When an external wake-up request is received through the unified interface, the target routing information contained in the external wake-up request is parsed. The steps are as follows: create the application main window, initialize the root view controller, set the root view controller as the root view controller of the application main window, and display the application main window; Based on the target routing information, page navigation logic is executed through the root view controller of the application's main window, wherein the page navigation logic is consistent with the login and page navigation logic executed when the application is launched normally via the application icon.
[0012] Optionally, initializing the top notification component includes configuring the display style, display duration, and closing method of the top notification component; wherein, the closing method includes automatically closing after the display duration has been reached, and manually closing in response to the user's operation of the close control.
[0013] Optionally, the method further includes: In a cold start scenario based on remote push messages, the prompt pop-up associated with the remote push message should only pop up once; Register background tasks for the application and set expiration conditions for those background tasks; When the task expiration condition is detected, the execution of the background task is terminated.
[0014] Secondly, embodiments of the present invention also provide a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method.
[0015] Thirdly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the above-described method.
[0016] This invention provides an application collaborative startup method, a computer device, and a storage medium. The method includes: registering a remote push service when the application starts, and performing badge correction when the startup is determined to be a cold start based on a remote push message; creating an application main window, initializing a root view controller, setting the root view controller as the root view controller of the application main window, and displaying the application main window; initializing a top notification component, which displays a prompt message at the top of the application interface; registering a network hotspot listener, which monitors changes in the device's network status; and establishing a linkage between the network hotspot listener and the top notification component, whereby when the network hotspot listener detects a network status change event of a preset type, the top notification component is triggered to display a prompt message corresponding to the network status change event. In this invention, by identifying the startup cause and performing correction at the startup source, badge management logic is centralized at a single execution point, avoiding potential state update competition or sequence errors caused by logic being scattered in multiple places, and ensuring consistency between the application's external badge indication and internal processing status. Furthermore, by placing window creation and display at the forefront of the initialization sequence, the priority of interface presentation is established, enabling visual interface elements to load and render as early as possible. This effectively shortens the time interval from startup to interface availability, improving the user's perception of application responsiveness. Furthermore, by establishing a direct event-driven link from network status monitoring to user interface prompts, seamless integration between background system events and front-end user perception is achieved. When specific changes occur in the network environment, this mechanism can automatically trigger high-priority visual prompts, overcoming the disconnect between system status changes and user interface feedback, enhancing the application's proactive notification capabilities and the consistency of the user experience. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart illustrating an application collaborative startup method provided in an embodiment of the present invention; Figure 2 This is a schematic block diagram of a computer device provided in an embodiment of the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0021] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0022] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0023] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."
[0024] Please see Figure 1 This invention provides an application collaborative startup method, which includes the following steps: S1 registers the remote push service when the application starts, and performs badge correction when it is determined that this startup is a cold start based on remote push messages.
[0025] In practice, upon application startup, the first step is to register for the remote push service. This is achieved by calling the operating system's application programming interface (API), enabling the application to receive remote notification messages from the server. Subsequently, startup reason determination logic is executed, analyzing the context information of this startup process. If the analysis determines that this startup is a cold start triggered by the user clicking on a remote push message, then a badge correction operation is performed.
[0026] Furthermore, in some preferred embodiments, performing badge correction includes: obtaining a badge correction value associated with the remote push message that triggered this launch; and setting the count of the application icon badges to the badge correction value.
[0027] In practice, the badge correction process includes two sequentially executed sub-steps. The first step is to obtain the badge correction value associated with the remote push message that triggered this startup. This badge correction value can be obtained by: parsing a predefined numerical field representing the badge count from the payload data of the remote push message associated with this cold start; or by dynamically determining an updated value for the badge based on the type, content, or internal application business rules of the push message. The second step is to set the application icon badge count to the badge correction value. This is achieved by calling the application programming interface (API) provided by the operating system for managing the displayed application icon badge values. This API receives an integer parameter and sets it as the badge number displayed in the upper right corner of the application icon.
[0028] This embodiment achieves precision and source control in badge management. By directly extracting or deriving a specific badge value from the remote push message that triggered the current launch, and using this as the sole basis for badge setting, it ensures that the information conveyed by the badge strictly corresponds to the context of the current user interaction. This fundamentally avoids potential value accumulation errors or state inconsistencies caused by badge update logic being scattered across multiple stages of the application lifecycle. For example, it prevents the badge from not being cleared after the user clicks on a notification to view a message due to subsequent logical interference, thus ensuring a high degree of synchronization between external badge indications and the user's actual processing status, and improving the accuracy of status feedback.
[0029] S2, create the application main window, initialize the root view controller, set the root view controller as the root view controller of the application main window, and display the application main window.
[0030] In practice, creating the application's main window involves instantiating a window object representing the application's main interface and configuring its size attributes to match the display device. Then, the root view controller is initialized. This root view controller, as the foundation and starting point of the application's view hierarchy, is responsible for managing the presentation and navigation of the first user interface. After initialization, this root view controller is set as the root view controller of the application's main window, thus establishing the view control hierarchy. Finally, a display command is executed, making the application's main window visible and ready to receive user interaction.
[0031] In some preferred embodiments, the initial rendering of the application's main window is completed after the application's main window is displayed, and before the application initiates any network data requests or performs any background initialization tasks unrelated to interface rendering.
[0032] In practice, after the application's main window becomes visible via a system call, the application enters the initialization phase. This embodiment of the invention requires that, after the application's main window is displayed, but before the application performs any operation requiring requests to an external network and waiting for data returns, or before the application begins executing any background resource loading or data calculation tasks that do not directly participate in rendering the current window's interface content, the application's main window must complete its initial interface rendering. Initial interface rendering completion means that the view hierarchy managed by the window's root view controller has completed its initial layout calculation and graphics drawing cycle and submitted the final pixel image to the display frame buffer. Specifically, this can be achieved by immediately scheduling and prioritizing the view controller's view loading and layout process after the window is displayed, while delaying asynchronous or synchronous non-interface tasks that might block the main thread.
[0033] This embodiment significantly improves the user's subjective perception of startup speed by optimizing the task execution priority strategy. By mandating that the initial visual presentation of a window must take precedence over all network access and background initialization tasks, this method ensures that user interface rendering receives the highest CPU and GPU scheduling priority. This guarantees the immediacy of visual feedback at the system scheduling level, allowing applications to output interactive or browsable interfaces to the user as the first response, even if the application's internal data layer is not yet ready. This strategy directly eliminates interface rendering queue blocking caused by network round-trip delays or complex preprocessing calculations, thereby minimizing the user-perceived startup wait time, reducing user waiting time, and improving the user experience.
[0034] S3, Initialize the top notification component, which is used to display prompt information at the top of the application interface.
[0035] In practice, the top notification component is initialized. This initialization process includes allocating memory space, setting its initial state to hidden, and preparing necessary user interface elements, such as text label containers. This top notification component is designed to attach to the top area of the application's main window to dynamically display various text or graphical prompts.
[0036] In some preferred embodiments, initializing the top notification component includes configuring the display style, display duration, and closing method of the top notification component; wherein, the closing method includes automatically closing after the display duration has been reached, and manually closing in response to the user's operation of the close control.
[0037] In specific implementation, initializing the top notification component involves setting several configurable attributes of the component. First, the display style is configured, which involves defining the component's visual presentation characteristics, such as the color of its background area, the font size and color of the internal text, any included icons, and the overall geometric shape and visual effect parameters. Next, the display duration is configured, which sets a default threshold for the duration from initial display to automatic disappearance. Finally, the closing method is configured. The closing method includes two mechanisms: the first is an automatic closing mechanism, where the system automatically triggers a hiding animation to remove the component from the interface when the component's display duration reaches the configured display duration threshold; the second is a manual closing mechanism, where an interactive close control is provided on the component, and user touch event handling logic is bound to this control. When a user's touch operation on the control is detected, the hiding animation is immediately executed, closing the notification component.
[0038] This embodiment endows the top notification component with a high degree of adaptability and user-friendliness. By parametrically configuring the display style, the top notification component can flexibly adapt to the design languages of different applications or differentiate messages of varying importance, enhancing visual appeal and contextual relevance. Furthermore, configuring the display duration and introducing an automatic closing mechanism follows the design principle of temporary information prompts. While ensuring effective information delivery, it avoids the prompt element occupying screen space for extended periods, thus preventing interference with main interface operations and maintaining interface cleanliness. Moreover, providing a manual closing option respects the user's immediate control over the interface content, allowing for immediate feedback when the user wishes to clear the notification.
[0039] S4, Register a network hotspot listener, which is used to monitor changes in the network status of the device.
[0040] In practice, a network hotspot listener is registered, which is achieved by subscribing to change notifications from the operating system's network status monitoring service. The network hotspot listener is configured to run continuously in the background, listening for changes in the network connection status of devices, such as the connection, disconnection, or attribute changes of wireless network interfaces.
[0041] S5. Establish the linkage between the network hotspot listener and the top notification component. When the network hotspot listener detects a network status change event of a preset type, it triggers the top notification component to display a prompt message corresponding to the network status change event.
[0042] In practice, a linkage is established between the network hotspot listener and the top notification component. This is achieved by embedding logic code that calls the top notification component's display function within the listener's state change event callback function. Specifically, a type of network state change event that requires user awareness is preset for the network hotspot listener; when the listener detects such a user-aware network state change event, its callback function is triggered. This callback function then generates or retrieves the corresponding prompt information and calls the top notification component's interface display method, thereby presenting the prompt at the top of the application interface.
[0043] In this embodiment of the invention, by identifying and correcting the startup cause at the startup source, the badge management logic is centralized at a single execution point, avoiding potential state update competition or sequence disorder caused by logic being scattered in multiple places, thus ensuring the consistency between the application's external badge indication and internal processing state. Furthermore, by placing window creation and display at the forefront of the initialization sequence, the priority of interface presentation is established, enabling visual interface elements to complete loading and rendering as early as possible, thereby effectively shortening the time interval from startup to interface availability and improving the user's perception of application response speed. Furthermore, by establishing a direct event-driven link from network status monitoring to user interface prompts, seamless connection between background system events and front-end user perception is achieved. When specific changes occur in the network environment, this mechanism can automatically trigger high-priority visual prompts, overcoming the disconnect between system state changes and user interface feedback, enhancing the application's proactive notification capabilities and the consistency of the user experience.
[0044] In some preferred embodiments, the preset type of network status change event is a device accessing a wireless network hotspot that requires authentication; the registered network hotspot listener includes: listening to network status change notifications issued by the system, and when the listened network status changes to a device accessing a wireless network that requires web page authentication or specific account authentication, it is determined that the preset type of network status change event has been detected.
[0045] In specific implementation, firstly, a network status change event of a preset type is explicitly defined as an event where the device accesses a wireless network hotspot requiring authentication. Specifically, the step of registering a network hotspot listener includes continuously listening for system-level notifications issued by the operating system regarding changes in network paths or connection states. When the listener captures a notification of a network status change, such as detecting a new wireless network interface connection, it further analyzes the network attributes of the new connection. Specifically, when the analysis results indicate that the wireless network currently accessed by the device is identified as requiring additional authentication by the user (e.g., requiring redirection to a webpage for login, or requiring the input of a specific username and password) to obtain full internet access, the logic in this embodiment determines that the preset type of network status change event has been detected.
[0046] This embodiment achieves intelligent filtering and precise scenario-based triggering of network status prompts. By changing the triggering conditions from general network connectivity to precisely defining them as specific scenarios such as accessing an authentication network requiring additional user interaction, this method greatly improves the relevance of the prompts. This ensures that the top notification component is activated only when the user faces critical moments of network availability congestion, thus avoiding the interference caused by sending prompts to the user every time they switch Wi-Fi or mobile data.
[0047] In some preferred embodiments, the method further includes: listening to the lifecycle event of the application switching from the background to the foreground; when the lifecycle event of the application switching from the background to the foreground is detected, calling a system interface to obtain the current wireless network connection information; and notifying the user of the current wireless network connection information through an in-application broadcast mechanism.
[0048] In practice, firstly, the system listens for lifecycle events when the application switches from the background to the foreground. This is achieved by subscribing to relevant application state change notifications in the mobile operating system, such as subscribing to notifications when the application enters an active state. When the lifecycle event is detected, i.e., the application switches from a background inactive state to a foreground active state, the following steps are executed: The system calls the network information query interface provided by the operating system to obtain detailed information about the currently active wireless network connection, such as network name and security type. Finally, the obtained current wireless network connection information is published through the application's in-app message broadcasting mechanism. Specifically, a message object containing this network information is created and sent to a centralized message distributor within the application. All internal modules interested in this information can pre-register to receive such messages.
[0049] This embodiment ensures the real-time and global consistency of the application's internal network state awareness, providing a reliable data foundation for functions that rely on network state. When an application switches from background to foreground, its internally maintained network state cache may deviate from the actual device connection state. By proactively querying the system for the latest network connection information at this critical juncture and immediately broadcasting it internally, this method forces a state synchronization, enabling all components or services within the application to make decisions based on the same accurate and timely connection information. This provides a solid data guarantee for the aforementioned network monitoring and notification linkage mechanism, preventing error messages or functional logic misjudgments that may be caused by delayed state information updates, thereby enhancing the overall behavioral accuracy and robustness of the application in network state-sensitive scenarios.
[0050] In some preferred embodiments, the method further includes: providing a unified interface for processing external wake-up requests; when an external wake-up request is received through the unified interface, parsing the target routing information contained in the external wake-up request; executing the steps of creating an application main window, initializing a root view controller, setting the root view controller as the root view controller of the application main window, and displaying the application main window; and executing page navigation logic through the root view controller of the application main window according to the target routing information, wherein the page navigation logic is consistent with the login and page navigation logic executed when the application is launched normally through the application icon.
[0051] In practice, firstly, a unified interface for handling external invocation requests is provided. In mobile operating systems, this is accomplished by implementing specific entry point functions or methods that are called back by the system to respond to launch requests from other applications or the system. When an external invocation request is received through this unified interface, the data carried in the request is first parsed to extract the target routing information. This target routing information is typically encoded in a standardized format and needs to be decoded into a destination identifier or parameter set that the application can recognize. Further, the steps of creating the application's main window, initializing the root view controller, setting the root controller, and displaying the window are executed to ensure a standardized and consistent user interface infrastructure for subsequent interactions. Finally, based on the parsed target routing information, the corresponding page navigation and presentation operations are executed through the navigation logic managed by the root view controller of the application's main window. The entire navigation logic here, including any authentication checks and view switching sequences, is designed to be completely consistent with the path experienced when launching the application normally via the home screen icon.
[0052] This embodiment normalizes and standardizes the multi-entry experience of an application, eliminating the fragmentation of interaction paths caused by differences in entry points. Regardless of the external channel a user enters the application—such as through push notifications, browser links, or sharing from other applications—this method ensures that the core navigation flow the user subsequently encounters is consistent and predictable. This is achieved by directing all external invocation requests to a common interface initialization and routing pipeline. The direct benefit is a significantly enhanced consistency and predictability of the user experience. Users will not encounter different login processes, page levels, or functional states due to different launch methods, thereby improving the professionalism and overall smoothness of the application in different usage scenarios.
[0053] In some preferred embodiments, the method further includes: in a cold start scenario based on a remote push message, controlling the pop-up window associated with the remote push message to pop up only once; registering a background task for the application and setting a task expiration condition for the background task; and terminating the execution of the background task when the task expiration condition is detected to be met.
[0054] In specific implementation, firstly, in a cold start scenario based on remote push messages, the pop-up notification associated with the remote push message is controlled to pop up only once. This can be achieved by setting a status flag uniquely associated with this push message in the application startup initialization logic. When a push cold start is determined and flag correction is performed, the flag is immediately set to the processed state, so that any subsequent code logic that might trigger the pop-up again will check the flag before execution and thus be prevented.
[0055] Furthermore, register the application's background tasks. This is typically done when the application starts or enters the background by calling the background task request interface provided by the operating system, declaring to the system a unit of work that needs to continue to execute in the background for a limited time.
[0056] Furthermore, a task expiration condition is set for the background task. This expiration condition is typically related to the background execution time budget allocated by the system, and is defined by registering an expiration handling function when the background task is requested, which is then called back by the system when the time is about to expire.
[0057] Furthermore, when the task expiration condition is detected, i.e., when the system calls the expiration handling function, the logic for terminating the background task is executed within the expiration handling function. This includes calling the corresponding background task termination interface to notify the system that the task has been completed or needs to be terminated, and performing necessary resource release and state cleanup operations to ensure that the application complies with the operating system's background resource usage specifications.
[0058] In this embodiment, the push notification pop-up is controlled to appear only once, directly addressing the issue of users being repeatedly disturbed by the same information in high-frequency scenarios such as push notification cold starts due to complex event processing chains or repetitive logic. This reflects the principle of minimizing user interference. Simultaneously, proactive and clearly defined lifecycle management of background tasks follows the design philosophy of mobile operating systems' strict control over background resources. This ensures that the application can complete necessary background processing within the system's allowable scope, and can promptly and gracefully exit the background execution state when system resources are strained. This avoids the application process being forcibly terminated by the system, additional battery consumption, or performance warnings that may result from improper background behavior, thereby guaranteeing the long-term stability of the application and system friendliness.
[0059] Please see Figure 2 , Figure 2 This is a schematic block diagram of a computer device provided in an embodiment of this application. The computer device 500 can be a terminal or a server, wherein the server can be a standalone server or a server cluster composed of multiple servers.
[0060] The computer device 500 includes a processor 502, a memory, and a network interface 505 connected via a system bus 501. The memory may include a non-volatile storage medium 503 and internal memory 504.
[0061] The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, it causes the processor 502 to execute an application co-starting method.
[0062] The processor 502 provides computing and control capabilities to support the operation of the entire computer device 500.
[0063] The internal memory 504 provides an environment for the execution of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute an application co-starting method.
[0064] The network interface 505 is used for network communication with other devices. Those skilled in the art will understand that the above structure is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 500 to which the present application is applied. A specific computer device 500 may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements.
[0065] The processor 502 is used to run a computer program 5032 stored in the memory to perform the following steps: Register the remote push service when the application starts, and perform subscript correction when it is determined that this startup is a cold start based on remote push messages; Create the application's main window, initialize the root view controller, set the root view controller as the root view controller of the application's main window, and display the application's main window; Initialize the top notification component, which is used to display prompt information at the top of the application interface; Register a network hotspot listener, which is used to monitor changes in the network status of the device; Establish a linkage between the network hotspot listener and the top notification component. When the network hotspot listener detects a network status change event of a preset type, it triggers the top notification component to display a prompt message corresponding to the network status change event.
[0066] Optionally, performing superscript correction includes: Retrieve the index correction value associated with the remote push message that triggered this startup; Set the count of the application icon badges to the badge correction value.
[0067] Optionally, the first UI rendering of the application's main window is completed after the application's main window is displayed, and before the application initiates any network data requests or performs any background initialization tasks unrelated to UI rendering.
[0068] Optionally, the preset type of network status change event is a device accessing a wireless network hotspot that requires authentication; The registered network hotspot listener includes: listening to network status change notifications issued by the system; when the network status changes to a wireless network that requires web page authentication or specific account authentication, it is determined that the preset type of network status change event has been detected.
[0069] Optionally, the method further includes: Listen for lifecycle events when the application switches from the background to the foreground; When the application switches from the background to the foreground lifecycle event is detected, the system interface is called to obtain the current wireless network connection information; The current wireless network connection information is announced via an in-application broadcast mechanism.
[0070] Optionally, the method further includes: Provides a unified interface for handling external invocation requests; When an external wake-up request is received through the unified interface, the target routing information contained in the external wake-up request is parsed. The steps are as follows: create the application main window, initialize the root view controller, set the root view controller as the root view controller of the application main window, and display the application main window; Based on the target routing information, page navigation logic is executed through the root view controller of the application's main window, wherein the page navigation logic is consistent with the login and page navigation logic executed when the application is launched normally via the application icon.
[0071] Optionally, initializing the top notification component includes configuring the display style, display duration, and closing method of the top notification component; wherein, the closing method includes automatically closing after the display duration has been reached, and manually closing in response to the user's operation of the close control.
[0072] Optionally, the method further includes: In a cold start scenario based on remote push messages, the prompt pop-up associated with the remote push message should only pop up once; Register background tasks for the application and set expiration conditions for those background tasks; When the task expiration condition is detected, the execution of the background task is terminated.
[0073] It should be understood that in the embodiments of this application, the processor 502 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0074] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program may be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.
[0075] Therefore, the present invention also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program. When executed by a processor, the computer program causes the processor to perform the following steps: Register the remote push service when the application starts, and perform subscript correction when it is determined that this startup is a cold start based on remote push messages; Create the application's main window, initialize the root view controller, set the root view controller as the root view controller of the application's main window, and display the application's main window; Initialize the top notification component, which is used to display prompt information at the top of the application interface; Register a network hotspot listener, which is used to monitor changes in the network status of the device; Establish a linkage between the network hotspot listener and the top notification component. When the network hotspot listener detects a network status change event of a preset type, it triggers the top notification component to display a prompt message corresponding to the network status change event.
[0076] Optionally, performing superscript correction includes: Retrieve the index correction value associated with the remote push message that triggered this startup; Set the count of the application icon badges to the badge correction value.
[0077] Optionally, the first UI rendering of the application's main window is completed after the application's main window is displayed, and before the application initiates any network data requests or performs any background initialization tasks unrelated to UI rendering.
[0078] Optionally, the preset type of network status change event is a device accessing a wireless network hotspot that requires authentication; The registered network hotspot listener includes: listening to network status change notifications issued by the system; when the network status changes to a wireless network that requires web page authentication or specific account authentication, it is determined that the preset type of network status change event has been detected.
[0079] Optionally, the method further includes: Listen for lifecycle events when the application switches from the background to the foreground; When the application switches from the background to the foreground lifecycle event is detected, the system interface is called to obtain the current wireless network connection information; The current wireless network connection information is announced via an in-application broadcast mechanism.
[0080] Optionally, the method further includes: Provides a unified interface for handling external invocation requests; When an external wake-up request is received through the unified interface, the target routing information contained in the external wake-up request is parsed. The steps are as follows: create the application main window, initialize the root view controller, set the root view controller as the root view controller of the application main window, and display the application main window; Based on the target routing information, page navigation logic is executed through the root view controller of the application's main window, wherein the page navigation logic is consistent with the login and page navigation logic executed when the application is launched normally via the application icon.
[0081] Optionally, initializing the top notification component includes configuring the display style, display duration, and closing method of the top notification component; wherein, the closing method includes automatically closing after the display duration has been reached, and manually closing in response to the user's operation of the close control.
[0082] Optionally, the method further includes: In a cold start scenario based on remote push messages, the prompt pop-up associated with the remote push message should only pop up once; Register background tasks for the application and set expiration conditions for those background tasks; When the task expiration condition is detected, the execution of the background task is terminated.
[0083] The storage medium is a physical, non-transient storage medium, such as a USB flash drive, external hard drive, read-only memory (ROM), magnetic disk, or optical disk, or any other physical storage medium capable of storing program code. The computer-readable storage medium can be non-volatile or volatile.
[0084] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0085] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0086] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the device of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0087] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0088] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0089] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Since these modifications and variations fall within the scope of the claims and their equivalents, this invention also intends to include these modifications and variations.
[0090] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for collaborative startup, characterized in that, include: Register the remote push service when the application starts, and perform subscript correction when it is determined that this startup is a cold start based on remote push messages; Create the application's main window, initialize the root view controller, set the root view controller as the root view controller of the application's main window, and display the application's main window; Initialize the top notification component, which is used to display prompt information at the top of the application interface; Register a network hotspot listener, which is used to monitor changes in the network status of the device; Establish a linkage relationship between the network hotspot listener and the top notification component. When the network hotspot listener detects a network status change event of a preset type, it triggers the top notification component to display a prompt message corresponding to the network status change event.
2. The application collaborative startup method according to claim 1, characterized in that, The execution of superscript correction includes: Retrieve the index correction value associated with the remote push message that triggered this startup; Set the app icon badge count to the badge correction value.
3. The application collaborative startup method according to claim 1, characterized in that, The first rendering of the application's main window is completed after the application's main window is displayed, and before the application initiates any network data requests or performs any background initialization tasks unrelated to interface rendering.
4. The application collaborative startup method according to claim 1, characterized in that, The preset type of network status change event is an event where the device accesses a wireless network hotspot that requires authentication; The registered network hotspot listener includes: listening to network status change notifications issued by the system; when the network status changes to a wireless network that requires web page authentication or specific account authentication, it is determined that the preset type of network status change event has been detected.
5. The application collaborative startup method according to claim 1, characterized in that, The method further includes: Listen for lifecycle events when the application switches from the background to the foreground; When the application switches from the background to the foreground lifecycle event is detected, the system interface is called to obtain the current wireless network connection information; The current wireless network connection information is announced via an in-application broadcast mechanism.
6. The application collaborative startup method according to claim 1, characterized in that, The method further includes: Provides a unified interface for handling external invocation requests; When an external wake-up request is received through the unified interface, the target routing information contained in the external wake-up request is parsed. The steps are as follows: create the application main window, initialize the root view controller, set the root view controller as the root view controller of the application main window, and display the application main window; Based on the target routing information, page navigation logic is executed through the root view controller of the application's main window, wherein the page navigation logic is consistent with the login and page navigation logic executed when the application is launched normally via the application icon.
7. The application collaborative startup method according to claim 1, characterized in that, The initialization of the top notification component includes configuring the display style, display duration, and closing method of the top notification component; wherein, the closing method includes automatically closing after the display duration has been reached, and manually closing in response to the user's operation of the close control.
8. The application collaborative startup method according to claim 1, characterized in that, The method further includes: In a cold start scenario based on remote push messages, the prompt pop-up associated with the remote push message should only pop up once; Register background tasks for the application and set expiration conditions for those background tasks; When the task expiration condition is detected, the execution of the background task is terminated.
9. A computer device, characterized in that, The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method as described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, can implement the method as described in any one of claims 1-8.