The sharing method of application program between the portable terminal in the LAN (Local Area Network)Technical field
The present invention relates to the communications field, relate to the sharing method of application program between the interior portable terminal of a kind of LAN (Local Area Network) or rather.
Background technology
Intelligent mobile terminal is the trend of present development in science and technology, and the development of intelligent mobile terminal also is accompanied by development and the variation of increasing application program.The application of present application program is very diversification, and the field that relates to is also a lot, comprises diet, chat, recreation etc.But, at present moving these application programs of can terminal moving in intelligence all is to get on to download and install file from the internet or direct copy installation file from the computer, can't under the situation of not linking the internet, get on to obtain installation file from another portable terminal that application program has been installed, for example, a mobile phone has been installed some application, but the installation file that can not will use under the situation of not linking the internet is shared with another mobile phone.There is following defective in above downloading mode: down loading mounting software need connect the internet, needs use traffic, and is uneconomical; Directly copy software from computer, can't accomplish to download software again whenever and wherever possible, very inconvenient.
Summary of the invention
The technical problem to be solved in the present invention is, provides a kind of easy to use, can share the installation method of the local area network applications program of installation file between a plurality of intelligent terminals under the situation of not networking mutually.
Technical solution of the present invention is, provide in a kind of LAN (Local Area Network) with following steps the sharing method of application program between the portable terminal, second portable terminal of first portable terminal that comprises the Android system that is equipped with of initiatively sharing application program and the Android system that is equipped with that asks to share application program; This method may further comprise the steps:
One, opens the application program of first portable terminal;
Two, by android sdk(Android SDK (Software Development Kit)) in the info class of Package Info(application package) the class program application.flags(application program mark that is applied) and value X and the value Y of application.FLAG_SYSTEM (FLAG_SYSTEM refers to use and is positioned at/ mark under the system/app); Judge according to value X and value Y whether the application journey in described first portable terminal is that the user installs voluntarily then; The application program that the user installs voluntarily can be shared with described second portable terminal; The application program that first mobile terminal system carries can not be shared with described second portable terminal; Concrete judgment mode is as follows:
(1) if value X≤0 and value Y≤0 that obtain judge that then this application program is that the user installs voluntarily, can share;
(2) if value X≤0 and value Y>0 that obtain judge that then this application program is the program of system, can not share;
(3) if value X>0 and value Y≤0 that obtain judge that then this application program is the program of system, can not share;
(4) if value X>0 and value Y>0 that obtain judge that then this application program is the program of system, can not share;
Three, obtain sharing the tabulation of application program by step 2, the installation document of the application program that the use file copying method can be shared copies on the SD card; Obtain the storing path of the installation document of each application program then; According to the physical address of the installation document storing of the application program that obtains, the http(hyper text protocol that generation can be downloaded) address of visit, and this address is dynamically generated simultaneously the download address of two-dimension code;
Four, described second portable terminal is according to the http(hyper text protocol that generates) download address of download address or two-dimension code all can the down load application program the installation document.
After adopting above structure, the sharing method of application program between the portable terminal in the LAN (Local Area Network) of the present invention compared with prior art, has the following advantages:
Because the sharing method of application program between the portable terminal in the LAN (Local Area Network) of the present invention, the user is as long as in same LAN (Local Area Network), need not to be connected into the internet, adopt the httpservice technology generate the user installs voluntarily in described first portable terminal application program http download address and two-dimension code, described second portable terminal comes the down load application program according to the http download address or the two-dimension code that generate, direct down load application program above the other side's portable terminal, make portable terminal save the flow of down load application program, the software of removal search correspondence also need not to take time, greatly facilitate the user and share speed and the effectiveness of application program, bring convenience to mobile terminal user.
Embodiment
Second portable terminal of first portable terminal that the sharing method of application program comprises the Android system that is equipped with of initiatively sharing application program between the portable terminal in the LAN (Local Area Network) of the present invention and the Android system that is equipped with that asks to share application program, it can be between two portable terminals that described first portable terminal and second portable terminal refer to, and also can be between a plurality of portable terminals.This method may further comprise the steps:
One, opens the application program of first portable terminal.
Two, by Package Info class among the android sdk be applied the value X of program application.flags and the value Y of application.FLAG_SYSTEM; Judge according to value X and value Y whether the application program in described first portable terminal is that the user installs voluntarily then; The application program that the user installs voluntarily can be shared with described second portable terminal; The application program that first mobile terminal system carries can not be shared with described second portable terminal.Concrete judgment mode is as follows:
(1) if value X≤0 and value Y≤0 that obtain judge that then this application program is that the user installs voluntarily, can share;
(2) if value X≤0 and value Y>0 that obtain judge that then this application program is the program of system, can not share;
(3) if value X>0 and value Y≤0 that obtain judge that then this application program is the program of system, can not share;
(4) if value X>0 and value Y>0 that obtain judge that then this application program is the program of system, can not share;
Three, obtain sharing the tabulation of application program by step 2, the installation document of the application program that the use file copying method can be shared copies on the SD card; Obtain the installation document storing path of each application program then; According to the physical address of the installation document storing of the application program that obtains, the address of the http visit that production can be downloaded, and the download address of this address dynamically being produced simultaneously two-dimension code.Described dynamic production two-dimension code refers to, the each wifi network that connects of portable terminal is obstructed, so the IP address that gets access to also can be different, the http address that generation can be visited download is that IP and SD upward form the address of application program preservation, and two-dimension code is to change constantly with the IP address that gets access to.
Four, described second portable terminal according to the download address of the http download address that generates or two-dimension code all can the down load application program the installation document.
Use above method to share application program, as long as it is two portable terminals all in same LAN (Local Area Network), just can be shared the application program that the user installs voluntarily in the portable terminal mutually, very easy to use.Described portable terminal can be smart mobile phone etc.