Judge the method whether application program mates
Technical field
The present invention relates to a kind of mobile terminal device, relate in particular to a kind of installation method of mobile terminal device application program.
Background technology
Along with the development of intelligent mobile terminal equipment, the user can experience colourful user and experience by different application programs is installed.
But, existing application is in the process of installing, can only come simple affirmation program whether can install by judging that whether the current system version is complementary with application version, and to program successful installation whether really, but whether true(-)running is without any assurance after the installation.
This new method is by prejudging the version of system, the screen resolution that system supports, the current hardware version of system, the many-sides such as system language, coupling to program and system has accurately prediction, thereby guarantee that android uses mobile phone terminal, the compatibility of flat-panel devices greatly improves the user and experiences.
Summary of the invention
The deficiency that exists in order to solve prior art, the object of the present invention is to provide a kind of method of judging whether application program mates, before set up applications, the coupling of predicted application program and system accurately guarantees the compatibility of application program and mobile terminal device.
For achieving the above object, a kind of method of judging whether application program mates provided by the invention, the method may further comprise the steps:
1) application programs is resolved, and whether determine procedures is legal, and whether software version and current mobile terminal equipment mate, and whether supports current terminal resolution;
2) inquiry application, and whether whether whether interpretation provides library file, specified hardware version, the hardware version of appointment and the hardware version of current mobile terminal equipment to mate;
3) with results suggest to the user.
Wherein, described step 1) is further comprising the steps:
Resolve the xml file of android apk program, obtain corresponding SDK version information, hardware configuration requirement, system functional requirement, support and compatible screen and resolution information, and the 3D version information that requires system to support, if xml can not be normally resolved or without this file, think that then program is illegal;
Judge whether SDK version information, system functional requirement or 3D version information and mobile terminal device mate;
Judge whether whether application program support and compatible screen and resolution mate with mobile terminal device.
Wherein, described step 2) further comprise:
Library file in the inquiry android apk application program compressed package, and judge whether to provide library file;
If there is library file in the lib file of compressed package, whether inquiry application has specified the CPU version, judges whether the CPU version of appointment is compatible with mobile terminal device CPU.
Wherein, describedly judge whether to provide the step of library file to be: not have library file in the file if only there is the lib file, perhaps do not have the lib file, think that then this application program does not provide library file.
Wherein, described step 3) is further comprising the steps:
SDK version information, system functional requirement and 3D version information and mobile terminal device coupling, and the CPU version of application program appointment and mobile terminal device CPU compatibility are installed this application program, complete rear prompting successful installation;
SDK version information, system functional requirement or 3D version information and mobile terminal device coupling, or application program do not provide library file, and the reason that prompting is corresponding failed finishes the installation of this application program.
The method of judging whether application program mates of the present invention, more accurately control being installed and feeding back the android platform program, whether the user can mate existing equipment to the program that has can meet with a response more timely, and accurately know concrete reason, find to move the situation of also not knowing concrete reason behind the installation procedure of having avoided present a large number of users to run into, so that application program is easier for installation, fast, saved user's plenty of time, simultaneously to the developer in software compatibility, installation user experience aspect proposes requirements at the higher level, is conducive to the raising of program total quality.
Other features and advantages of the present invention will be set forth in the following description, and, partly from instructions, become apparent, perhaps understand by implementing the present invention.
Description of drawings
Accompanying drawing is used to provide a further understanding of the present invention, and consists of the part of instructions, and together with embodiments of the present invention, is used for explaining the present invention, is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 is according to the method flow diagram of judging whether application program mates of the present invention.
Embodiment
Below in conjunction with accompanying drawing the preferred embodiments of the present invention are described, should be appreciated that preferred embodiment described herein only is used for description and interpretation the present invention, is not intended to limit the present invention.
Fig. 1 is according to the method flow diagram of judging whether application program mates of the present invention, below with reference to Fig. 1, the method for judging whether application program mates of the present invention is described in detail:
At first, in step 101, application programs is resolved, whether determine procedures is legal, android apk application program includes the AndroidManifest.xml file, if AndroidManifest.xml cannot be normally resolved or without this file, think that then program is illegal, the reason that prompting is corresponding failed finishes the installation of this application program;
By to the AndroidManifest.xml document analysis, from AndroidManifest.xml, obtain corresponding SDK version information (uses-sdk), hardware configuration requires (uses-configuration), system functional requirement (uses-feature), support and compatible screen and resolution information (supports-screens, and the 3D version information (supports-gl-texture) that requires system to support compatible-screens);
In step 102, judge whether whether the SDK version information of application program mate with mobile terminal device, be complementary and then carry out next step; Do not mate and then forward step 110 to;
In step 103, judge whether whether the system functional requirement of application program mate with mobile terminal device, be complementary and then carry out next step; Do not mate and then forward step 110 to;
In step 104, judge that whether whether application program support and compatible screen and resolution mate with mobile terminal device, are complementary and then carry out next step; Do not mate and then forward step 110 to;
In step 105, judge whether whether the 3D version information of application program requirement system support mate with mobile terminal device, be complementary and then carry out next step; Do not mate and then forward step 110 to;
In step 106, the library file in the inquiry android apk application program compressed package, particular location is at the lib of compressed package file;
Whether in step 107, judging provides library file in the application program compressed package, if there is library file in the lib file of compressed package, then carries out next step; Do not have library file in the file if only there is the lib file, perhaps do not have the lib file, think that then this installation procedure does not provide library file, forward step 110 to;
In step 108, whether inquiry application has specified CPU version (such as x86, arm, armv5, armv7 etc.), judges whether the application program library file is compatible with CPU, and compatibility then carry out step 109; Otherwise forward step 110 to;
In step 109, this application program is installed, complete rear prompting successful installation;
In step 110, this application program and mobile terminal device do not mate, and the reason that prompting is corresponding failed finishes the installation of this application program.
The method of judging whether application program mates of the present invention can be in the installation process of application program (particularly android application program), to installation process with the problem that may run into after installing, gives the user the fastest and feed back accurately.
One of ordinary skill in the art will appreciate that: the above only is the preferred embodiments of the present invention, be not limited to the present invention, although with reference to previous embodiment the present invention is had been described in detail, for a person skilled in the art, it still can be made amendment to the technical scheme of aforementioned each embodiment record, perhaps part technical characterictic wherein is equal to replacement.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.