CN106126240A - A kind of method and system customizing mobile terminal desktop shortcut icon - Google Patents
A kind of method and system customizing mobile terminal desktop shortcut icon Download PDFInfo
- Publication number
- CN106126240A CN106126240A CN201610485091.1A CN201610485091A CN106126240A CN 106126240 A CN106126240 A CN 106126240A CN 201610485091 A CN201610485091 A CN 201610485091A CN 106126240 A CN106126240 A CN 106126240A
- Authority
- CN
- China
- Prior art keywords
- icon
- xml
- shortcut icon
- application program
- name
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The present invention discloses a kind of method and system customizing mobile terminal desktop shortcut icon, and wherein, described method includes step: A, resolves the original AndroidManifest.xml in selected apk file, obtains bag name and the class name of application program;B, generate customized file xml bag name and class name being written in customized file xml by Web application system, compile described customized file xml, generate desktop shortcut icon.Can substantially be simplified the customization step of desktop shortcut icon by the present invention, thus be effectively improved the customization work efficiency of desktop shortcut icon.
Description
Technical field
The present invention relates to field of mobile terminals, particularly relate to a kind of method customizing mobile terminal desktop shortcut icon and be
System.
Background technology
Nowadays increasing user is mobile at electronic product such as mobile phone, the panel computer etc. using Android system
Equipment, in order to enable users to find some to apply efficiently, it usually needs equipment dispatch from the factory software desktop on more preset should
Use program shortcut icon.In general, cell phone manufacturer has multiple client of operator, different client of operator to have difference substantially
Preset icon demand, this just requires the software version that cell phone manufacturer is different to different customizations, preset corresponding application
Program shortcut icon.
Cell phone apparatus manufacturer dispatch from the factory software time, owing to different operators customer premise icon demand is different, same operator
The software requirement that dispatches from the factory for country variant area is the most different, when there being a large amount of software version to need customization, and cell phone apparatus manufacturer
What meeting was repeated does something, the shortcut icon of the most preset application program.
Will on the desktop of software that dispatches from the factory the shortcut icon of preset application program, need to obtain this application program bag name and
Class name, and this bag name and class name are write in an xml document specified, could realize.Wherein, the bag name of application program embodies
The accessed path of this application program, the class name of application program embody this application program clicked time operation homepage.Existing obtain
The mode of the bag name and class name that take application program has two kinds, a kind of be by the method for decompiling obtain application program bag name and
Class name, another kind is by using the method printing log (daily record) to obtain bag name and the class name of application program.Both the above side
Method is required for Android professional and uses the developing instrument of specialty to obtain, and corresponding bag name and class name is write after acquisition
Enter and specify in xml document, owing to the customization assistant director of general cell phone apparatus manufacturer is non-Android developer, to non-
For Android developer, decompiling and printing log (daily record) are all very complicated, and operative configuration is the most loaded down with trivial details.
Therefore, prior art has yet to be improved and developed.
Summary of the invention
In view of above-mentioned the deficiencies in the prior art, it is an object of the invention to provide a kind of customization mobile terminal desktop and fast scheme
Calibration method and system, it is intended to solve existing desktop shortcut icon customization procedure complexity, customize inefficient problem.
Technical scheme is as follows:
A kind of method customizing mobile terminal desktop shortcut icon, wherein, including step:
A, the original AndroidManifest.xml in selected apk file is resolved, obtain bag name and the class of application program
Name;
B, generate customized file xml bag name and class name being written in customized file xml by Web application system, compile institute
State customized file xml, generate desktop shortcut icon.
It is preferred that the method for described customization mobile terminal desktop shortcut icon, wherein, described step A specifically includes:
A1, Yu Xianxuanding apk file;
Original AndroidManifest.xml in described selected apk file is resolved by A2, employing SAX parser, obtains
The bag name of application program and class name.
It is preferred that the method for described customization mobile terminal desktop shortcut icon, wherein, described step B specifically includes:
B1, simulate desktop icons arrangement mode by Web application system, select application program also to be placed into simulating accordingly
In desktop grid, by the bag name of described application program, class name and icon parameter read-in to customized file xml;
B2, compile described customized file xml, generate desktop shortcut icon.
It is preferred that the method for described customization mobile terminal desktop shortcut icon, wherein, application program in described step B1
Icon parameter specifically include: Icon ID, icon parent Container ID, icon icon, icon laterally and vertical shared grid size,
Icon title, icon link and coordinates of icon.
A kind of system customizing mobile terminal desktop shortcut icon, wherein, including:
Parsing module, resolves the original AndroidManifest.xml in selected apk file, obtains application program
Bag name and class name;
Icon generation module, for generating customized file xml by Web application system and bag name and class name being written to customization literary composition
In part xml, compile described customized file xml, generate desktop shortcut icon.
It is preferred that the system of described customization mobile terminal desktop shortcut icon, wherein, described parsing module specifically wraps
Include:
Selected unit, is used for preselecting apk file;
Resolution unit, for using SAX parser to carry out the original AndroidManifest.xml of described selected apk file
Resolve, obtain bag name and the class name of application program.
It is preferred that the system of described customization mobile terminal desktop shortcut icon, wherein, described icon module is specifically wrapped
Include:
Writing unit, for simulating desktop icons arrangement mode by Web application system, selects application program and is placed into
In corresponding simulation desktop grid, by the bag name of described application program, class name and icon parameter read-in to customized file xml
In;
Icon signal generating unit, is used for compiling described customized file xml, generates desktop shortcut icon.
Beneficial effect: the present invention is by resolving also the original AndroidManifest.xml in selected apk file
The bag name of quick obtaining application program and class name, then build Web application system and generate customized file xml, finally according to described
Customized file xml makes a variation Software Create desktop shortcut icon.The customization that can substantially be simplified desktop shortcut icon by the present invention is walked
Suddenly, thus be effectively improved the customization work efficiency of desktop shortcut icon.
Accompanying drawing explanation
Fig. 1 is the flow chart of a kind of method preferred embodiment customizing mobile terminal desktop shortcut icon of the present invention.
The visualized operation interface customizing desktop icons preferred embodiment that Fig. 2 provides for Web application system end of the present invention
Schematic diagram.
Fig. 3 is the structured flowchart of a kind of system preferred embodiment customizing mobile terminal desktop shortcut icon of the present invention.
Detailed description of the invention
The present invention provides a kind of method and system customizing mobile terminal desktop shortcut icon, for make the purpose of the present invention,
Technical scheme and effect are clearer, clear and definite, and the present invention is described in more detail below.Should be appreciated that described herein
Specific embodiment only in order to explain the present invention, is not intended to limit the present invention.
Refer to the stream that Fig. 1, Fig. 1 are a kind of method preferred embodiment customizing mobile terminal desktop shortcut icon of the present invention
Cheng Tu, as it can be seen, it includes step:
S1, the original AndroidManifest.xml in selected apk file is resolved, obtain application program bag name and
Class name;
S2, generate customized file xml bag name and class name being written in customized file xml by Web application system, compile institute
State customized file xml, generate desktop shortcut icon.
A kind of method customizing mobile terminal desktop shortcut icon that the present invention provides, makes full use of the parsing of xml document
And constructing technology, build a web application system and carry out the shortcut icon of customized desktop application program, thus simplify desktop and fast scheme
Target customization step, improves the customization work efficiency of desktop shortcut icon.
Step S1 of the present invention specifically includes:
S11, preselect apk file, will install in the android application of all application program desktop shortcut icons to be customized
Bag (apk) file preselects;
The original AndroidManifest.xml of described selected apk file is resolved by S12, employing SAX parser, obtains
The bag name of application program and class name.
In the present invention, described AndroidManifest.xml is the essential document in each Android application program,
It is positioned at the root of whole project, describes package(installation kit) in expose assembly (activities, services,
Etc.) and respective realize the processed data of class, various energy and start position.Described AndroidManifest.xml removes
Can Activities, ContentProviders, Services, and Intent Receivers in statement program, also
Permissions(security control can be specified) and instrumentation(test).
Further, xml(extensible markup language in the present invention): the subset of standard generalized markup language, be a kind of for
Labelling e-file makes it have structural markup language.In electronic computer, labelling refers to computer letter to understand
Breath symbol, by this kind of labelling, can process between computer and comprise various information such as article etc.;It can be used to labelling
Data, definition data type, be a kind of user of permission original language of being defined the markup language of oneself;It is especially suitable for
WWW transmits, it is provided that unified method describes and exchange the structural data independent of application program or supplier.
It is preferred that the present invention uses SAX parser, the xml of described selected apk file is resolved by it, specifically, and SAX
It is an xml resolver that resolution speed is fast and committed memory is few, is highly suitable for the mobile devices such as Android; SAX
Resolve xml document and use event-driven, say, that it is not required to resolve complete document, by content order solution
During analysis document, SAX can judge certain part in the character the most legal xml grammer currently read, will if met
Trigger event;So-called event, is exactly some readjustment (callback) methods in fact, and these methods (event) are defined on
ContentHandler interface.By SAX parser, the xml of described selected apk file is resolved, can obtain rapidly
Take bag name and the class name of application program, thus improve work efficiency.
Certainly, the present invention may also take on other resolver and resolves the xml of described selected apk file, such as,
When using DOM to resolve xml document, can all the elements of xml document be left in internal memory in object tree mode, then allow to make
By the data needed for DOM API traversal xml tree, retrieval;Although, use the code of DOM operation xml to seem that comparison is directly perceived, and
And, in some aspects than based on SAX realize simpler, but, because DOM needs all the elements of XML file with right
As tree mode leaves in internal memory, so the consumption of internal memory is bigger, for the mobile device especially for operation Android,
Because the resource of equipment is more valuable, so suggestion still uses SAX to resolve XML file, certainly, if XML file is interior
It is feasible for holding smaller employing DOM.
In the present invention, described step S2 specifically includes:
B1, simulate desktop icons arrangement mode by Web application system, select application program also to be placed into simulating accordingly
In desktop grid, by the bag name of described application program, class name and icon parameter read-in to customized file xml;
B2, compile described customized file xml, generate desktop shortcut icon.
The present invention build Web application system be a kind of can by the application program of web access, Web application system
One maximum benefit is user's access application easily, and user has had only to browser, it is not necessary to install again
Other software.
Specifically, the present invention provides visual operation interface customizing desktop icons at Web application system end, such as figure
Shown in 2, the icon of each grid simulation desktop system in figure, what this figure was simulated is the desktop icons arrangement mode of 4*4, clicks
Each grid can jump to application and select interface, selects corresponding application to be put in grid, such as Google (x=0, the y=of figure
3);LauncherScreenID in figure represents the icon determining desktop LauncherScreenID+1 screen,
LauncherScreenID is from the beginning of 0, and what LauncherScreenID=0 represented customization is the 1st screen icon of desktop,
LauncherScreenID=1 represents just at the icon of customized desktop the 2nd screen, by that analogy.When customization assistant director is needing customization
When grid all chooses respective application, click on the generation xml button of Web application system, just grid list just is converted to
Xml document, thus by the bag name of described application program, class name and icon parameter read-in to customized file xml, customize assistant director
Compile described customized file xml by simple, just can generate desktop shortcut icon.
It is preferred that the icon parameter of described application program specifically includes: Icon ID, icon parent Container ID, icon icon,
Icon is laterally and vertical shared grid size, icon title, icon link and coordinates of icon.
Further, the concrete form that the present invention generates customized file xml by described Web application system is as follows:
Launcher:id represents the ID of application shortcut icon;
The class name of launcher:className application shortcut icon;
The parent Container ID of launcher:container application shortcut icon;
The icon of launcher:icon application shortcut icon;
The bag name of launcher:packageName application shortcut icon;
Which screen launcher:screen application shortcut icon is positioned at, from the beginning of 0;
Launcher:spanX application shortcut icon laterally shared size, from the beginning of 0;
Launcher:spanY application shortcut icon vertically shared size, from the beginning of 0;
Launcher:title application shortcut icon title;
Launcher:uri application shortcut icon links;
Launcher:x application shortcut icon position x, from the beginning of 0;
Launcher:y application shortcut icon position y, from the beginning of 0.
Specifically, the customized file xml lattice that the present invention generates according to the fast sectional drawing target arrangement mode of desktop as shown in Figure 2
Formula is as follows:
<?xml version="1.0" encoding="utf-8"?>
<favorites
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:
launcher="http://schemas.android.com/apk/res-auto/com.android.launche
r3" >
<!-- screen [0] -->
<item
launcher:id=""
auncher:className="com.google.android.googlequicksearchbox.SearchActivity
"
launcher:container=""
launcher:icon=""
launcher:packageName="com.google.android.googlequicksearchbox "
launcher:screen="0"
launcher:spanX="1"
launcher:spanY="1"
launcher:title="Google"
launcher:type="1"
launcher:uri=""
launcher:x="0"
launcher:y="3" />
Above-mentioned code shows at customized desktop the first screen icon, and the coordinate position that described Google icon is positioned at desktop is (x
=0, y=3).
<!-- screen [0] -->
<item
launcher:id=""
launcher:className="com.vodafone.mCare.Main"
launcher:container=""
launcher:icon=""
launcher:packageName="com.vodafone.mCare"
launcher:screen="0"
launcher:spanX="1"
launcher:spanY="1"
launcher:title="Vodafone"
launcher:type="1"
launcher:uri=""
launcher:x="1"
launcher:y="3" />
Above-mentioned code shows at customized desktop the first screen icon, and described vodafone icon is positioned at the coordinate position of desktop and is
(x=1, y=3).
<!-- screen [0] -->
<item
launcher:id=""
launcher:className="com.android.vending.AssetBrowserActivity "
launcher:container=""
launcher:icon=""
launcher:packageName="com.android.vending"
launcher:screen="0"
launcher:spanX="1"
launcher:spanY="1"
launcher:title="Play Store"
launcher:type="1"
launcher:uri=""
launcher:x="3"
launcher:y="3" />
Above-mentioned code shows at customized desktop the first screen icon, and described Play Store icon is positioned at the coordinate position of desktop
For (x=3, y=3).
</favorites>
Based on said method, the present invention also provides for a kind of system customizing mobile terminal desktop shortcut icon, as it is shown on figure 3, its
In, including:
Parsing module 100, resolves the original AndroidManifest.xml in selected apk file, obtains application program
Bag name and class name;
Icon generation module 200, for generating customized file xml by Web application system and being written to bag name and class name determine
In file xml processed, compile described customized file xml, generate desktop shortcut icon.
It is preferred that the system of described customization mobile terminal desktop shortcut icon, wherein, described parsing module 100 is concrete
Including:
Selected unit, is used for preselecting apk file;
Resolution unit, for using SAX parser to carry out the original AndroidManifest.xml of described selected apk file
Resolve, obtain bag name and the class name of application program.
It is preferred that the system of described customization mobile terminal desktop shortcut icon, wherein, described icon module 200 is concrete
Including:
Writing unit, for simulating desktop icons arrangement mode by Web application system, selects application program and is placed into
In corresponding simulation desktop grid, by the bag name of described application program, class name and icon parameter read-in to customized file xml
In;
Icon signal generating unit, is used for compiling described customized file xml, generates desktop shortcut icon.
In sum, the present invention is by resolving also the original AndroidManifest.xml in selected apk file
The bag name of quick obtaining application program and class name, then build Web application system and generate customized file xml, finally according to described
Customized file xml makes a variation Software Create desktop shortcut icon.The customization that can substantially be simplified desktop shortcut icon by the present invention is walked
Suddenly, thus be effectively improved the customization work efficiency of desktop shortcut icon.
It should be appreciated that the application of the present invention is not limited to above-mentioned citing, for those of ordinary skills, can
To be improved according to the above description or to convert, all these modifications and variations all should belong to the guarantor of claims of the present invention
Protect scope.
Claims (7)
1. the method customizing mobile terminal desktop shortcut icon, it is characterised in that include step:
A, the original AndroidManifest.xml in selected apk file is resolved, obtain bag name and the class of application program
Name;
B, generate customized file xml bag name and class name being written in customized file xml by Web application system, compile institute
State customized file xml, generate desktop shortcut icon.
The method of customization mobile terminal desktop shortcut icon the most according to claim 1, it is characterised in that described step A
Specifically include:
A1, Yu Xianxuanding apk file;
The original AndroidManifest.xml of described selected apk file is resolved by A2, employing SAX parser, and obtaining should
With bag name and the class name of program.
The method of customization mobile terminal desktop shortcut icon the most according to claim 1, it is characterised in that described step B
Specifically include:
B1, simulate desktop icons arrangement mode by Web application system, select application program also to be placed into simulating accordingly
In desktop grid, by the bag name of described application program, class name and icon parameter read-in to customized file xml;
B2, compile described customized file xml, generate desktop shortcut icon.
The method of customization mobile terminal desktop shortcut icon the most according to claim 3, it is characterised in that described step B1
The icon parameter of middle application program specifically includes: Icon ID, icon parent Container ID, icon icon, icon be horizontal and vertical institute
Account for grid size, icon title, icon link and coordinates of icon.
5. the system customizing mobile terminal desktop shortcut icon, it is characterised in that including:
Parsing module, resolves the original AndroidManifest.xml in selected apk file, obtains application program
Bag name and class name;
Icon generation module, for generating customized file xml by Web application system and bag name and class name being written to customization literary composition
In part xml, compile described customized file xml, generate desktop shortcut icon.
The system of customization mobile terminal desktop shortcut icon the most according to claim 5, it is characterised in that described parsing mould
Block specifically includes:
Selected unit, is used for preselecting apk file;
Resolution unit, for using SAX parser to carry out the original AndroidManifest.xml of described selected apk file
Resolve, obtain bag name and the class name of application program.
The system of customization mobile terminal desktop shortcut icon the most according to claim 5, it is characterised in that described icon mould
Block specifically includes:
Writing unit, for simulating desktop icons arrangement mode by Web application system, selects application program and is placed into
In corresponding simulation desktop grid, by the bag name of described application program, class name and icon parameter read-in to customized file xml
In;
Icon signal generating unit, is used for compiling described customized file xml, generates desktop shortcut icon.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610485091.1A CN106126240A (en) | 2016-06-28 | 2016-06-28 | A kind of method and system customizing mobile terminal desktop shortcut icon |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610485091.1A CN106126240A (en) | 2016-06-28 | 2016-06-28 | A kind of method and system customizing mobile terminal desktop shortcut icon |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106126240A true CN106126240A (en) | 2016-11-16 |
Family
ID=57267227
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610485091.1A Pending CN106126240A (en) | 2016-06-28 | 2016-06-28 | A kind of method and system customizing mobile terminal desktop shortcut icon |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106126240A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111580712A (en) * | 2020-04-24 | 2020-08-25 | 广州视源电子科技股份有限公司 | Desktop customization method, device, equipment, system and storage medium |
CN112764798A (en) * | 2021-01-08 | 2021-05-07 | 重庆创通联智物联网有限公司 | Electronic equipment customization mode realization method and electronic equipment |
CN113434195A (en) * | 2021-07-12 | 2021-09-24 | 南京领创信息科技有限公司 | Android application APK file analysis method and system |
CN115145437A (en) * | 2021-03-31 | 2022-10-04 | 深圳市万普拉斯科技有限公司 | Desktop icon modification method and device and terminal equipment |
-
2016
- 2016-06-28 CN CN201610485091.1A patent/CN106126240A/en active Pending
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111580712A (en) * | 2020-04-24 | 2020-08-25 | 广州视源电子科技股份有限公司 | Desktop customization method, device, equipment, system and storage medium |
CN111580712B (en) * | 2020-04-24 | 2021-11-19 | 广州视源电子科技股份有限公司 | Desktop customization method, device, equipment, system and storage medium |
CN112764798A (en) * | 2021-01-08 | 2021-05-07 | 重庆创通联智物联网有限公司 | Electronic equipment customization mode realization method and electronic equipment |
CN112764798B (en) * | 2021-01-08 | 2023-10-03 | 重庆创通联智物联网有限公司 | Method for realizing customization mode of electronic equipment and electronic equipment |
CN115145437A (en) * | 2021-03-31 | 2022-10-04 | 深圳市万普拉斯科技有限公司 | Desktop icon modification method and device and terminal equipment |
CN113434195A (en) * | 2021-07-12 | 2021-09-24 | 南京领创信息科技有限公司 | Android application APK file analysis method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9442744B2 (en) | Multilingual build integration for compiled applications | |
US9400784B2 (en) | Integrated application localization | |
US10209968B2 (en) | Application compiling | |
US20140096024A1 (en) | Dynamic configurable menu using self-describing applications | |
TW201329852A (en) | Simulation of web applications and secondary devices in a web browser, web application development tools, and methods using the same | |
US20160085662A1 (en) | Web portal api test report generation | |
CN106126240A (en) | A kind of method and system customizing mobile terminal desktop shortcut icon | |
US11301366B2 (en) | Test automation systems and methods using logical identifiers | |
US20160275126A1 (en) | Accessing and editing virtually-indexed message flows using structured query langauge (sql) | |
US20170286040A1 (en) | Display and operating unit and method of operating a field instrument having a display and operating unit | |
US7917856B2 (en) | Converting between user interface technologies | |
Anderson et al. | Pro business applications with silverlight 4 | |
CN111104123A (en) | Automatic deployment of applications | |
Verma | Mobile Test Automation With Appium | |
Dixit | Android | |
Shepherd | Microsoft ASP. NET 4 Step by Step | |
CN102637290B (en) | Operating system based on browser and compiling method | |
CN106126517A (en) | The PC end application page is converted to the method and device of the mobile terminal application page | |
Patel | Responsive web design with AngularJS | |
CN111399836A (en) | Method and device for modifying page attribute | |
KR102261153B1 (en) | Method for creating application | |
Shah et al. | HTML5 Enterprise Application Development | |
Tammi | Case study on mobile optimization of a web application | |
CN103092575A (en) | Method and system for generating widget applications | |
Leszczynski | OPC UA App development for Android |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20161116 |
|
RJ01 | Rejection of invention patent application after publication |