Multi-project, multi-device and multi-attribute Android project management method

Through the unified management of Android engineering management methods of multi-device, multi-project and multi-authorization, the problems of long development time and high cost under multi-device, multi-project and multi-authorization are solved, and rapid development and low-cost APP management are achieved.

CN119902794APending Publication Date: 2025-04-29SHENZHEN DAS INTELLITECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411861937.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-04-29

Smart Images

  • Figure CN119902794A_ABST
    Figure CN119902794A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Android engineering management, in particular to a multi-project multi-device multi-attribute Android engineering management method, which comprises the following steps: S1, preparing data; s2, creating an Android project, and generating a project directory, a device directory and a script directory; s3, data division and storage; on the basis, the management method comprises the following steps: selecting one or more pieces of project information, equipment information and attribute information from a project directory, an equipment directory and a script directory according to an APP demand, and combining the selected one or more pieces of project information, equipment information and attribute information through a script running file, and after unwanted combinations are filtered out, file packaging is carried out, and a version number and a file name are generated. According to the invention, random selection can be carried out according to customer demands, combinations can be quickly generated and packaged and then sent to customers, the working efficiency is remarkably improved, and the development time and the development cost are greatly saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Android project management, and in particular to a multi-project, multi-device, and multi-attribute Android project management method. Background Art

[0002] In the field of IoT, every customer has their own unique functional requirements for the products they use, but other than these unique requirements, the remaining functions are similar or even the same. There are also cases where the same function needs to run on devices of different sizes, so for product developers, it is particularly important to deal with these specific requirements and device adaptation management methods.

[0003] From a functional perspective, it is very common for customers to request unique functions, which may be simple or complex, reasonable or demanding. In such a highly competitive era, being able to quickly and conveniently meet customers' unique needs can enhance the competitiveness of a company's products.

[0004] From the perspective of devices, products should not only have multiple price ranges, but also provide customers with more choices. Therefore, programs with the same functions need to run on different devices. Not only are the device sizes different, but the appearance, system, and chips are also different. Even the same device has different authorizations. For example, the face algorithm of face recognition has software authorization and hardware authorization. Multiple devices may be used simultaneously in a project.

[0005] From the program naming point of view, for each project with special requirements and the program running on different devices, the version number should reflect the device name and project information to facilitate subsequent maintenance. The common method is to have one project per project and one project per device.

[0006] In summary, if an Android project APP needs to run on 6 devices and there are 40 unique project requirements, and the same device has both software and hardware authorizations, if one Android project code is maintained for each project, 6x40x2=480 Android projects will be needed. As the number of projects increases, the number of Android projects increases, and the maintenance difficulty increases. When these 480 Android projects need to add new functional programs or modify their original functional programs, each installation project needs to be added or modified separately, and 480 code programming operations need to be performed, which consumes the developer's energy and time on this repetitive work, resulting in high development time and development costs. Summary of the invention

[0007] In order to solve the technical problem that when an APP faces multiple devices, multiple projects and multiple authorizations, it is necessary to establish multiple Android projects according to different situations, which leads to long development time and high development cost. The present invention provides a multi-project, multi-device and multi-attribute Android project management method, which uniformly manages multiple devices, multiple projects and multiple authorizations, and freely selects and combines them for packaging according to APP requirements, with fast development speed and low cost.

[0008] The technical solution adopted by the present invention is to provide a multi-project, multi-device, and multi-attribute Android project management method, including:

[0009] S1. Prepare data.

[0010] Obtain or write project information, device information, property information, script running files and APP function program files;

[0011] S2. Create an Android project.

[0012] Create an Android project in an environment that supports Android development, and generate project directories, device directories, and script directories;

[0013] S3, data partitioning and storage

[0014] Encode and sort multiple different project information and store them in a project directory, encode and sort multiple different device information and store them in a device directory, and store multiple attribute information and script running files in a script directory;

[0015] The APP function program files are adapted according to different device information, and the adapted APP function program files are stored in the corresponding device information respectively;

[0016] On this basis, the management method includes, according to APP requirements, selecting one or more project information, device information and attribute information in the project directory, device directory and script directory, combining the selected one or more project information, device information and attribute information through the script running file, and packaging the files after filtering out unnecessary combinations to generate a version number and file name.

