Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
FIG. 1 is a flowchart illustrating a preferred embodiment of a method for recommending download of an application program according to the present invention. The order of the steps in the flow chart may be changed and some steps may be omitted according to different needs.
The recommended downloading method of the Application program is applied to one or more electronic devices, which are devices capable of automatically performing numerical calculation and/or information processing according to preset or stored instructions, and the hardware of the electronic devices includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The electronic device may be any electronic product capable of performing human-computer interaction with a user, for example, a Personal computer, a tablet computer, a smart phone, a Personal Digital Assistant (PDA), a game machine, an interactive Internet Protocol Television (IPTV), an intelligent wearable device, and the like.
The electronic device may also include a network device and/or a user device. The network device includes, but is not limited to, a single network server, a server group consisting of a plurality of network servers, or a cloud computing (cloud computing) based cloud consisting of a large number of hosts or network servers.
The Network where the electronic device is located includes, but is not limited to, the internet, a wide area Network, a metropolitan area Network, a local area Network, a Virtual Private Network (VPN), and the like.
The flow of the preferred embodiment of the method for recommending and downloading the application program by the electronic device is specifically as follows.
And S10, when the application program download address is detected, acquiring the download address as a target download address.
In at least one embodiment of the present invention, after acquiring the application program download address, the electronic device may process the application program download address, and then recommend the application program corresponding to the application program download address to other users for downloading, where a specific processing procedure will be described in detail below.
Specifically, the application program download address may be obtained from any channel, which is not limited in the present invention.
Specifically, the arbitrary channels may include, but are not limited to: any application download website, any application download platform, etc.
And S11, converting the target download address into a target two-dimensional code.
In at least one embodiment of the present invention, the electronic device converting the target download address into a target two-dimensional code includes:
the electronic equipment analyzes the target download address to obtain an encoding mode, further, the electronic equipment encodes the target download address in the encoding mode to obtain a data code, generates an error correcting code according to the data code, integrates the data code and the error correcting code to generate a target code, and inputs the target code into a matrix to obtain the target two-dimensional code.
Among them, the two-dimensional code is a special type of barcode created by Denso Wave Incorporated. Two-dimensional codes encode text and numbers using a pattern of pixels that is easily read by an optical scanner. The dimension code is a special type of bar code and can encode information such as numbers, letters, Japanese characters and the like.
Specifically, the step of converting the target download address into the target two-dimensional code by the electronic device mainly includes the following steps:
(1) and (6) analyzing the data.
The two-dimensional code encodes a string of text. The two-dimensional code standard has four coding modes: numbers, characters, bytes, and japanese. Each encoding mode encodes text as a string of binary digits (1 and 0), but each mode converts text to binary digits using a different method, and each encoding mode encodes data using the shortest possible string of binary digits. The first step should therefore be to perform a data analysis to determine if the target download address can conform to the encoding of a number, letter, byte or japanese pattern and then select the optimized encoding pattern.
(2) And (6) encoding data.
After a proper coding mode is selected for the target download address, the next step is to code the target download address and generate a plurality of groups of 8-bit-length data codes.
(3) An error correction code (Reed-Solomon error correction) is generated.
And after generating the data code corresponding to the target download address, the electronic equipment further generates the error correction code according to the data code. The data code and the error correction code may be read using any two-dimensional code scanner. By comparing the two codewords, the two-dimensional code scanner can determine whether data is correctly read, and if data is not correctly read, errors of the data code can be corrected using the error correction code.
(4) And (5) finally coding.
The electronic device arranges the data code and the error correction code in a certain order.
Specifically, for a large-sized two-dimensional code, the data code and the error correction code must be arranged in blocks, and the blocks must be staggered according to the specification of the two-dimensional code.
(5) The modules are placed in a matrix.
After arranging the data code and the error correction code, these binary digits are placed in a specific way in a two-dimensional code matrix.
(6) A mask pattern.
Two-dimensional code scanners sometimes have difficulty in correctly reading a particular pattern of code words. For this case, eight mask patterns are defined in the two-dimensional code specification, and each specific pattern may change the original two-dimensional code pattern.
(7) Format and version information.
Format and (if necessary) version information are added to the blank specific area in the two-dimensional code matrix. The format information defines an error correction level and a pattern of the mask pattern. The version information defines the size of the two-dimensional code matrix.
Through the implementation mode, the target download address can be automatically converted into the target two-dimensional code for subsequent use.
And S12, packaging the target two-dimensional code to generate an executable target installation package.
In at least one embodiment of the present invention, the packaging, by the electronic device, the target two-dimensional code, and the generating the executable target installation package includes:
and the electronic equipment stores the target two-dimensional code into a source code resource file to obtain a resource file, and further packages the resource file to generate the executable target installation package.
Wherein the packaging the resource file by the electronic device, and the generating the executable target installation package comprises:
the electronic equipment packages the resource files to generate R.java files and acquires AIDL files from the resource files, processes the AIDL files to generate corresponding java files, compiles the java files to generate corresponding class files, converts the class files into dex files supported by a Davik VM, further packages the dex files and generates the target installation package.
Specifically, package compilation of applications is a specific engineering problem, so the present invention first introduces the related package compilation tools as shown in table 1:
TABLE 1
Further, the flow of packaging the target two-dimensional code by the electronic device is as follows:
1) and the electronic equipment packs the resource file to generate an R.java file.
Compiling the R.java class needs to use an aapt tool provided by the android SDK, and the concrete process of compiling the R.java file by the apt is as follows: and entering an application program directory to create a gen directory, wherein because no gen directory exists, the command has an error that a file cannot be found, and after the command is successfully executed, a directory tree and an R.java file with a package structure are generated under the gen directory.
2) And the electronic equipment processes the AIDL file and generates a corresponding java file.
The electronic equipment adopts an aidl tool carried by the android SDK to generate a java file from the aidl file. And (5) operating an aidl tool to convert the aidl file into a java file.
3) And the electronic equipment compiles the java file to generate a corresponding class file.
The electronic equipment compiles the original java file to generate a class file, and the specific command is as follows:
javac-encoding utf-8-target 1.5-bootclasspathE:\Androiddev\android-sdk-windows2.2\platforms\android-3\android.jar-d binsrc\com\byread\reader\*.java gen\com\byread\reader\R.java
the commands specify a program encoding mode, a source file position and a starting position of the adroid boot.
4) The electronic device converts the class file into a dex file supported by the Davik VM.
The electronic equipment compiles class files under the engineering bin directory into classes.
5) And the electronic equipment packs the dex file to generate the target installation package.
Through the implementation mode, the electronic equipment can automatically generate the available target installation package for storage and reservation.
In at least one embodiment of the invention, the method further comprises:
the electronic equipment signs the target installation package by using a jar scanner command, generates a signed packaging program, and aligns the packaging program.
Specifically, the electronic device first packages and generates an unsigned apk file, i.e., the target installation package. Specifically, the electronic device packages the packaged resource file, the packaged class file dex file and the libs file by using an apkbuilder tool to generate an unsigned apk file, and then signs the unsigned apk file by using a jarsinger tool to generate a signed packaging program, and the electronic device processes the signed packaging program, otherwise, the electronic device cannot release the signed packaging program.
With the above embodiment, the target installation package can be released, so that the target installation package can be used in a wide range.
And S13, saving the target installation package.
In at least one embodiment of the invention, the electronic device may save the target installation package locally to facilitate invocation.
Of course, in other embodiments, the electronic device may also store the target installation package in another server or database, which is not limited by the present invention.
S14, configuring a trigger event for the target installation package.
Specifically, the trigger event is used to trigger the recommended download of the target installation package.
In at least one embodiment of the present invention, the electronic device configuring the trigger event to the target installation package includes:
the electronic equipment determines an event to be modified, and configures the event to be modified as the trigger event based on an event interception/distribution mechanism of the event to be modified.
Wherein, the event to be modified may be a touch event or the like.
It can be understood that the graphical user interface structure of the Android is a tree structure, the top layer (root node) of the tree is a View group contained in Activity, a plurality of View group nodes are arranged below the tree, a plurality of View group nodes or View nodes are arranged below each node, and so on. The delivery and handling of Touch events is closely related to this structure. A full touch event consists of one ACTION _ DOWN, zero or one or more ACTION _ MOVEs, and one ACTION _ UP.
For example: the electronic device may configure the touch event as the trigger event in the following manner.
(1) Event distribution: public boilean dispatctchTouchent (motionEvent ev)
When a Touch event occurs, the dispatch Touch () method of Activity will transmit the event to the dispatch Touch () of the outermost View in a tunnel mode (i.e., sequentially passing from the root node down to the innermost child node or stopping transmission due to a certain condition in a certain node in the middle), and distribute the event by the dispatch Touch () of the View.
The event distribution logic for the dispatchTouchent is as follows:
return true: events are distributed to the current View and consumed by the DispatcTouchEvent () method, while events stop passing down.
return false: returning the event to the ontouchvent () of the previous level (maybe Activity, also maybe parent View) of the current View for consumption.
Dispatch touch (ev): events are automatically distributed to the onInterceptTouchent method of the current View. It should be noted that the premise of the View response dispatctchtouchvent and onInterceptttouchvent is that a child View can be added to the View, that is, the View has child nodes to distribute and intercept.
(2) Event interception: public borolan onInterceptTouchent (MotionEvent ev)
When the dispatch touch () method of the outer View returns a super.
The event interception logic of onInterceptTouchent is as follows:
return true: and intercepting the event, and handing the intercepted event to ontouchvent () of the current View for processing.
return false: and releasing the event, transmitting the event on the current View to the child View, and continuously distributing the event by the dispatch TouchEvent () of the child View.
Turn super. onInterceptTouchavent (ev): the event is intercepted by default, and the intercepted event is handed over to the ontouchvent () of the current View for processing.
(3) And (3) event response: public boilean on Touchent (MotionEvent ev)
The condition under which ontouchempty () is called can be known by (1) and (2).
The event response logic for onTouchEvent is as follows:
return false: events are passed up from the current View and are all received by the onTouchEvent () of the top View, and if the onTouchEvent () passed to the top returns false, the event "disappears" and the next event is not received.
return true: the event is received and consumed.
Turn super. The logic for the default handling event is the same as the return false.
Further, the method further comprises:
when the trigger event is detected, the electronic equipment displays the target two-dimensional code for scanning.
Specifically, the electronic device sets an OnTouchListener listener, and then the OnTouchListener method is executed first in the execution process, and then whether the ontouchvent method needs to be executed is determined according to the return value. Whether ontouchevevent needs to be called is related to the value of result: if result is true, no call is made; otherwise, it is called. The onTouchEvent function is modified so that when the touch event is triggered, an application two-dimensional code picture is displayed.
Through the implementation mode, when the trigger event is detected to be triggered, the target two-dimensional code can be directly displayed for scanning and downloading by a user, so that the application program is quickly recommended and downloaded, the time for the user to inquire is saved, and the method is more friendly and convenient.
In summary, according to the present invention, when an application program download address is detected, the download address is obtained as a target download address, the target download address is converted into a target two-dimensional code, the target two-dimensional code is further packaged to generate an executable target installation package, the target installation package is stored, and a trigger event for the target installation package is configured, so that recommendation download for the application program is realized, a user searches for the target installation package manually in an unordered manner, and download efficiency is improved.
FIG. 2 is a functional block diagram of an application recommendation downloading device according to a preferred embodiment of the present invention. The application recommendation downloading device 11 includes an obtaining unit 110, a converting unit 111, a packaging unit 112, a saving unit 113, a configuring unit 114, a signing unit 115, an aligning unit 116, and a displaying unit 117. The module/unit referred to in the present invention refers to a series of computer program segments that can be executed by the processor 13 and that can perform a fixed function, and that are stored in the memory 12. In the present embodiment, the functions of the modules/units will be described in detail in the following embodiments.
When the application download address is detected, the acquisition unit 110 acquires the download address as a target download address.
In at least one embodiment of the present invention, after the obtaining unit 110 obtains the application program download address, the application program download address may be processed, and an application program corresponding to the application program download address is recommended to other users for downloading, where a specific processing procedure will be described in detail below.
Specifically, the application program download address may be obtained from any channel, which is not limited in the present invention.
Specifically, the arbitrary channels may include, but are not limited to: any application download website, any application download platform, etc.
The conversion unit 111 converts the target download address into a target two-dimensional code.
In at least one embodiment of the present invention, the converting unit 111 converts the target download address into a target two-dimensional code, including:
the conversion unit 111 analyzes the target download address to obtain an encoding mode, further, the conversion unit 111 encodes the target download address in the encoding mode to obtain a data code, generates an error correction code according to the data code, integrates the data code and the error correction code to generate a target code, and inputs the target code into a matrix to obtain the target two-dimensional code.
Among them, the two-dimensional code is a special type of barcode created by Denso Wave Incorporated. Two-dimensional codes encode text and numbers using a pattern of pixels that is easily read by an optical scanner. The dimension code is a special type of bar code and can encode information such as numbers, letters, Japanese characters and the like.
Specifically, the converting unit 111 converts the target download address into the target two-dimensional code mainly includes the following processes:
(1) and (6) analyzing the data.
The two-dimensional code encodes a string of text. The two-dimensional code standard has four coding modes: numbers, characters, bytes, and japanese. Each encoding mode encodes text as a string of binary digits (1 and 0), but each mode converts text to binary digits using a different method, and each encoding mode encodes data using the shortest possible string of binary digits. The first step should therefore be to perform a data analysis to determine if the target download address can conform to the encoding of a number, letter, byte or japanese pattern and then select the optimized encoding pattern.
(2) And (6) encoding data.
After a proper coding mode is selected for the target download address, the next step is to code the target download address and generate a plurality of groups of 8-bit-length data codes.
(3) An error correction code (Reed-Solomon error correction) is generated.
And after generating the data code corresponding to the target download address, the electronic equipment further generates the error correction code according to the data code. The data code and the error correction code may be read using any two-dimensional code scanner. By comparing the two codewords, the two-dimensional code scanner can determine whether data is correctly read, and if data is not correctly read, errors of the data code can be corrected using the error correction code.
(4) And (5) finally coding.
The conversion unit 111 arranges the data code and the error correction code in a certain order.
Specifically, for a large-sized two-dimensional code, the data code and the error correction code must be arranged in blocks, and the blocks must be staggered according to the specification of the two-dimensional code.
(5) The modules are placed in a matrix.
After arranging the data code and the error correction code, these binary digits are placed in a specific way in a two-dimensional code matrix.
(6) A mask pattern.
Two-dimensional code scanners sometimes have difficulty in correctly reading a particular pattern of code words. For this case, eight mask patterns are defined in the two-dimensional code specification, and each specific pattern may change the original two-dimensional code pattern.
(7) Format and version information.
Format and (if necessary) version information are added to the blank specific area in the two-dimensional code matrix. The format information defines an error correction level and a pattern of the mask pattern. The version information defines the size of the two-dimensional code matrix.
Through the implementation mode, the target download address can be automatically converted into the target two-dimensional code for subsequent use.
The packing unit 112 packs the target two-dimensional code to generate an executable target installation package.
In at least one embodiment of the present invention, the packing unit 112 packs the target two-dimensional code, and generating the executable target installation package includes:
the packing unit 112 stores the target two-dimensional code into a source code resource file to obtain a resource file, further packs the resource file, and generates the executable target installation package.
Wherein the packaging unit 112 packages the resource file, and generating the executable target installation package includes:
the packing unit 112 packs the resource files to generate r.java files and acquire aid file from the resource files, the packing unit 112 processes the aid file to generate corresponding java files and compiles the java files to generate corresponding class files, and the packing unit 112 converts the class files into dex files supported by Davik VM and further packs the dex files to generate the target installation package.
Specifically, package compilation of applications is a specific engineering problem, so the present invention first introduces the related package compilation tools as shown in table 1:
TABLE 1
Further, the flow of packing the target two-dimensional code by the packing unit 112 is as follows:
1) the packing unit 112 packs the resource file to generate an r.java file.
Compiling the R.java class needs to use an aapt tool provided by the android SDK, and the concrete process of compiling the R.java file by the apt is as follows: and entering an application program directory to create a gen directory, wherein because no gen directory exists, the command has an error that a file cannot be found, and after the command is successfully executed, a directory tree and an R.java file with a package structure are generated under the gen directory.
2) The packing unit 112 processes the aid dl file to generate a corresponding java file.
The packing unit 112 generates the java file from the aidl file by using an aidl tool carried by android sdk. And (5) operating an aidl tool to convert the aidl file into a java file.
3) The packing unit 112 compiles the java file to generate a corresponding class file.
The packing unit 112 compiles the original java file to generate a class file, and the specific command is as follows:
javac-encoding utf-8-target 1.5-bootclasspathE:\Androiddev\android-sdk-windows2.2\platforms\android-3\android.jar-d binsrc\com\byread\reader\*.java gen\com\byread\reader\R.java
the commands specify a program encoding mode, a source file position and a starting position of the adroid boot.
4) The packaging unit 112 converts the class file into a dex file supported by the Davik VM.
The packing unit 112 compiles the class file under the engineering bin directory into classes.
5) The packing unit 112 packs the dex file to generate the target installation package.
With the above embodiment, the packaging unit 112 can automatically generate the available target installation package for saving and reserving.
In at least one embodiment of the invention, the method further comprises:
the signing unit 115 signs the target installation package by using a jarsegner command to generate a signed packaging program, and the aligning unit 116 aligns the packaging program.
Specifically, the packaging unit 112 first packages and generates an unsigned apk file, i.e., the target installation package. Specifically, the packing unit 112 packs the packed resource file, the packed class file dex file, and the libs file by using an apkbuilder tool to generate an unsigned apk file, the signing unit 115 signs the unsigned apk file by using a jarsinger tool to generate a signed packing program, and the aligning unit 116 processes the signed packing program, otherwise, the signed packing program cannot be issued.
With the above embodiment, the target installation package can be released, so that the target installation package can be used in a wide range.
The saving unit 113 saves the target installation package.
In at least one embodiment of the invention, the saving unit 113 may save the target installation package locally to facilitate the invocation.
Of course, in other embodiments, the saving unit 113 may also save the target installation package in other servers or databases, and the present invention is not limited thereto.
The configuration unit 114 configures a trigger event for the target installation package.
Specifically, the trigger event is used to trigger the recommended download of the target installation package.
In at least one embodiment of the present invention, the configuring unit 114 configures the trigger event for the target installation package, including:
the configuration unit 114 determines an event to be modified, and configures the event to be modified as the trigger event based on an event interception/distribution mechanism of the event to be modified.
Wherein, the event to be modified may be a touch event or the like.
It can be understood that the graphical user interface structure of the Android is a tree structure, the top layer (root node) of the tree is a View group contained in Activity, a plurality of View group nodes are arranged below the tree, a plurality of View group nodes or View nodes are arranged below each node, and so on. The delivery and handling of Touch events is closely related to this structure. A full touch event consists of one ACTION _ DOWN, zero or one or more ACTION _ MOVEs, and one ACTION _ UP.
For example: the configuration unit 114 may configure the touch event as the trigger event in the following manner.
(1) Event distribution: public boilean dispatctchTouchent (motionEvent ev)
When a Touch event occurs, the dispatch Touch () method of Activity will transmit the event to the dispatch Touch () of the outermost View in a tunnel mode (i.e., sequentially passing from the root node down to the innermost child node or stopping transmission due to a certain condition in a certain node in the middle), and distribute the event by the dispatch Touch () of the View.
The event distribution logic for the dispatchTouchent is as follows:
return true: events are distributed to the current View and consumed by the DispatcTouchEvent () method, while events stop passing down.
return false: returning the event to the ontouchvent () of the previous level (maybe Activity, also maybe parent View) of the current View for consumption.
Dispatch touch (ev): events are automatically distributed to the onInterceptTouchent method of the current View. It should be noted that the premise of the View response dispatctchtouchvent and onInterceptttouchvent is that a child View can be added to the View, that is, the View has child nodes to distribute and intercept.
(2) Event interception: public borolan onInterceptTouchent (MotionEvent ev)
When the dispatch touch () method of the outer View returns a super.
The event interception logic of onInterceptTouchent is as follows:
return true: and intercepting the event, and handing the intercepted event to ontouchvent () of the current View for processing.
return false: and releasing the event, transmitting the event on the current View to the child View, and continuously distributing the event by the dispatch TouchEvent () of the child View.
Turn super. onInterceptTouchavent (ev): the event is intercepted by default, and the intercepted event is handed over to the ontouchvent () of the current View for processing.
(3) And (3) event response: public boilean on Touchent (MotionEvent ev)
The condition under which ontouchempty () is called can be known by (1) and (2).
The event response logic for onTouchEvent is as follows:
return false: events are passed up from the current View and are all received by the onTouchEvent () of the top View, and if the onTouchEvent () passed to the top returns false, the event "disappears" and the next event is not received.
return true: the event is received and consumed.
Turn super. The logic for the default handling event is the same as the return false.
Further, the method further comprises:
when the trigger event is detected, the display unit 117 displays the target two-dimensional code for scanning.
Specifically, the display unit 117 sets an OnTouchListener monitor, and then the OnTouchListener method is executed first during the execution process, and then it is determined whether the ontouchvent method needs to be executed according to the return value. Whether ontouchevevent needs to be called is related to the value of result: if result is true, no call is made; otherwise, it is called. The onTouchEvent function is modified so that when the touch event is triggered, an application two-dimensional code picture is displayed.
Through the implementation mode, when the trigger event is detected to be triggered, the target two-dimensional code can be directly displayed for scanning and downloading by a user, so that the application program is quickly recommended and downloaded, the time for the user to inquire is saved, and the method is more friendly and convenient.
In summary, according to the present invention, when an application program download address is detected, the download address is obtained as a target download address, the target download address is converted into a target two-dimensional code, the target two-dimensional code is further packaged to generate an executable target installation package, the target installation package is stored, and a trigger event for the target installation package is configured, so that recommendation download for the application program is realized, a user searches for the target installation package manually in an unordered manner, and download efficiency is improved.
Fig. 3 is a schematic structural diagram of an electronic device implementing a method for recommending and downloading an application according to a preferred embodiment of the present invention.
The electronic device 1 is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and its hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The electronic device 1 may also be, but not limited to, any electronic product that can perform human-computer interaction with a user through a keyboard, a mouse, a remote controller, a touch panel, or a voice control device, for example, a Personal computer, a tablet computer, a smart phone, a Personal Digital Assistant (PDA), a game machine, an Internet Protocol Television (IPTV), an intelligent wearable device, and the like.
The electronic device 1 may also be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices.
The Network where the electronic device 1 is located includes, but is not limited to, the internet, a wide area Network, a metropolitan area Network, a local area Network, a Virtual Private Network (VPN), and the like.
In one embodiment of the present invention, the electronic device 1 includes, but is not limited to, a memory 12, a processor 13, and a computer program, such as an application recommendation download program, stored in the memory 12 and executable on the processor 13.
It will be appreciated by a person skilled in the art that the schematic diagram is only an example of the electronic device 1 and does not constitute a limitation of the electronic device 1, and that it may comprise more or less components than shown, or some components may be combined, or different components, e.g. the electronic device 1 may further comprise an input output device, a network access device, a bus, etc.
The Processor 13 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. The processor 13 is an operation core and a control center of the electronic device 1, and is connected to each part of the whole electronic device 1 by various interfaces and lines, and executes an operating system of the electronic device 1 and various installed application programs, program codes, and the like.
The processor 13 executes an operating system of the electronic device 1 and various installed application programs. The processor 13 executes the application program to implement the steps in the above-mentioned respective application program recommended downloading method embodiments, such as the steps S10, S11, S12, S13, and S14 shown in fig. 1.
Alternatively, the processor 13, when executing the computer program, implements the functions of the modules/units in the above device embodiments, for example: when an application program downloading address is detected, acquiring the downloading address as a target downloading address; converting the target download address into a target two-dimensional code; packing the target two-dimensional code to generate an executable target installation package; saving the target installation package; and configuring a trigger event for the target installation package, wherein the trigger event is used for triggering the recommended downloading of the target installation package.
Illustratively, the computer program may be divided into one or more modules/units, which are stored in the memory 12 and executed by the processor 13 to accomplish the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program in the electronic device 1. For example, the computer program may be divided into an acquisition unit 110, a conversion unit 111, a packaging unit 112, a saving unit 113, a configuration unit 114, a signature unit 115, an alignment unit 116, and a display unit 117.
The memory 12 can be used for storing the computer programs and/or modules, and the processor 13 implements various functions of the electronic device 1 by running or executing the computer programs and/or modules stored in the memory 12 and calling data stored in the memory 12. The memory 12 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 12 may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
The memory 12 may be an external memory and/or an internal memory of the electronic device 1. Further, the memory 12 may be a circuit having a memory function without any physical form In the integrated circuit, such as a RAM (Random-access memory), a FIFO (First In First Out), and the like. Alternatively, the memory 12 may be a memory in a physical form, such as a memory stick, a TF Card (Trans-flash Card), or the like.
The integrated modules/units of the electronic device 1 may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented.
Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, etc. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
With reference to fig. 1, the memory 12 of the electronic device 1 stores a plurality of instructions to implement an application recommendation download method, and the processor 13 can execute the plurality of instructions to implement: when an application program downloading address is detected, acquiring the downloading address as a target downloading address; converting the target download address into a target two-dimensional code; packing the target two-dimensional code to generate an executable target installation package; saving the target installation package; and configuring a trigger event for the target installation package, wherein the trigger event is used for triggering the recommended downloading of the target installation package.
According to a preferred embodiment of the present invention, the processor 13 further executes a plurality of instructions including:
analyzing the target download address to obtain a coding mode;
coding the target download address in the coding mode to obtain a data code;
generating an error correcting code according to the data code;
integrating the data code and the error correcting code to generate a target code;
and inputting the target code into a matrix to obtain the target two-dimensional code.
According to a preferred embodiment of the present invention, the processor 13 further executes a plurality of instructions including:
storing the target two-dimensional code into a source code resource file to obtain a resource file;
and packaging the resource file to generate the executable target installation package.
According to a preferred embodiment of the present invention, the processor 13 further executes a plurality of instructions including:
packaging the resource file to generate an R.java file;
acquiring an AIDL file from the resource file;
processing the AIDL file to generate a corresponding java file;
compiling the java file to generate a corresponding class file;
converting the class file into a dex file supported by a Davik VM;
and packaging the dex file to generate the target installation package.
According to a preferred embodiment of the present invention, the processor 13 further executes a plurality of instructions including:
signing the target installation package by using a jar command to generate a signed packaging program;
and carrying out alignment processing on the packaging program.
According to a preferred embodiment of the present invention, the processor 13 further executes a plurality of instructions including:
determining an event to be modified;
and configuring the event to be modified as the trigger event based on the event interception/distribution mechanism of the event to be modified.
According to a preferred embodiment of the present invention, the processor 13 further executes a plurality of instructions including:
and when the trigger event is detected, displaying the target two-dimensional code for scanning.
Specifically, the processor 13 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the instruction, which is not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.