Compiling method of Android system application program

A technology of application program and Android system, applied in the field of compilation of Android system application program, can solve problems such as loss of flexibility and inability to realize single warehouse compilation

Pending Publication Date: 2020-05-26
CHENGDU TD TECH LTD
0 Cites 0 Cited by

AI-Extracted Technical Summary

Problems solved by technology

However, after the introduction of the HIDL framework, many dependent classes that need to be inherited are not exposed in the Android SDK. For apps that need to realize the interaction between the application layer and the system running layer and thus rely on the HIDL interface (such as ...
View more

Method used

[0038] The above is the specific implementation of the APP compilation method in the present application. Through the above method, the classes, methods, and interfaces that need to be used b...
View more

Abstract

The invention discloses a compiling method of an Android system application program. The method comprises the following steps: aiming at each module for interaction between an application layer to berealized by the APP and a system operation layer, selecting a base class and/or method, which needs to be inherited when the module is compiled and is not disclosed in the Android SDK, from the Android system; compiling and packaging into a jar package, and providing the jar package for an installation program APK of the APP to be compiled; packaging a hidden interface between an HIDL interface ofthe module and a system operation layer into another jar package, and providing the jar package as an interface dependence library for the APK for compiling; and compiling the APK by using the one jar package and the other jar package for each module. By applying the method, single-bin compiling of the application program can be realized.

Application Domain

Code compilation

Technology Topic

Software engineeringComputer engineering +2

Image

  • Compiling method of Android system application program
  • Compiling method of Android system application program
  • Compiling method of Android system application program

Examples

  • Experimental program(1)

Example Embodiment

[0022] In order to make the purpose, technical means and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings.
[0023] In the APP of the Android system, in order to realize specific functions, some modules may need to be implemented, and these modules are used to realize the interaction between the application layer and the system operation layer. For this type of module, after the introduction of the HIDL framework, the HIDL interface needs to be used, but the single warehouse compilation cannot be realized according to the existing method. Taking the RIL module as an example, figure 1 and figure 2 It is a schematic diagram of the interaction framework of RIL before and after the introduction of the HIDL framework. The RIL framework includes RILJ and RILC. like figure 1 As shown, before the introduction of the HIDL framework, RILJ and RILC are connected through the socket interface, which can realize single warehouse compilation. like figure 2 As shown, after the introduction of the HIDL framework, the interface between RILJ and RILC becomes a HIDL interface, but the classes HwBinder, HwBlob, HwParcel, IHwBinder, and IHwInterface that need to be inherited when implementing HIDL are @hide attributes, and the WorkSource that needs to be used The getName, get, size and other methods of the class are also @hide attributes. The base classes and methods of these @hide attributes are not open in the androidSDK; at the same time, the LTERadio interface defined in the interface that needs to be used when implementing the RIL module cannot be packaged into SDK. Since the above-mentioned hidden classes, methods, and interfaces are not packaged into the SDK, they cannot be directly provided to APK developers. As a result, single-bin compilation of RIL modules cannot be realized, which in turn affects the compilation of the entire APP.
[0024] In view of the above situation, this application provides an APP compilation method, which can realize single-compartment compilation for each module used to realize the interaction between the application layer and the system operation layer, thereby ensuring that the entire APP realizes single-compartment compilation.
[0025] image 3 It is a schematic flow chart of the APP compilation method in this application. like figure 1 As shown, the method includes:
[0026] Step 301, for each module of the interaction between the application layer and the system operation layer to be implemented by the APP, select a base class and/or method that needs to be inherited when compiling the corresponding module and that is not disclosed in the Android SDK, compile it and package it A jar package is provided to the APK of the APP for compilation.
[0027] Taking the implementation of RIL module as an example, when compiling the RIL module, you need to inherit the base classes and methods that are not public in the Android SDK, that is, the HwBinder class, HwBlob class, HwParcel class, IHwBinder class, IHwInterface class, and WorkSource class. methods such as getName, get and size, compile the above selected classes and methods and pack them into a jar package, such as hidlSupport.jar.
[0028] The same is done for other similar modules. For some modules, all the base classes that may be required for implementation are already included in the SDK, and only some methods are not included, then only these hidden methods are compiled and packaged; All methods are included in the SDK, only some base classes are not included, then only these hidden base classes are compiled and packaged. In the actual implementation process, according to the different situations of each module, select the corresponding base class and/or method to compile and package.
[0029] When providing the packaged jar package to the APK for compilation, the specific processing can be: copy the jar package to the APK compilation project, and mark it as only compiling and relying on the jar package, but the released APK does not include the jar Bag.
[0030] Step 302, corresponding to each module in step 301, pack the hidden interface between the HIDL interface for the corresponding module and the system operation layer into another jar package, and provide it to the APK as an interface dependency library for compilation.
[0031] Take the implementation of the RIL module as an example. For the RIL module, the hidden interface between the HIDL interface and the system operation layer is the LTERadio interface defined in Interface. Therefore, this interface is packaged into a jar package, such as LTERadiointerface.jar.
[0032] Corresponding to different modules, the hidden interfaces may also be different. In practical applications, select the appropriate interface according to the actual situation and package it into a jar package.
[0033]When providing the packaged interface jar package to the APK for compilation, the specific processing can be the same as in step 301: copy the jar package to the APK compilation project, and mark it as only compiling and relying on the jar package, and the published The jar package is not included in the APK.
[0034] Step 303, using the jar package for each module to compile the APK.
[0035] For an APP, if each module that the APP is to implement that depends on the HIDL interface has provided the corresponding jar package, the APK of the APP can be compiled in a single warehouse.
[0036] So far, the procedure of the APP compiling method in this application ends.
[0037] Figure 4 It is a schematic diagram of compilation dependencies for RIL modules. like Figure 4 As shown, a communication class APP (EcomApp), in order to realize the RIL module, has packaged hidlSupport.jar (from step 301) and lteradiointerface.jar (from step 302), and has established a dependency relationship with the RILJ AT component, And mark that this dependency is limited to compilation dependencies, and the released APK does not include hidlSupport.jar and lteradiointerface.jar; at the same time, the system comes with androidSdk, which can provide base classes, methods, and interfaces exposed in other SDKs. Through the above method, when compiling the APK of the APP, the base class, method and interface that the RILJ AT component needs to inherit can be found smoothly, so as to realize single warehouse compilation.
[0038] The above is the specific implementation of the APP compiling method in this application. Through the above method, the classes, methods, and interfaces that need to be used but hidden can be packaged into jar packages, and provided to APK dependencies, so as to realize single warehouse compilation of APK and improve the flexibility of developing and compiling APP.
[0039] The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the present invention. within the scope of protection.

PUM

no PUM

Description & Claims & Application Information

We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products