Hybrid development method, device, computer program, storage medium, and computer equipment
By building a bridge file on the development engine to achieve hybrid development of the development engine and the mobile application development framework, the problems of high development cost and difficult debugging in the existing technology are solved, and efficient hybrid development effects are achieved.
Patent Information
- Application Number
- CN202411757018.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2044-12-03
AI Technical Summary
In the prior art, mobile application developers need to develop and debug the codes of the development engine and the mobile application development framework separately on different platforms, which leads to high software development costs and great debugging difficulties.
By packaging the mobile application development code into an embedded package and building a bridge file that matches the mobile application development framework on the development engine, communication between the development engine and the mobile application development framework is achieved, and the functions of the mobile application development framework are called on the development engine for hybrid development.
It achieves seamless integration of the development engine and mobile application development framework, reduces software development costs and debugging difficulty, and improves development efficiency.
Smart Images

Figure CN119225702B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a hybrid development method, apparatus, computer program, storage medium, and computer equipment. Background Art
[0002] In mobile application development, the development engine and mobile application development framework each play different roles. The development engine is primarily responsible for providing the core functionality of software development. It renders graphics to ensure smooth and clear images, processes the audio system to ensure accurate sound effects in the software, and manages various software resources, such as models, textures, sounds, scripts, etc., to ensure that these resources can be correctly loaded and used when needed. The mobile application development framework focuses on the design and management of the user interface (UI). The mobile application development framework helps developers create and manage visual elements in the software, such as buttons, menus, text boxes, progress bars, etc. The mobile application development framework is also responsible for handling user interface interactions, such as clicks, drag-and-drop, scrolling, etc., and connecting these interactions with game logic. In existing technologies, developers typically develop and debug mobile application development code and the development engine code separately on different platforms. This approach increases the cost of software development and the difficulty of debugging. Summary of the Invention
[0003] One advantage of the present application is that it provides a hybrid development method, apparatus, computer program, storage medium and computer device, which can call various functions in the mobile application development framework on the development engine to achieve hybrid development based on the development engine and the mobile application development framework.
[0004] Another advantage of the present application is that it provides a hybrid development method, apparatus, computer program, storage medium, and computer device, wherein in order to achieve the above advantages, the present application does not require the use of expensive materials or complex structures. Therefore, the solution provided by the present application can successfully and effectively solve the above problems, and not only provides a simple hybrid development method, apparatus, computer program, storage medium, and computer device, but also increases the practicality and reliability of the hybrid development method, apparatus, computer program, storage medium, and computer device.
[0005] Based on this, in order to achieve at least one of the above advantages or other advantages and purposes of the present application, the present application provides a hybrid development method, which is based on a development engine and a mobile application development framework, and includes the following steps:
[0006] Packaging the mobile application development code into an embedding package, and importing the embedding package into the development engine;
[0007] Building a bridge file based on the development platform of the mobile application development framework, wherein the bridge file is used to establish communication between the development engine and the mobile application development framework;
[0008] The bridge file is used to enable the development engine to call the function in the embedded package, so as to realize hybrid development based on the development engine and the mobile application development framework.
[0009] With this arrangement, by packaging the mobile application development code into an embedded package and importing it into the development engine, a bridge file matching the development platform is constructed based on the development platform of the mobile application development framework, and communication between the development engine and the mobile application development framework is established through the bridge file, thereby achieving hybrid development based on the development engine and the mobile application development framework. Compared to existing solutions that separately develop and debug mobile application development code and the development engine code on different platforms, this solution can call various functions in the mobile application development framework on the development engine, thereby simultaneously utilizing the high-performance software development capabilities of the development engine and the high-performance development framework of the mobile application development framework, thereby achieving seamless integration of core functions and UI functions in a single project.
[0010] According to one embodiment of the present application, when the mobile application development framework is developed based on the Android platform, the bridge file is a Java class, and based on the development platform of the mobile application development framework, the bridge file is constructed, specifically: according to each function in the embedded package, one or more Java classes are created, and the package name and / or class name of the one or more Java classes matches the name of each function.
[0011] With such a setting, when the mobile application development framework is developed based on the Android platform, one or more Java classes matching the names of the functions in the embedded package can be created, laying the foundation for the subsequent development engine to indirectly call the functions in the embedded package through the one or more Java classes.
[0012] According to one embodiment of the present application, the bridge file is used to enable the development engine to call the function in the embedded package, specifically:
[0013] The one or more Java classes call each function in the embedded package through the external interface of the embedded package;
[0014] The development engine indirectly calls each function in the embedded package through AndroidjavaClass and one or more java classes whose package names and / or class names match the names of each function.
[0015] In this way, AndroidjavaClass is a class in the development engine, which is mainly used to interact with the Java class on the Android platform in the C# script of the development engine. In this solution, developers can call the static method of the Java class through AndroidjavaClass on the engine side to obtain the value of the static field, thereby establishing communication between the engine side and the Java class, and then establish communication between the Java class and the embedded package through the external interface of the embedded package to achieve indirect communication between the development engine and the embedded package, so that the development engine can indirectly call various functions in the embedded package.
[0016] According to one embodiment of the present application, when the mobile application development framework is developed based on the IOS platform, the bridge file is an mm file and an h file, and the mm file includes a first transfer function and a second transfer function. The first transfer function is used to call each function in the embedded package through the external interface of the embedded package, and the first transfer function is also used to realize the cross-language call of the first transfer to the second transfer, and the h file is the library file of the mm file.
[0017] In this way, through the first transfer function and the second transfer function included in the mm file, the development engine can indirectly establish communication with the embedded package, so that the development engine can indirectly call each function in the embedded package, and when the mobile application development framework is developed based on the IOS platform, the mm file and the h file are set as bridge files. Compared with the solution of setting the java class as the bridge file, because the IOS platform mainly uses Objective-C or Swift language to develop IOS applications, the IOS application cannot recognize the java class. Therefore, this solution constructs the mm file and the h file as bridge files, which not only reduces the occurrence of the situation where the development platform of the mobile application development framework cannot recognize the file type of the bridge file, thereby affecting the progress and cost of the overall software development, but also can improve the efficiency of the overall software development and reduce the subsequent labor cost of debugging the code by realizing hybrid development based on the development engine and the mobile application development framework.
[0018] According to one embodiment of the present application, the first transfer function is developed based on the Object-C language, and the second transfer function is developed based on the C++ language.
[0019] This setting is used because Objective-C or Swift language is mainly used to develop IOS applications on the IOS platform, so IOS applications cannot recognize Java classes. Therefore, the first transfer function is developed based on the Object-C language, which allows the first transfer function to establish communication with the embedded package directly through the external interface of the embedded package, and can establish communication with the second transfer function developed based on the C++ language through code, so that the subsequent development engine can achieve the purpose of indirectly establishing communication with the mobile application development framework by establishing communication with the second transfer function, thereby realizing hybrid development based on the development engine and the mobile application development framework.
[0020] According to one embodiment of the present application, the bridge file is used to enable the development engine to call the function in the embedded package, specifically:
[0021] The first transfer function calls each function in the embedded package through the external interface of the embedded package, and the first transfer function also implements a cross-language call from the first transfer function to the second transfer function;
[0022] The development engine establishes communication with the second transfer function through DllImport, so as to indirectly call each function in the embedded package through the first transfer function.
[0023] With such a configuration, the first transfer function and the second transfer function included in the mm file can be used as a bridge to establish communication between the development engine and the mobile application development framework, thereby realizing hybrid development based on the development engine and the mobile application development framework.
[0024] According to another aspect of the present application, the present application further provides a device, comprising:
[0025] A packaging and importing component, used to package the mobile application development code into an embedding package and import the embedding package into the development engine;
[0026] A memory for storing mobile application development code, the development engine code, and a bridge file;
[0027] A building component is used to build a bridge file based on the development platform of the mobile application development framework;
[0028] and a development component for utilizing the bridge file to enable the development engine to call the function in the embedded package, so as to realize hybrid development based on the development engine and the mobile application development framework.
[0029] With such an arrangement, the above-mentioned hybrid development method can be realized by the cooperation of the package import component, storage, construction component and development component.
[0030] According to another aspect of the present application, the present application further provides a computer program, and running the computer program can execute the steps of the above-mentioned hybrid development method.
[0031] According to another aspect of the present application, the present application further provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned hybrid development method are implemented.
[0032] With such an arrangement, the computer program stored in the storage medium can automatically perform complex tasks, reduce human intervention, thereby improving overall efficiency and ensuring the reliability and trustworthiness of the operation. In addition, the computer program is repeatable and extensible, so that the same computer program can be repeatedly executed in different environments and at different times, and is easy to expand to meet new needs, thereby enhancing the adaptability and flexibility of the computer program. In addition, running the computer program can greatly optimize resource utilization and reduce manpower and error costs by automating the processing of large amounts of data and tasks. Finally, the computer program is also traceable and secure, and can ensure the auditability and security of operations by recording and tracking each step of the computer program execution, thereby reducing the risks brought by human operation.
[0033] According to another aspect of the present application, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned hybrid development method when executing the computer program.
[0034] This configuration provides flexibility and adaptability for the computer program, enabling it to adjust its execution steps based on different inputs and conditions, thereby adapting to changing needs and technological environments and maintaining its advancement and practicality. Furthermore, the computer device's architecture allows for the implementation of multiple functions, enabling the program in memory to include multiple functional modules. The processor executes the computer program to meet diverse application requirements, enhancing the functionality of the computer program and the integration of the computer device.
[0035] Beneficial effect: By packaging the mobile application development code into an embedded package and importing it into the development engine, a bridge file matching the development platform is constructed according to the development platform of the mobile application development framework, and communication between the development engine and the mobile application development framework is established through the bridge file, thereby realizing hybrid development based on the development engine and the mobile application development framework. Compared with the existing technology, in which the mobile application development code and the development engine code are developed and debugged separately on different platforms, this solution can call each function in the mobile application development framework on the development engine, thereby simultaneously utilizing the high-performance software development capabilities of the development engine and the rapid application development framework of the mobile application development framework, thereby achieving seamless integration of core functions and UI functions in one project. Compared with the solution of constructing different bridge files not based on the development platform of the mobile application development framework, this solution, by constructing a bridge file that matches the development platform of the mobile application development framework, not only reduces the occurrence of the situation where the development platform of the mobile application development framework cannot recognize the file type of the bridge file, thereby affecting the progress and cost of the overall software development, but also can improve the efficiency of the overall software development and reduce the subsequent labor cost of debugging the code by realizing hybrid development based on the development engine and the mobile application development framework. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the conventional technology, the following briefly introduces the drawings required for use in the embodiments or the conventional technology descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0037] Figure 1 A flow chart of a hybrid development method provided for one embodiment of the present application;
[0038] Figure 2 A schematic diagram of the process of developing a mobile application development framework based on the Android platform in the hybrid development method according to the above embodiment of the present application is shown;
[0039] Figure 3 A schematic diagram of the process of developing a mobile application development framework based on the iOS platform in the hybrid development method according to the above embodiment of the present application is shown. DETAILED DESCRIPTION
[0040] To make the above-mentioned objects, features, and advantages of the present application more clearly understood, the specific embodiments of the present application are described in detail below with reference to the accompanying drawings. The following description sets forth many specific details to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar improvements without violating the scope of the present application. Therefore, the present application is not limited to the specific embodiments disclosed below.
[0041] Considering that although existing technologies can develop mobile applications, developers usually develop and debug the mobile application development code and the development engine code separately on different platforms, this approach increases the cost of software development and the difficulty of debugging. To address this problem, the present application provides a hybrid development method, apparatus, computer program, storage medium, and computer device, which can call various functions in the mobile application development framework on the development engine to achieve hybrid development based on the development engine and the mobile application development framework.
[0042] For details, please refer to the attached Figure 1 One embodiment of the present application provides a hybrid development method, which may include the following steps:
[0043] Packaging the mobile application development code into an embedding package, and importing the embedding package into the development engine;
[0044] It is worth noting that the embedded package includes but is not limited to a plug-in or library file, and the file format of the embedded package includes but is not limited to a file in AAR format.
[0045] Building a bridge file based on the development platform of the mobile application development framework, wherein the bridge file is used to establish communication between the development engine and the mobile application development framework;
[0046] The bridge file is used to enable the development engine to call the function in the embedded package, so as to realize hybrid development based on the development engine and the mobile application development framework.
[0047] This example uses the Unity development engine and the Flutter mobile application development framework as examples. Unity is a multi-platform game engine widely used to create 2D and 3D games, virtual reality (VR), augmented reality (AR), simulators, and other interactive content. Unity supports multiple platforms, including Windows, macOS, Linux, iOS, Android, WebGL, PlayStation, Xbox, and Nintendo Switch. Flutter is an open-source UI software development toolkit developed by Google for building high-performance, high-fidelity mobile, web, and desktop applications. Flutter is primarily developed using the Dart language and supports multiple platforms, including Android, iOS, web, and desktop (Windows, macOS, and Linux).
[0048] It should be noted that by packaging the mobile application development code into an embedded package and importing it into the development engine, a bridge file matching the development platform is constructed based on the development platform of the mobile application development framework, and communication between the development engine and the mobile application development framework is established through the bridge file, thereby achieving hybrid development based on the development engine and the mobile application development framework. Furthermore, compared to solutions that do not construct different bridge files based on the development platform of the mobile application development framework, this solution, by constructing a bridge file matching the development platform of the mobile application development framework (for example, program development based on the Android platform primarily uses Java or Kotlin and cannot recognize Objective-C; application development based on the iOS platform primarily uses Objective-C or Swift and cannot recognize Java), not only reduces the occurrence of situations where the mobile application development framework's development platform cannot recognize the file type of the bridge file, thereby affecting the overall software development process and cost, but also improves the efficiency of overall software development and reduces the subsequent labor cost of debugging the code by achieving hybrid development based on the development engine and the mobile application development framework.
[0049] It is worth noting that Figure 2 As shown, when the mobile application development framework is developed based on the Android platform, the bridge file is a Java class, and based on the development platform of the mobile application development framework, the bridge file is constructed, specifically: according to each function in the embedded package, one or more Java classes are created, and the package name and / or class name of the one or more Java classes matches the name of each function.
[0050] It's important to note that the class is a core concept in object-oriented programming. It defines the structure and behavior of an object and serves as a blueprint for creating it. A class contains attributes (data members) and methods (behavioral members). Attributes store the object's state, while methods define its operations. Classes hide internal details through encapsulation, enable code reuse through inheritance, and provide flexible behavioral changes through polymorphism. Classes are the foundation for object instantiation. Each object is an instance of a class and possesses the class's defined attributes and methods, thus enabling modularity, maintainability, and extensibility in code. Classes enable object-oriented programming to better organize and manage complex systems, improving code reusability and readability.
[0051] In particular, the package name or class name of a class has a specific meaning and function in programming. The package name is used to organize and manage groupings of classes and interfaces. It defines the logical hierarchy of classes, typically corresponding to the directory structure of a file system. The class name is the class identifier used to reference the class in code. Class names typically begin with a capital letter and follow camelCase.
[0052] It should be noted that when the mobile application development framework is developed based on the Android platform, one or more Java classes matching the names of the functions in the embedded package can be created, laying the foundation for the subsequent development engine to indirectly call the functions in the embedded package through the one or more Java classes.
[0053] It is worth noting that the bridge file is used to implement the development engine calling the functions in the embedded package, specifically: the one or more Java classes call each function in the embedded package through the external interface of the embedded package; the development engine indirectly calls each function in the embedded package through AndroidjavaClass, through one or more Java classes whose package names and / or class names match the names of each function.
[0054] It should be noted that AndroidjavaClass is a class in the Unity engine, primarily used to interact with Java classes on the Android platform from Unity's C# scripts. The functions and uses of AndroidjavaClass include: cross-platform interaction, access to Java classes and methods, extended functionality, and simplified development processes. Specifically: Cross-platform interaction: AndroidjavaClass allows Unity developers to directly call Java code on the Android platform through C# scripts. This allows developers to integrate native Android platform functionality into Unity games, such as accessing system services, using specific libraries, and calling custom Java code; Accessing Java classes and methods: AndroidjavaClass can instantiate Java classes and access their static methods and fields. Developers can use the AndroidJavaClass object to call static methods of Java classes and obtain the values of static fields, achieving deeper integration with the Android platform. Extended functionality: Unity itself does not provide all Android platform functionality. AndroidJavaClass allows developers to extend Unity's functionality and implement Android features that Unity does not support, such as accessing sensor data and using Android-specific APIs. Simplified development: AndroidJavaClass simplifies communication between Unity and the Android platform. Developers no longer need to manually handle complex interactions between Java and C#; they can directly implement functions through simple API calls. This greatly reduces development difficulty and improves development efficiency.
[0055] It is worth noting that Figure 3 As shown, when the mobile application development framework is developed based on the IOS platform, the bridge file is an mm file and an h file, and the mm file includes a first transfer function and a second transfer function. The first transfer function is used to call each function in the embedded package through the external interface of the embedded package, and the first transfer function is also used to realize the cross-language call of the first transfer to the second transfer, and the h file is the library file of the mm file.
[0056] It's important to note that library files (LibraryFile) are a crucial component of software development. They encapsulate reusable code and resources, providing developers with convenient, efficient, and reliable solutions. Using libraries, developers can package commonly used functions, classes, and methods into independent modules for shared use across multiple projects, reducing repetitive coding workloads and improving development efficiency. The use of libraries promotes modular development, allowing complex applications to be broken down into smaller, more manageable units for easier understanding, maintenance, and testing.
[0057] It should be noted that, through the first transfer function and the second transfer function included in the mm file, the development engine can indirectly establish communication with the mobile application development framework, so that the development engine can indirectly call each function in the embedded package, and when the mobile application development framework is developed based on the IOS platform, the mm file and the h file are set as bridge files. Compared with the solution of setting the java class as the bridge file, because the IOS platform mainly uses Objective-C or Swift language to develop IOS applications, the IOS application cannot recognize the java class. Therefore, this solution constructs the mm file and the h file as bridge files, which not only reduces the occurrence of the situation where the development platform of the mobile application development framework cannot recognize the file type of the bridge file, thereby affecting the progress and cost of the overall software development, but also can improve the efficiency of the overall software development and reduce the subsequent labor cost of debugging the code by realizing hybrid development based on the development engine and the mobile application development framework.
[0058] In particular, the first transfer function is developed based on the Object-C language, and the second transfer function is developed based on the C++ language. Because in the IOS platform, Objective-C or Swift language is mainly used to develop IOS applications, so IOS applications cannot recognize Java classes, so the first transfer function is developed based on the Object-C language, which allows the first transfer function to directly establish communication with the embedded package through the external interface of the embedded package, and can establish communication with the second transfer function developed based on the C++ language through code, so that the subsequent development engine can achieve the purpose of indirectly establishing communication with the embedded package by establishing communication with the second transfer function, thereby realizing hybrid development based on the development engine and the mobile application development framework.
[0059] It should be noted that when the mobile application development framework is developed based on the iOS platform, the bridge file is used to enable the development engine to call the function in the embedded package, specifically:
[0060] The first transfer function calls each function in the embedded package through the external interface of the embedded package, and the first transfer function also implements a cross-language call from the first transfer function to the second transfer function;
[0061] The development engine establishes communication with the second transfer function through DllImport, so as to indirectly call each function in the embedded package through the first transfer function.
[0062] It should be noted that in Unity development, the DllImport feature of C# can be used to introduce and call functions written in C++, thereby realizing the interaction between Unity and C++ code. The first transfer function and the second transfer function included in the mm file can be used as a bridge to establish communication between the development engine and the mobile application development framework, thereby realizing hybrid development based on the development engine and the mobile application development framework.
[0063] It should be noted that although the development engine Unity and the mobile application development framework Flutter are used as examples in this embodiment, ordinary technicians in this field should understand that what this application wants to protect is a hybrid development method. By combining the custom modules and native codes in the mobile application development framework, the mobile application development code is packaged into an embedded package, and based on the open platform of the mobile application development framework, a bridge file matching the platform is constructed. The bridge file establishes communication with the mobile application development framework and the development engine respectively through the external interface of the embedded package and one or more of the classes, properties and methods in the development engine for interacting with external code, so that the development engine can indirectly call the functions in the embedded package, thereby realizing hybrid development based on the development engine and the mobile application development framework.
[0064] The development engines include but are not limited to Unreal Engine, Godot Engine, Cry Engine, Amazon Lumberyard, GameMaker Studio and Cocos2d-x; the mobile application development frameworks include but are not limited to React Native, Xamarin, Ionic, NativeScript and Rhino Mobile.
[0065] In another embodiment of the present application, a device is provided, comprising: a packaging and importing component for packaging mobile application development code into an embedded package and importing the embedded package into the development engine; a memory for storing the mobile application development code, the development engine code, and a bridge file; a construction component for constructing the bridge file based on the development platform of the mobile application development framework; and a development component for using the bridge file to enable the development engine to call functions in the embedded package, thereby implementing hybrid development based on the development engine and the mobile application development framework. The packaging and importing component, the memory, the construction component, and the development component cooperate to implement the hybrid development method provided in the above embodiment.
[0066] Another embodiment of the present application further provides a computer program, and running the computer program can execute the steps of the hybrid development method provided in the above embodiment.
[0067] Another embodiment of the present application further provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the hybrid development method described above are implemented.
[0068] It should be noted that the computer program stored in the storage medium can automatically perform complex tasks, reduce human intervention, thereby improving overall efficiency and ensuring the reliability and trustworthiness of operations. In addition, the computer program is repeatable and extensible, so that the same computer program can be repeatedly executed in different environments and at different times, and is easy to expand to meet new needs, thereby enhancing the adaptability and flexibility of the computer program. In addition, running the computer program can greatly optimize resource utilization and reduce manpower and error costs by automatically processing large amounts of data and tasks. Finally, the computer program is also traceable and secure, and can ensure the auditability and security of operations by recording and tracking each step of the computer program execution, thereby reducing the risks brought by human operation.
[0069] Another embodiment of the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned hybrid development method when executing the computer program.
[0070] In particular, the computer program is flexible and adaptable, enabling its execution steps to be adjusted based on different inputs and conditions, thereby adapting to changing needs and technological environments and maintaining its advancement and practicality. Furthermore, the computer device's architecture allows for the implementation of multiple functions, enabling the program in memory to include multiple functional modules. The processor executes the computer program to meet diverse application requirements, thereby enhancing the functionality of the computer program and the integration of the computer device.
[0071] It should be noted that when a component is referred to as being "fixed to" or "disposed on" another component, it may be directly on the other component or there may be a central component. When a component is considered to be "connected to" another component, it may be directly connected to the other component or there may be a central component at the same time. The terms "vertical", "horizontal", "upper", "lower", "left", "right" and similar expressions used in the specification of this application are for illustrative purposes only and do not represent the only implementation method.
[0072] In addition, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, device, product or equipment that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or equipment.
[0073] In this application, unless otherwise expressly specified or limited, when a first feature is "above" or "below" a second feature, it can mean that the first feature is directly in contact with the second feature, or the first feature and the second feature are indirectly in contact through an intermediary. Furthermore, when a first feature is "above," "above," or "above" a second feature, it can mean that the first feature is directly above or diagonally above the second feature, or simply means that the first feature is higher in level than the second feature. When a first feature is "below," "below," or "below" a second feature, it can mean that the first feature is directly below or diagonally below the second feature, or simply means that the first feature is lower in level than the second feature.
[0074] Unless otherwise defined, all technical and scientific terms used in the specification of this application have the same meaning as commonly understood by those skilled in the art to which this application belongs. The terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used in the specification of this application includes any and all combinations of one or more of the relevant listed items.
[0075] The technical features of the above embodiments can be combined without changing the basic principles of this application. In order 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.
[0076] The above embodiments merely illustrate several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of patent protection for the present application shall be determined by the appended claims.
Claims
1. A hybrid development method, characterized in that, The hybrid development method is based on a development engine and a mobile application development framework, and includes the following steps: Packaging the mobile application development code into an embedding package, and importing the embedding package into the development engine, wherein the embedding package is a plug-in or a library file; Building a bridge file based on the development platform of the mobile application development framework, wherein the bridge file is used to establish communication between the development engine and the mobile application development framework; Using the bridge file to enable the development engine to call the function in the embedded package, so as to achieve hybrid development based on the development engine and the mobile application development framework; When the mobile application development framework is developed based on an Android platform, the bridge file is a Java class, and based on the development platform of the mobile application development framework, the bridge file is constructed by: creating one or more Java classes according to each function in the embedded package, and the package name and / or class name of the one or more Java classes matches the name of each function; When the mobile application development framework is developed based on the Android platform, the bridge file is used to enable the development engine to call the functions in the embedded package. Specifically, the one or more Java classes call each function in the embedded package through the external interface of the embedded package; the development engine indirectly calls each function in the embedded package through AndroidjavaClass, through one or more Java classes whose package names and / or class names match the names of each function.
2. The hybrid development method according to claim 1, characterized in that: When the mobile application development framework is developed based on the IOS platform, the bridge file is an mm file and an h file. The mm file includes a first transfer function and a second transfer function. The first transfer function is used to call each function in the embedded package through the external interface of the embedded package, and the first transfer function is also used to realize cross-language calls from the first transfer to the second transfer. The h file is the library file of the mm file.
3. The hybrid development method according to claim 2, characterized in that: The first transfer function is developed based on the Object-C language, and the second transfer function is developed based on the C++ language.
4. The hybrid development method according to claim 3, characterized in that: The bridge file is used to enable the development engine to call the function in the embedded package, specifically: The first transfer function calls each function in the embedded package through the external interface of the embedded package, and the first transfer function also implements a cross-language call from the first transfer function to the second transfer function; The development engine establishes communication with the second transfer function through DllImport, so as to indirectly call each function in the embedded package through the first transfer function.
5. A hybrid development device, characterized in that The hybrid development device comprises: A package import component is used to package the mobile application development code into an embedded package and import the embedded package into the development engine. The embedded package is a plug-in or library file. A memory for storing mobile application development code, the development engine code, and a bridge file; A construction component is used for constructing a bridge file based on a development platform of a mobile application development framework, wherein the bridge file is used to establish communication between the development engine and the mobile application development framework; and a development component for using the bridge file to enable the development engine to call the function in the embedded package, so as to achieve hybrid development based on the development engine and the mobile application development framework; When the mobile application development framework is developed based on an Android platform, the bridge file is a Java class, and based on the development platform of the mobile application development framework, the bridge file is constructed by: creating one or more Java classes according to each function in the embedded package, and the package name and / or class name of the one or more Java classes matches the name of each function; When the mobile application development framework is developed based on the Android platform, the bridge file is used to enable the development engine to call the functions in the embedded package. Specifically, the one or more Java classes call each function in the embedded package through the external interface of the embedded package; the development engine indirectly calls each function in the embedded package through AndroidjavaClass, through one or more Java classes whose package names and / or class names match the names of each function.
6. A computer program product, characterized in that Running the computer program product can execute the steps of the hybrid development method according to any one of claims 1 to 4.
7. A storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the steps of the hybrid development method according to any one of claims 1 to 4 are implemented.
8. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the hybrid development method according to any one of claims 1 to 4 when executing the computer program.
Citation Information
Patent Citations
Method and device for developing user interface, medium and electronic equipment
CN111338623A
Socket-based client cross-platform network communication method based and related equipment thereof
CN112671760A