IVI cross-application routing processing method, and electronic device and routing architecture
By generating the mapping relationship between URL paths and classes based on ARouter, dynamically scanning the configuration file to generate global routing tables, cross-application routing processing in the automotive infotainment system is realized, solving the problem that ARouter cannot meet cross-application jumps, improving the maintainability of the application and reducing development costs.
Patent Information
- Application Number
- PCT/CN2024/115136
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-08
- Filing Date
- 2024-08-28
- Publication Date
- 2025-07-17
AI Technical Summary
The existing ARouter routing framework cannot meet the needs of cross-application jump of automotive infotainment systems, resulting in high development and maintenance costs and high parameter transfer complexity and errors.
The IVI cross-application routing processing method based on ARouter generates the mapping relationship between URL paths and classes through annotation processors, uses the gradle plug-in to manage routing information, dynamically scans the configuration file to generate a global routing table, and initiates routing jump requests through the URL path to realize page jumps across applications.
Simplifies the page jump and navigation process between applications, reduces the complexity and error of parameter transfer, improves the maintainability and flexibility of applications, and reduces development and maintenance costs.
Smart Images

Figure CN2024115136_17072025_PF_FP_ABST
Abstract
Description
IVI cross-application routing processing method, electronic device, and routing architecture Technical Field
[0001] The present invention relates to a routing processing method, an electronic device, and a routing framework, and in particular to an IVI cross-application routing processing method, an electronic device, and a routing framework. Background Art
[0002] The existing routing framework, ARouter, solves several key issues in Android applications, including page redirection, modular development, parameter passing, and interceptors, improving application maintainability and performance. Its core technical solutions include routing table definition, route redirection, parameter passing, interceptors, and modular design. While ARouter is a powerful Android application development tool, it only supports redirection within an app and cannot meet the cross-app redirection requirements of automotive infotainment systems, necessitating urgent improvements.
[0003] Summary of the Invention
[0004] The purpose of the present invention is to provide an IVI cross-application routing processing method, electronic device, and routing architecture to solve the shortcomings of the prior art.
[0005] The present invention provides the following solutions:
[0006] An IVI cross-application routing processing method based on ARouter, comprising:
[0007] Based on the annotation processor and ARouter logic, the mapping relationship between URL path and class is generated according to the annotation information marked in the application during the compilation phase;
[0008] Use the gradle plug-in to build and manage, obtain the routing information corresponding to the application generated by the annotation processor, and write the routing information into a configuration file, which at least includes basic information and component declarations of the application;
[0009] During the startup of the system arbitration application, the configuration files of each application are dynamically scanned to obtain the routing information of each application and generate a global routing table;
[0010] If there is an application that needs to be routed, a route jump request is initiated through the corresponding URL path passed by the global routing table;
[0011] The application queries the routing table through the URL path to obtain the corresponding class and calls the system's StartActivity to complete the jump.
[0012] Furthermore, the annotation processor reads and analyzes the annotations in the source code, and generates corresponding code or performs other operations according to the rules defined by the annotations.
[0013] Furthermore, the configuration file includes at least: activities, services, broadcast receivers, and content providers declared in the application.
[0014] Furthermore, the mapping relationship between the URL path and the class is generated specifically as follows: defining the URL path of the application and the corresponding processing class, generating a mapping relationship between the URL path and the class, which is used to implement the distribution and processing of the corresponding request, and performing the corresponding operation according to the URL path and the corresponding class.
[0015] Furthermore, a corresponding operation is performed according to the URL path and the corresponding class, specifically: searching the URL path and the corresponding class through the server, and performing the corresponding operation.
[0016] Furthermore, the routing information is written into the configuration file, specifically:
[0017] Obtain the generated routing information through a custom gradle plug-in and write the routing information to the configuration file through the binary manifest editing tool.
[0018] An IVI cross-application routing processing system based on ARouter, comprising:
[0019] The URL path mapping relationship generation module, based on the annotation processor and ARouter logic, generates the mapping relationship between URL paths and classes according to the annotation information marked in the application during the compilation phase;
[0020] The configuration file setting module is built and managed using the gradle plug-in, obtains the routing information corresponding to the application generated by the annotation processor, and writes the routing information into the configuration file, which at least includes the basic information of the application and component declarations;
[0021] The global routing table generation module dynamically scans the configuration files of each application during the startup of the system arbitration application, obtains the routing information of each application, and generates a global routing table;
[0022] A routing jump request initiating module, if there is an application that needs to be routed, initiates a routing jump request through the corresponding URL path passed by the global routing table;
[0023] In the application activity jump module, the corresponding application queries the routing table through the URL path to obtain the corresponding class, and calls the system's StartActivity to complete the jump.
[0024] A routing architecture is characterized in that an ARouter-based IVI cross-application routing processing system is provided in the routing architecture.
[0025] An electronic device, characterized in that it includes: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method.
[0026] A computer-readable storage medium stores a computer program executable by an electronic device. When the computer program runs on the electronic device, the electronic device executes the steps of the method.
[0027] Compared with the prior art, the present invention has the following advantages:
[0028] The architecture for cross-application routing in the automotive infotainment system is based on ARouter, aiming to redevelop Android's existing routing architecture ARouter. By using existing technical solutions such as Gradle plug-ins and binary manifest editing tools, combined with the automotive infotainment system, all applications in the system can complete page jumps through this function, greatly reducing the development and maintenance costs of page jumps in the automotive cockpit system application.
[0029] This invention uses the existing functions of ARouter to create a QSRouter architecture that can realize inter-application routing, and absorbs some good designs and functions of ARouter into QSRouter, thereby realizing an architecture for cross-application routing applied in the automotive infotainment system, simplifying the process of page jump and navigation between applications, reducing the complexity and error risks in the parameter passing process, and can help automotive application developers build more efficient, maintainable and flexible applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0031] FIG1 is a flow chart of an IVI cross-application routing processing method.
[0032] FIG2 is an architectural diagram of an IVI cross-application routing processing system.
[0033] FIG3 is an implementation diagram of an embodiment of the present invention in a specific application scenario.
[0034] FIG4 is a schematic structural diagram of an electronic device. DETAILED DESCRIPTION
[0035] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0036] The IVI cross-application routing processing method shown in FIG1 includes:
[0037] Step S1: Based on the annotation processor and ARouter logic, during the compilation phase, a mapping relationship between the URL path and the class is generated according to the annotation information annotated in the application;
[0038] Specifically, the annotation processor reads and analyzes the annotations in the source code, and generates corresponding code or performs other operations according to the rules defined by the annotations.
[0039] Specifically, the generation of the Path and Class mapping relationship is as follows: defining the URL path path of the application and the corresponding processing class class, generating a mapping relationship between the URL path Path and the class Class, which is used to implement the distribution and processing of corresponding requests, and performing corresponding operations according to the URL path and the corresponding class. For example, the operations of the URL path and the corresponding class can be performed by the server.
[0040] ARouter is an Android development framework used to implement page jumps and parameter passing. It uses annotations to configure routing information, allowing developers to use simple syntax directly in the code to perform page jump operations.
[0041] For example, in this example, ARouter is used to define a route as follows: @Route(path=" / main / activity") public class MainActivity extends AppCompatActivity{ / / ...} This associates MainActivity with the path " / main / activity". Then, to jump to MainActivity from elsewhere, simply call the following code: ARouter.getInstance().build(" / main / activity").navigation(). In addition to basic page jumps, ARouter also supports passing parameters.
[0042] It can be seen that in this embodiment, the Path and Class mapping relationship is generated based on ARouter, which can quickly handle the jump and parameter transfer between different pages of the application during the development process.
[0043] Step S2: Use the Gradle plug-in to build and manage, obtain the routing information corresponding to the application generated by the annotation processor, and write the routing information into the configuration file manifest, which at least includes the basic information and component declarations of the application;
[0044] A manifest file is a special configuration file that contains basic application information and component declarations. Dynamic scanning involves inspecting and analyzing an application at runtime to obtain information about its structure, functionality, and security. By scanning the manifest file, you can obtain the declared components of an application, such as activities, services, broadcast receivers, and content providers, and further understand the relationships and interactions between them.
[0045] By reading and writing the manifest configuration file, relevant information of the application, such as the name and permissions, can be obtained, and various information of the application can be correctly understood, and other modules can also interact with the activity normally. In this embodiment, the manifest file of the application is read and written to obtain information about its structure and functions.
[0046] Exemplarily, the configuration file includes at least: an activity (Activity), a service (Service), a broadcast receiver (Broadcast Receiver), and a content provider (Content Provider) declared in the application.
[0047] Exemplarily, the generated routing information is obtained through a custom gradle plug-in, and the routing information is written into the configuration file through a binary manifest editing tool.
[0048] Step S3, during the startup of the system arbitration application, dynamically scan the configuration files of each application, obtain the routing information of each application, and generate a global routing table;
[0049] The startup of a system-arbitrated application refers to the start of a software program capable of handling race conditions or resource access conflicts. For example, a program monitors and coordinates contention between different components, ensuring they operate according to certain rules to avoid errors, deadlocks, and other problems. For example, the present invention is applied in multi-threaded programming. If multiple threads attempt to access shared resources (such as memory) simultaneously, data corruption or logical errors may occur. The system arbitrates the application and coordinates the access order and time slice allocation of shared resources between threads by reasonably allocating resource usage rights and setting priorities, thereby ensuring the stability and correctness of the entire system.
[0050] Step S4: If there is an application that needs to be routed, a route jump request is initiated through the corresponding URL path passed by the global routing table;
[0051] In step S5, the application queries the routing table through the URL path to obtain the corresponding class, and calls the system's StartActivity to complete the jump.
[0052] StartActivity: In Android, each screen or interface is called an Activity, and StartActivity represents a transition from the current activity to another. This transition can be user-initiated or automatically triggered based on specific conditions. When the StartActivity method is called, the system creates and displays the target activity, placing it above the current activity so that the user can see and interact with the new interface.
[0053] For the method steps disclosed in the above embodiments, for the purpose of simple description, the method steps are expressed as a series of action combinations. However, those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0054] Any process or method description described in a flowchart or other manner can be understood as: a module, fragment or part of a code that includes one or more executable instructions for implementing a specific logical function or process step, and the scope of the preferred embodiment of the present invention includes alternative implementations, in which the order shown or discussed may not be followed, including executing and implementing the functions in a substantially simultaneous manner or in a reverse order according to the functions involved, or executing computer instructions and implementing the corresponding functions according to program structures such as loops and branches, which can naturally be understood by those skilled in the art when implementing the embodiments of the present invention.
[0055] The ARouter-based IVI cross-application routing processing system shown in Figure 2 includes:
[0056] The URL path mapping relationship generation module, based on the annotation processor and ARouter logic, generates the mapping relationship between the URL path Path and the class Class according to the annotation information marked in the application during the compilation phase;
[0057] The configuration file setting module is built and managed using the Gradle plug-in, obtains the routing information corresponding to the application generated by the annotation processor, and writes the routing information into the configuration file manifest, which at least includes the basic information of the application and component declarations;
[0058] The global routing table generation module dynamically scans the configuration files of each application during the startup of the system arbitration application, obtains the routing information of each application, and generates a global routing table;
[0059] A routing jump request initiating module, if there is an application that needs to perform routing jump, initiates a routing jump request through the corresponding path transmitted by the global routing table;
[0060] Application activity jump module, the application queries the routing table through the URL path to obtain the corresponding class, and calls the system's StartActivity to complete the jump.
[0061] It is worth noting that although only some basic functional modules are disclosed in the embodiment of the present invention, it does not mean that the composition of the present system is limited to the above basic functional modules. On the contrary, what this embodiment wants to express is that on the basis of the above basic functional modules, those skilled in the art can arbitrarily add one or more functional modules in combination with the existing technology to form an infinite number of embodiments or technical solutions. In other words, this system is open rather than closed. Just because this embodiment only discloses individual basic functional modules, it cannot be considered that the scope of protection of the claims of the present invention is limited to the disclosed basic functional modules. At the same time, for the convenience of description, the above devices are described in terms of functions, which are divided into various units and modules. Of course, when implementing the present invention, the functions of each unit and module can be implemented in the same or one or more software and / or hardware.
[0062] The above-described system implementations are merely illustrative. For example, the various functional modules, units, or subsystems in the system may or may not be physically separate, or may or may not be physical units. They may be located in the same location or distributed across multiple different systems and their subsystems or modules. Those skilled in the art may select some or all of the functional modules, units, or subsystems to achieve the objectives of the embodiments of the present invention based on actual needs. In these cases, those of ordinary skill in the art can understand and implement them without inventive effort.
[0063] FIG3 shows an implementation of an embodiment of the present invention in a specific application scenario. The embodiment mainly includes the following steps:
[0064] During the compilation phase of an application with routing annotation information, the first step is to use the annotation processor to generate the path and class mapping relationship (this application routing information) according to the annotation information marked in the application. Here, the Arouter logic is used.
[0065] During the compilation phase of an application with routing annotation information, the second step is to obtain the routing information of the application generated by the annotation processor through the Gradle plug-in and write the routing information of the application into the manifest of the application;
[0066] During the startup process, the system arbitration application dynamically scans the manifest of each application, obtains the routing information of each application, and aggregates it into a global routing table.
[0067] The application that wants to perform route jump, after connecting to the system arbitration application, uses the corresponding API to pass the corresponding path and initiates a jump request.
[0068] Finally, the arbitration application obtains the corresponding class through the path query routing table and calls the system's startActivity to complete the jump.
[0069] This embodiment uses reflection technology to dynamically create and initialize the target component, uses apt (Annotation Processing Tool) technology to generate corresponding routing information according to annotations, obtains the generated routing information through a custom gradle plug-in, and writes the routing information into the binary manifest file through a binary manifest editing tool.
[0070] In web development, the mapping between a URL path and a corresponding handler class is used to assign and process requests. When a user accesses a specific URL, the server finds the corresponding handler class based on the URL and performs the corresponding action. This mapping helps organize and manage the code logic between different functional modules within a website or web application. For example, let's say we're developing a blog. When a user accesses the URL " / article / XXX," we want to display the content with ID XXX. To achieve this, we can map the path " / article / {id}" to a handler class named "ArticleController" (for example). Specifically, in the backend code, we need to configure routing rules to associate " / article / {id}" with the "ArticleController." When a user accesses " / article / XXX," the server calls the corresponding method in the ArticleController class to retrieve and display the content of the article with ID XXX. The mapping between a URL path and a handler class helps assign and process requests during web development.
[0071] An annotation processor is a tool that processes annotations in Java source code at compile time. It reads and analyzes annotations in the source code and generates additional code or performs other actions based on the rules defined by the annotations. For example, suppose we have a custom annotation `@MyAnnotation` that marks a method as requiring special processing. By using an annotation processor, we can detect this annotation at compile time and generate appropriate code based on its specifications. For example, we can insert logging, performance statistics, and other functions before and after the method call.
[0072] The gradle plugin is a tool for building and managing projects. It helps developers automate the build process, including compiling code, running tests, packaging applications, and more.
[0073] For example, in this embodiment of the present invention, a Java project is intended to be built using Gradle. A file named "build.gradle" can be added to the project, which defines the project's configuration and dependencies. Gradle commands can then be used to perform various tasks, such as compiling code and generating documentation.
[0074] An embodiment of the present invention implements a solution for cross-application routing within an automotive infotainment system. Leveraging existing technologies, it provides a simple way to execute page transitions, eliminating the need to manually create intent objects. This reduces the complexity of parameter passing and the potential for errors. Developers can customize global and local interception logic, enhancing application security and user experience. Compared to traditional approaches to implementing cross-application transitions within an in-vehicle system, this invention represents a significant technological advancement, helping developers build more efficient, maintainable, and flexible applications, providing users with a better experience.
[0075] As shown in FIG4 , the embodiment of the present invention further provides corresponding electronic devices, storage media, and routing architecture based on the IVI cross-application routing processing method and system:
[0076] A routing architecture is provided in which an ARouter-based IVI cross-application routing processing system is provided.
[0077] An electronic device includes: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of an ARouter-based IVI cross-application routing processing method.
[0078] A computer-readable storage medium stores a computer program executable by an electronic device. When the computer program runs on the electronic device, the electronic device executes the steps of an ARouter-based IVI cross-application routing processing method.
[0079] FIG4 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. FIG4 shows a block diagram of an exemplary electronic device suitable for implementing the embodiments of the present invention. The electronic device shown in FIG4 is merely an example and should not limit the functionality or scope of use of the embodiments of the present invention. The electronic device may typically be a device in an electronic product that utilizes the ARouter-based IVI cross-application routing processing method described in the above embodiment. For example, it may be an electronic device in an electric vehicle. In FIG4 , electronic device 500 is represented as a general-purpose computing device. Components of electronic device 500 may include, but are not limited to, one or more processing units or processors 516, memory 528, and a bus 518 connecting various system components (including memory 528 and processor 516). Bus 518 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus. Electronic device 500 typically includes a variety of computer-readable media. These media can be any available media that can be accessed by electronic device 500, including volatile and non-volatile media, removable and non-removable media. Memory 528 can include computer-readable media in the form of volatile memory, such as random access memory (RAM) 530 and / or cache memory 532. Electronic device 500 may further include other removable / non-removable, volatile / non-volatile computer-readable storage media. By way of example only, storage system 534 can be used to read and write to non-removable, non-volatile magnetic media (not shown, commonly referred to as a "hard drive"). Although not shown, storage system 534 can provide a disk drive for reading and writing to removable non-volatile disks (e.g., floppy disks, removable hard drives, hot-swappable storage media), as well as an optical drive for reading and writing to removable non-volatile optical disks (e.g., CD-ROMs, DVD-ROMs, or other optical media). In these cases, each drive can be connected to bus 518 via one or more data media interfaces. The memory 528 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of various embodiments of the present invention. A program / utility 540 having a set (e.g., at least one) of program modules 542 may be stored, for example, in the memory 528. Such program modules 542 may include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.Program modules 542 generally implement the functions and / or methods described in the embodiments of the present invention. The electronic device 500 may also communicate with one or more external devices 514 (e.g., a keyboard, pointing device, display 524, etc.), one or more devices that enable a user to interact with the electronic device 500, and / or any device that enables the electronic device 500 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). This communication may occur via an input / output (I / O) interface 522. Furthermore, the electronic device 500 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 520. The network adapter 520 communicates with other modules of the electronic device 500 via a bus 518. It should be understood that, although not shown in the figures, those skilled in the art may utilize other hardware and / or software modules in conjunction with the electronic device 500, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems. The processor 516 executes various functional applications and data processing by running the programs stored in the memory 528, such as implementing the methods provided by any one or more embodiments of the present invention.
[0080] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with their meanings in the context of the prior art, and will not be interpreted in an idealized or overly formal sense unless specifically defined.
[0081] It should be noted that certain terms are used in this specification and claims to refer to specific components. Those skilled in the art will understand that different manufacturers may use different terms to refer to the same component. This specification and claims do not distinguish components based on differences in terms, but rather on differences in their functions.
[0082] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0083] Furthermore, those skilled in the art will appreciate that although some embodiments described herein include certain features that are included in other embodiments but not other features, combinations of features from different embodiments are intended to be within the scope of the present invention and to form different embodiments. For example, any one of the embodiments claimed in the claims may be used in any combination in the embodiments of the present invention.
[0084] Throughout this specification, references to terms such as "one embodiment," "example," or "specific example" indicate that the specific features, structures, materials, or characteristics described in conjunction with that embodiment or example are included in at least one embodiment or example of the present invention. In this specification, schematic representations of these terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0085] In addition, the technical solutions between the various embodiments of the present invention can be combined with each other, but it must be based on the fact that ordinary technicians in this field can implement it. When the combination of technical solutions is mutually contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0086] All features disclosed in this specification, or steps in all methods or processes disclosed, except for mutually exclusive features and / or steps, may be combined in any manner. Any feature disclosed in this specification, unless otherwise stated, may be replaced by an alternative feature that is equivalent or serves a similar purpose. That is, unless otherwise stated, each feature is merely an example of a set of equivalent or similar features. Throughout this specification, like reference numerals indicate like elements.
[0087] Those skilled in the art will appreciate that the modules in the devices in the embodiments can be adaptively changed and set in one or more devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and in addition they can be divided into multiple submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including corresponding claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner can be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including corresponding claims, abstracts and drawings) can be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0088] In the several embodiments provided herein, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for example, the division of units is merely a logical functional division, and other division methods may be used in actual implementation; for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or certain instructions may not be executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units through some interface, which may be electrical, mechanical, or other forms not shown.
[0089] In this application, the word "exemplary" is used to mean "serving as an example, illustration, or illustration." Any embodiment described in this application as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is given to enable any person skilled in the art to implement and use the present application. In the following description, details are listed for the purpose of explanation. It should be understood that one of ordinary skill in the art can recognize that the present application can be implemented without using these specific details. In other instances, well-known structures and processes are not elaborated in detail to avoid obscuring the description of the present application with unnecessary details. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in this application.
[0090] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. An ARouter-based IVI cross-application routing processing method, characterized in that Including: Based on the annotation processor and ARouter logic, during the compilation phase, generate the mapping relationship between the URL path and the class according to the annotation information marked in the application program; Use the gradle plugin for construction and management, obtain the routing information corresponding to the application program generated by the annotation processor, and write the routing information into the configuration file, where the configuration file includes at least the basic information of the application program and component declarations; During the system arbitration of the application program startup process, dynamically scan the configuration files of each application program, obtain the routing information of each application program, and generate a global routing table; If there is an application program that needs to perform a routing jump, initiate a routing jump request through the corresponding URL path passed by the global routing table; The application program queries the routing table through the URL path to obtain the corresponding class, and calls the system's StartActivity to complete the jump.
2. The ARouter-based IVI cross-application routing processing method according to claim 1, wherein The annotation processor reads and analyzes the annotations in the source code, and generates corresponding code or performs other operations according to the rules defined by the annotations.
3. The ARouter-based IVI cross-application routing processing method according to claim 1, wherein The configuration file includes at least: activities, services, broadcast receivers, and content providers declared in the application program.
4. The ARouter-based IVI cross-application routing processing method according to claim 1, wherein, The generation of the mapping relationship between the URL path and the class is specifically: define the URL path of the application program and the corresponding processing class, generate the mapping relationship between the URL path and the class, and be used to implement the distribution and processing of corresponding requests. According to the URL path and the corresponding class, perform corresponding operations.
5. The method for IVI cross-application routing processing based on ARouter according to claim 4, characterized in that, According to the URL path and the corresponding class, perform corresponding operations, specifically: find the URL path and the corresponding class through the server, and perform corresponding operations.
6. The ARouter-based IVI cross-application routing processing method according to claim 1, characterized in that The writing of the routing information into the configuration file is specifically: Obtain the generated routing information through a custom gradle plugin, and write the routing information into the configuration file through a binary manifest editing tool.
7. An IVI cross-application routing processing system based on ARouter, characterized in that, Including: URL path mapping relationship generation module, based on the annotation processor and ARouter logic, generate the mapping relationship between the URL path and the class according to the annotation information marked in the application program during the compilation phase; Configuration file setting module, use the gradle plugin for construction and management, obtain the routing information corresponding to the application program generated by the annotation processor, and write the routing information into the configuration file, where the configuration file includes at least the basic information of the application program and component declarations; Global routing table generation module, during the system arbitration of the application program startup process, dynamically scan the configuration files of each application program, obtain the routing information of each application program, and generate a global routing table; Routing jump request initiation module, if there is an application program that needs to perform a routing jump, initiate a routing jump request through the corresponding URL path passed by the global routing table; Application program activity jump module, the corresponding application program queries the routing table through the URL path to obtain the corresponding class, and calls the system's StartActivity to complete the jump.
8. A routing architecture, characterized in that, The ARouter-based IVI cross-application routing processing system described in claim 7 is provided in the routing architecture.
9. An electronic device, characterized in that, Including: A processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete mutual communication through the communication bus; a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, It stores a computer program executable by an electronic device, and when the computer program runs on the electronic device, the electronic device executes the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Navigation system and navigation method of Android system
CN112649000A
Component routing method and system
CN112769706A
Method for jumping pages based on iOS platform route and application
CN113886731A
Page jump method and device for internal routing of Internet of Vehicles
CN115543283A
UI (User Interface) routing component, and method and device for jumping between iOS (Internet Operating System) modules based on UI routing component
CN116527577A