[0017] The attribute information includes a soft authorization file, a hard authorization file and a platform operation adaptation file.

[0018] The script running file includes an ignore script, a combination script, a version number generation script file and a file naming script.

[0019] The APP function program file includes a personalized function program and a general function program. The personalized function program is adapted according to different device information and then stored in the corresponding device information. The general function program is encapsulated as a separate file in the device directory.

[0020] When one or more APP function program files need to be optimized or updated, the corresponding APP function program files are found in the Android project for optimization or update, and then selected and combined according to the needs.

[0021] When one or more new project information, device information, and property information are added, they are added to the project directory, device directory, and property directory respectively, and associated with the script running file, and selected and combined according to needs.

[0022] The beneficial effect of the present invention is that it provides a multi-project, multi-device, and multi-attribute Android project management method. According to customer needs, you can freely choose among projects, devices, and authorization methods. After generating all combinations, you can screen out combinations that meet the conditions and directly package them. In this way, no matter how many data and types of projects, devices, and attributes there are, this method can be used for clear management. There is no need to establish an independent Android project for each different project, device, and attribute. You can arbitrarily choose and match according to customer needs, and directly generate combinations with different needs, which greatly reduces the workload of developers and significantly improves the development efficiency of developers.

[0023] When optimizing and updating the APP, only one modification needs to be made in the Android project of the present invention, and a selection can be made based on the original multiple APPs with different requirements, and multiple combinations of APPs with optimized updates can be directly generated without optimizing and updating each APP with different adaptations. Similarly, when a new APP function program file appears, only one addition needs to be made to the Android project, and multiple combinations of APPs can be directly generated based on APP requirements without adding them to each APP, thereby greatly reducing the maintenance cost and time of the APP. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0025] like Figure 1 As shown, the present invention provides a multi-project, multi-device, and multi-attribute Android project management method, comprising:

[0026] S1. Prepare data.

[0027] Obtain or write project information, device information, attribute information, script running files and APP function program files; project information includes basic information such as project name, project time, project requirements, etc., device information includes basic information such as device name, device category, device model, device hardware information, etc., attribute information includes authorization method, operating platform and other information, APP function program files include function program files required for APP operation.

[0028] S2. Create an Android project.

[0029] Create an Android project in an environment that supports Android development, and generate project directories, device directories, and script directories;

[0030] S3, data partitioning and storage

[0031] Encode and sort multiple different project information and store them in a project directory, encode and sort multiple different device information and store them in a device directory, and store multiple attribute information and script running files in a script directory;

[0032] The APP function program files are adapted according to different device information, and the adapted APP function program files are stored in the corresponding device information respectively;

[0033] On this basis, the management method includes, according to APP requirements, selecting one or more project information, device information and attribute information in the project directory, device directory and script directory, combining the selected one or more project information, device information and attribute information through the script running file, and packaging the files after filtering out unnecessary combinations to generate a version number and file name.

[0034] like Figure 1 As shown, the attribute information includes a soft authorization file, a hard authorization file and a platform operation adaptation file.

[0035] like Figure 1 As shown, the script running file includes an ignore script, a combination script, a version number generation script file and a file naming script.

[0036] like Figure 1 As shown, the APP function program file includes a personalized function program and a general function program. The personalized function program is adapted according to different device information and then stored in the corresponding device information. The general function program is encapsulated as a separate file in the device directory.

[0037] like Figure 1As shown, when one or more APP function program files need to be optimized or updated, the corresponding APP function program files are found in the Android project for optimization or update, and then selected and combined according to the needs.

[0038] like Figure 1 As shown, when one or more project information, device information, and property information are added, they are added to the project directory, device directory, and property directory respectively, and associated with the script running file, and selected and combined according to needs.

[0039] In order to facilitate further understanding of the present invention, the following will be explained by taking one Android project to manage three projects, three devices, and one authorization method.

[0040] 1. Create an Android project, for example: MultiProjManager.

[0041] 2. Define dimensions: Use the flavorDimensions field in the build.gradle configuration file of the APP module to declare dimensions, and define multiple devices, multiple projects, and authorization methods into three different dimensions, for example: pro, device, and auth.

[0042] 3. Write device signatures: Write the signatures of each device in the signingConfigs signature configuration file.

[0043] 4. Dynamic binding signature: When defining the Flavor virtual machine instance template in the productFlavor source code file or resource file, define the dimension quantity as three flavors of the device device, namely D10, D11, and D12, and specify the signature of each device in step 3.

[0044] 5. Set the release / debug signature attribute to null to facilitate dynamic binding of signatures. Set the signingConfig attribute to null in buildTypes.

[0045] 6. Define flavor: When defining flavor in productFlavor, define each device as a flavor. The dimension specified in the flavor is the same. Here, three items are defined, for example: pro1, pro2, pro3.

[0046] 7. Write an ignore file in variantFilter to filter out unnecessary dimension combinations, retaining only the combinations that need to be packaged for actual use, and write an ignore script in variantFilter.

[0047] 8. Write the version number and package file name script in APPlicationVariants.all, and dynamically name it according to the selected flavor. For different projects and different devices, the version number file name should be different. Define a variable VERSION in the script to the BuildConfig class, and the actual version number can be taken from the VERSION of BuildConfig; the file name is also dynamically composed when packaging.

[0048] 9. Device adaptation: Use ScreenMatnc for size adaptation. Do not write the specific size for each size, but change it to a reference size. In this way, the size of the corresponding resolution will be automatically loaded during operation.

[0049] 10. If different projects have different UI layouts, you can create the current folder name under the src directory, and then put different layout files, icons and other resource files into it.

[0050] 11. Functional program management: encapsulate functions into different Java classes, extract and encapsulate common functions. If there are common requirements, you can add properties to the flavor's BuildConfig for unified management.

[0051] Through the above steps, you can see the permutations and combinations of Variants in the three dimensions of device, project, and authorization in Build Variants, corresponding to different devices, different projects, and different authorization programs.

[0052] After following the above process, we can freely package the program to run on which device and which project. In this way, no matter how many projects, devices, and authorization methods there are, they can be combined arbitrarily according to customer needs, which can greatly reduce the time of development costs, improve the efficiency of developers, and reduce development costs.

Claims

1. A multi-project, multi-device, and multi-attribute Android project management method, characterized by: include, S1. Prepare data. Obtain or write project information, device information, property information, script running files and APP function program files; S2. Create an Android project. Create an Android project in an environment that supports Android development, and generate project directories, device directories, and script directories; S3, data partitioning and storage Encode and sort multiple different project information and store them in a project directory, encode and sort multiple different device information and store them in a device directory, and store multiple attribute information and script running files in a script directory; The APP function program files are adapted according to different device information, and the adapted APP function program files are stored in the corresponding device information respectively; On this basis, the management method includes, according to APP requirements, selecting one or more project information, device information and attribute information in the project directory, device directory and script directory, combining the selected one or more project information, device information and attribute information through the script running file, and packaging the files after filtering out unnecessary combinations to generate a version number and file name.

2. A multi-project, multi-device, multi-attribute Android project management method according to claim 1, characterized in that: The attribute information includes a soft authorization file, a hard authorization file and a platform operation adaptation file.

3. According to claim 1, a multi-project, multi-device, multi-attribute Android project management method is characterized by: The script running file includes an ignore script, a combination script, a version number generation script file and a file naming script.

4. The multi-project, multi-device, multi-attribute Android project management method according to claim 1, characterized in that: The APP function program file includes a personalized function program and a general function program. The personalized function program is adapted according to different device information and then stored in the corresponding device information. The general function program is encapsulated as a separate file in the device directory.

5. The multi-project, multi-device, multi-attribute Android project management method according to claim 1, characterized in that: When one or more APP function program files need to be optimized or updated, the corresponding APP function program files are found in the Android project for optimization or update, and then selected and combined according to the needs.

6. A multi-project, multi-device, multi-attribute Android project management method according to claim 1, characterized in that: When one or more new project information, device information, and property information are added, they are added to the project directory, device directory, and property directory respectively, and associated with the script running file, and selected and combined according to needs.