Desktop icon modification method, device and terminal equipment
By parsing application information configuration files and obtaining matching desktop icon information, the problem of low efficiency in modifying application icon information on different terminal devices is solved, achieving flexible icon information adjustment and efficiency improvement.
Patent Information
- Application Number
- CN202110349183.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-31
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-03-31
AI Technical Summary
The existing technology is inefficient when modifying the desktop icon information of the same application on different terminal devices, and cannot flexibly adjust the desktop icon of the application.
By parsing the application information configuration file, obtain matching desktop icon information and adjust the current application to achieve customized settings for the application.
The efficiency of modifying the desktop icon information of the application is improved, the time-consuming application development is reduced, and the flexible modification of the application icon information is realized.
Smart Images

Figure CN115145437B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of application programs, and in particular to a method, device and terminal equipment for modifying desktop icons. Background Art
[0002] In the prior art, application information is defined by the application itself, for example, the application name, application icon, whether to display the application icon and other information are all defined by the application. In the actual development process, some pre-set applications need to modify the relevant information. For example, for a certain application, the application icon I1 and application name L1 of the application are displayed on the desktop of terminal device A, the application icon I2 and application name L2 of the application are displayed on the desktop of terminal device B, and only the application name L3 of the application is displayed on the desktop of terminal device C without displaying the application icon. The prior art can only compile corresponding applications according to different information display requirements of the same application for different terminal devices, which is time-consuming and inefficient, and there is a problem that the desktop icon of the application cannot be flexibly modified. Summary of the invention
[0003] In order to solve the above technical problems, the embodiments of the present invention provide a method, an apparatus and a terminal device for modifying a desktop icon.
[0004] In a first aspect, an embodiment of the present invention provides a method for modifying a desktop icon, which is applied to a terminal device, and the method includes:
[0005] Parsing the application information configuration file to obtain a parsed file, wherein the parsed file includes an application package name of at least one application program and its corresponding desktop icon information;
[0006] If there is a target application package name matching the scanned application package name of the current application program in the application package names of the parsed file, obtaining desktop icon information corresponding to the target application package name;
[0007] The current application is adjusted according to the acquired desktop icon information.
[0008] In a second aspect, an embodiment of the present invention provides a desktop icon modification device, which is applied to a terminal device, and the desktop icon modification device includes:
[0009] A parsing module, used to parse the application information configuration file to obtain a parsed file, wherein the parsed file includes an application package name of at least one application program and its corresponding desktop icon information;
[0010] an acquisition module, configured to acquire desktop icon information corresponding to a target application package name if there is a target application package name matching the scanned application package name of the current application program in the application package names of the parsed file;
[0011] The adjustment module is used to adjust the current application according to the obtained desktop icon information.
[0012] In a third aspect, an embodiment of the present invention provides a terminal device, including a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is run by the processor, the method for modifying desktop icons provided in the first aspect is executed.
[0013] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium storing a computer program, which executes the method for modifying desktop icons provided in the first aspect when the computer program is run on a processor.
[0014] The desktop icon modification scheme provided by the present application parses the application information configuration file to obtain a parsed file, wherein the parsed file includes the application package name of at least one application and its corresponding desktop icon information; if the application package name of the parsed file contains a target application package name that matches the application package name of the scanned current application, the desktop icon information corresponding to the target application package name is obtained; and the current application is adjusted according to the obtained desktop icon information. Through the provided desktop icon modification scheme, the desktop icon information of the application is customized through the application information configuration file. When the application is scanned, the application is adjusted according to the desktop icon information in the application information configuration. The desktop icon information of the application can be flexibly modified, the efficiency of modifying the desktop icon information of the application is improved, and the time spent on application development is reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solution of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope of protection of the present invention. In each of the drawings, similar components are numbered similarly.
[0016] Figure 1 A schematic flowchart of a method for modifying a desktop icon provided in an embodiment of the present application is shown;
[0017] Figure 2 A schematic flowchart of step S103 of the method for modifying desktop icons provided in an embodiment of the present application is shown;
[0018] Figure 3 Another schematic flow chart of a method for modifying a desktop icon provided in an embodiment of the present application is shown;
[0019] Figure 4A schematic structural diagram of a desktop icon modification device according to an embodiment of the present application is shown;
[0020] Figure 5 A schematic structural diagram of a terminal device provided in the present application is shown. DETAILED DESCRIPTION
[0021] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0022] The components of the embodiments of the present invention generally described and shown in the drawings herein may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0023] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present invention, are intended only to indicate specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items or adding the possibility of one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items.
[0024] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.
[0025] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present invention belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present invention.
[0026] Example 1
[0027] The embodiment of the present disclosure provides a method for modifying a desktop icon, which is applied to a terminal device.
[0028] Specifically, Figure 1 As shown, the methods for modifying desktop icons include:
[0029] Step S101, parse the application information configuration file to obtain a parsed file.
[0030] In this embodiment, the parsed file includes the application package name of at least one application and its corresponding desktop icon information. For example, the application package name of the microblog application may be sinaweibo.apk.
[0031] Terminal devices may include mobile terminals and desktop computers, etc. The mobile terminals may be mobile phones, tablet computers, etc. Desktop icon information may include icon resource names and / or icon display control information. The icon resource name may include the application icon name and the application name. For example, the WeChat application name may be set to name-weixin, and the WeChat application icon name may be set to img--icon-weixin. The icon display control information is used to define whether the icon resource corresponding to the icon resource name is displayed on the desktop of the terminal device. For example, the icon display control information defines that the WeChat name resource with the icon resource name of name-weixin is displayed on the desktop of the terminal device. The WeChat name resource is a specific string of "WeChat", and the WeChat icon resource is a specific WeChat icon image in a certain image format, such as a WeChat icon image in JGP format.
[0032] The application information configuration file is a configuration file for customizing or self-defining the application package name of the application and its corresponding desktop icon information. A clear writing specification can be pre-defined, and the writing specification is used to define information such as the application package name and desktop icon information.
[0033] In this embodiment, an application information configuration file can be written according to the writing specifications based on specific needs, and the application information configuration file includes the application package name of at least one application and its corresponding application information. In one embodiment, the application information configuration file can be integrated into the system of the terminal device during the system compilation stage of the terminal device, and the application information configuration file is parsed during the system operation stage of the terminal device. For example, the name of the application information configuration file can be named / system / etc / app_info_customizations.xml. During the system operation stage of the terminal device, / system / etc / app_info_customizations.xml is parsed, and the corresponding parsed file is obtained, and the parsed file is cached.
[0034] Step S102: If there is a target application package name matching the scanned application package name of the current application program in the application package names of the parsed file, desktop icon information corresponding to the target application package name is obtained.
[0035] In this embodiment, it is determined whether there is a target application package name matching the application package name of the scanned current application in the application package name of the parsed file. If there is a target application package name, step S102 is executed. If there is no target application package name, the application package names of other applications are continuously scanned to determine whether there is a target application package name matching the application package name of the subsequently scanned application in the parsed file.
[0036] For example, if the application package name of the current application is WeChat package name com.tencent.mm, and WeChat package name com.tencent.mm also exists in the parsed file, then it is determined that there is a target application package name matching the application package name of the current application in the parsed file, and the target application package name is com.tencent.mm. The desktop icon information corresponding to WeChat package name com.tencent.mm is obtained in the parsed file, for example, the application name and application icon name corresponding to com.tencent.mm are obtained.
[0037] Step S103: adjusting the current application according to the acquired desktop icon information.
[0038] Optionally, the desktop icon information includes an icon resource name and / or icon display control information, and the icon display control information is used to define whether to display an icon resource corresponding to the icon resource name on the desktop of the terminal device.
[0039] Optional, see Figure 2 , step S104 includes:
[0040] Step S1021, if the obtained desktop icon information includes the icon resource name, obtain the icon resource ID corresponding to the icon resource name;
[0041] Step S1022: Update the icon resource ID of the current application to the acquired icon resource ID.
[0042] Optionally, step S104 includes:
[0043] If the acquired desktop icon information includes the icon display control information, the desktop icon display configuration information of the current application is adjusted according to the icon display control information.
[0044] Optionally, obtaining the icon resource ID corresponding to the icon resource name includes:
[0045] Obtaining a correspondence between an icon resource name and an icon resource ID of the at least one application;
[0046] According to the correspondence between the icon resource name and the icon resource ID of the at least one application program, the icon resource ID corresponding to the icon resource name is determined.
[0047] In this embodiment, the resource package may be a framework-res.apk module, and the correspondence between the icon resource name and the icon resource ID of at least one application is determined from the framework-res.apk module, and the correspondence between the icon resource name and the icon resource ID of at least one application includes the icon resource names of multiple applications and their corresponding icon resource IDs. For example, the at least one application includes a first application and a second application, and the correspondence between the icon resource name and the icon resource ID of the at least one application includes the icon resource name of the first application and its corresponding icon resource ID, and the icon resource name of the second application and its corresponding icon resource ID.
[0048] Optional, see Figure 3 , the obtaining of the correspondence between the icon resource name and the icon resource ID of the at least one application program includes:
[0049] Step S1021: Add an icon resource corresponding to the icon resource name of the at least one application program to the resource package.
[0050] In this embodiment, the icon resource name of at least one application may be the icon resource name of the first application, the second application, ... the Nth application, wherein the first application, the second application, ... the Nth application may be WeChat, Weibo, a browser, and other applications, respectively, without limitation herein. The icon resource name may include the resource name of the application name, the resource name of the application icon, and the like. The resource package may be a framework-res.apk module, and the application name resources, application icon resources, and the like of each application are added to the framework-res.apk module. The application name resource is a specific string used to represent the application name, and the application icon resource is an icon image in a specific image format, such as an icon image in the JGP format.
[0051] Step S1022: Generate a corresponding icon resource ID for the icon resource of the at least one application.
[0052] In this implementation, an icon resource ID corresponding to the icon resource is generated in the resource package to form an icon resource ID index table, and the corresponding icon resource is called through the icon resource ID.
[0053] Step S1023: Generate a correspondence between the icon resource name and the icon resource ID of the at least one application.
[0054] In this embodiment, the icon resource name may include an application name resource name and an application icon resource name. The correspondence between the icon resource name and the icon resource ID of at least one application includes: the correspondence between the application name resource name and the application name resource ID of at least one application, the correspondence between the application icon resource name and the application icon resource ID of at least one application, etc.
[0055] In this way, the corresponding relationship between the icon resource name and the icon resource ID can be obtained, which is convenient for adjusting the desktop icon of the application program according to the icon resource ID later.
[0056] Optionally, adjusting the desktop icon display configuration information of the current application according to the icon display control information includes:
[0057] In the case where the icon display control information is information for displaying icons on the desktop of the terminal device and the current application does not include desktop icon display configuration information, adding desktop icon display configuration information to the current application; or
[0058] When the icon display control information is to not display the icon information on the desktop of the terminal device and the current application includes desktop icon display configuration information, the desktop icon display configuration information is deleted in the current application.
[0059] In this embodiment, the desktop icon display configuration information is Intent#CATEGORY_LAUNCHER configuration information. The Intent#CATEGORY_LAUNCHER configuration information can be set in the Androidmainfest.xml file.
[0060] For example, if the icon display control information is to display the icon information on the desktop of the terminal device, and the Intent#CATEGORY_LAUNCHER configuration information is not set in the Androidmanifest.xml file, add the configuration information of the intent-filter named Intent#CATEGORY_LAUNCHER in the AndroidManifest.xml file of the application. It should be noted that the value of Intent#CATEGORY_LAUNCHER is android.intent.category.LAUNCHER.
[0061] When the icon display control information is not to display the icon information on the terminal device desktop and the Intent#CATEGORY_LAUNCHER configuration information is set in the Androidmanifest.xml file, the configuration information of the intent-filter named Intent#CATEGORY_LAUNCHER is deleted in the AndroidManifest.xml file of the application.
[0062] In this way, whether to display desktop icons on the terminal device desktop can be customized according to specific needs, thereby improving the flexibility of desktop icon information display.
[0063] Optionally, after adding desktop icon display configuration information in the current application, the method includes:
[0064] Display the corresponding icon resources on the desktop of the terminal device;
[0065] After the current application deletes the desktop icon display configuration information, the method includes:
[0066] The corresponding icon resource is not displayed on the terminal device desktop.
[0067] In this way, whether to display the desktop icon information is flexibly controlled, so that the user can easily understand the desktop icon information of the application.
[0068] Optionally, after updating the icon resource ID of the current application to the acquired icon resource ID, the method includes:
[0069] The corresponding icon resource is obtained from the resource package according to the updated resource ID, and the obtained icon resource is displayed on the desktop.
[0070] In this way, the displayed desktop icon information can be flexibly updated to enrich the desktop icon information presentation effect of the application.
[0071] It should be noted that, through the desktop icon modification scheme provided in this embodiment, customized display of the desktop icon information of the current application is achieved on the terminal device desktop. For example, only the updated application icon of the current application is displayed on the terminal device desktop, only the updated application name of the current application is displayed on the terminal device desktop, or both the updated application icon and the updated application name of the current application are displayed on the terminal device desktop, or the terminal device desktop is controlled to display only the application name, or the terminal device desktop is controlled to display only the application icon. The desktop icon information can be adjusted individually or in combination very flexibly.
[0072] The desktop icon modification method provided in this embodiment parses the application information configuration file to obtain a parsed file, wherein the parsed file includes the application package name of at least one application and its corresponding desktop icon information; if the application package name in the parsed file contains a target application package name that matches the application package name of the scanned current application, the desktop icon information corresponding to the target application package name is obtained; and the current application is adjusted according to the obtained desktop icon information. Through the provided desktop icon modification scheme, the desktop icon information of the application is customized through the application information configuration file. When the application is scanned, the application is adjusted according to the desktop icon information in the application information configuration. The desktop icon information of the application can be flexibly modified, the efficiency of modifying the desktop icon information of the application is improved, and the time spent on application development is reduced.
[0073] Example 2
[0074] In addition, an embodiment of the present disclosure provides a device for modifying a desktop icon, which is applied to a terminal device.
[0075] Specifically, Figure 4 As shown, the desktop icon modification device 400 includes:
[0076] The parsing module 401 is used to parse the application information configuration file to obtain a parsed file, wherein the parsed file includes an application package name of at least one application program and its corresponding desktop icon information;
[0077] The acquisition module 402 is used to acquire desktop icon information corresponding to the target application package name if there is a target application package name matching the scanned application package name of the current application program in the application package name of the parsed file;
[0078] The adjustment module 403 is used to adjust the current application according to the obtained desktop icon information.
[0079] Optionally, the desktop icon information includes an icon resource name and / or icon display control information, and the icon display control information is used to define whether to display an icon resource corresponding to the icon resource name on the desktop of the terminal device. The adjustment module 403 is further used to obtain an icon resource ID corresponding to the icon resource name if the obtained desktop icon information includes the icon resource name;
[0080] Update the icon resource ID of the current application to the obtained icon resource ID;
[0081] and / or,
[0082] If the acquired desktop icon information includes the icon display control information, the desktop icon display configuration information of the current application is adjusted according to the icon display control information.
[0083] Optionally, the adjustment module 403 is further configured to obtain a correspondence between an icon resource name and an icon resource ID of the at least one application program;
[0084] According to the correspondence between the icon resource name and the icon resource ID of the at least one application program, the icon resource ID corresponding to the icon resource name is determined.
[0085] Optionally, the adjustment module 403 is further configured to add an icon resource corresponding to the icon resource name of the at least one application program to the resource package;
[0086] Generating a corresponding icon resource ID for the icon resource of the at least one application program;
[0087] Generate a correspondence between the icon resource name and the icon resource ID of the at least one application.
[0088] Optionally, the adjustment module 403 is further configured to add desktop icon display configuration information to the current application when the icon display control information is to display icon information on the desktop of the terminal device and the current application does not include desktop icon display configuration information; or,
[0089] When the icon display control information is to not display the icon information on the desktop of the terminal device and the current application includes desktop icon display configuration information, the desktop icon display configuration information is deleted in the current application.
[0090] Optionally, the desktop icon modification device 400 further includes:
[0091] A display module, configured to display corresponding icon resources on the desktop of a terminal device after adding desktop icon display configuration information in the current application;
[0092] After the current application deletes the desktop icon display configuration information, the corresponding icon resource is not displayed on the desktop of the terminal device.
[0093] Optionally, the display module is further used to obtain a corresponding icon resource from the resource package according to the updated resource ID, and display the obtained icon resource on the desktop.
[0094] The desktop icon modification device 400 provided in the present disclosure may be the desktop icon modification method shown in Example 1, and will not be described again here to avoid repetition.
[0095] The desktop icon modification device provided in this embodiment parses the application information configuration file to obtain a parsed file, which includes the application package name of at least one application and its corresponding desktop icon information; if the application package name in the parsed file contains a target application package name that matches the application package name of the scanned current application, the desktop icon information corresponding to the target application package name is obtained; and the current application is adjusted according to the obtained desktop icon information. Through the provided desktop icon modification scheme, the desktop icon information of the application is customized through the application information configuration file. When the application is scanned, the application is adjusted according to the desktop icon information in the application information configuration. The desktop icon information of the application can be flexibly modified, the efficiency of modifying the desktop icon information of the application is improved, and the time spent on application development is reduced.
[0096] Example 3
[0097] In addition, an embodiment of the present disclosure provides a terminal device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program runs on the processor, the method for modifying desktop icons provided in the above method embodiment 1 is executed.
[0098] Specifically, Figure 5 As shown, the terminal device 500 provided in this embodiment includes:
[0099] RF unit 501, network module 502, audio output unit 503, input unit 504, sensor 505, display unit 506, user input unit 507, interface unit 508, memory 509, processor 510, power supply 511 and other components. Those skilled in the art can understand that Figure 5 The terminal device structure shown in the figure does not constitute a limitation on the terminal device, and the terminal device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. In the embodiment of the present invention, the terminal device includes but is not limited to a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted terminal device, a wearable device, and a pedometer.
[0100] The processor 510 is used to: parse the application information configuration file to obtain a parsed file, wherein the parsed file includes an application package name of at least one application program and its corresponding desktop icon information;
[0101] If there is a target application package name matching the scanned application package name of the current application program in the application package names of the parsed file, obtaining desktop icon information corresponding to the target application package name;
[0102] The current application is adjusted according to the acquired desktop icon information.
[0103] Optionally, the desktop icon information includes an icon resource name and / or icon display control information, and the icon display control information is used to define whether to display an icon resource corresponding to the icon resource name on the desktop of the terminal device. The processor 510 is further used to: if the acquired desktop icon information includes the icon resource name, acquire an icon resource ID corresponding to the icon resource name;
[0104] Update the icon resource ID of the current application to the obtained icon resource ID;
[0105] and / or,
[0106] If the acquired desktop icon information includes the icon display control information, the desktop icon display configuration information of the current application is adjusted according to the icon display control information.
[0107] Optionally, the processor 510 is further configured to: obtain a correspondence between an icon resource name and an icon resource ID of the at least one application;
[0108] According to the correspondence between the icon resource name and the icon resource ID of the at least one application program, the icon resource ID corresponding to the icon resource name is determined.
[0109] Optionally, the processor 510 is further configured to: add an icon resource corresponding to the icon resource name of the at least one application program to the resource package;
[0110] Generating a corresponding icon resource ID for the icon resource of the at least one application program;
[0111] Generate a correspondence between the icon resource name and the icon resource ID of the at least one application.
[0112] Optionally, the processor 510 is further configured to: when the icon display control information is to display icon information on the desktop of the terminal device and the current application does not include desktop icon display configuration information, add desktop icon display configuration information to the current application; or
[0113] When the icon display control information is to not display the icon information on the desktop of the terminal device and the current application includes desktop icon display configuration information, the desktop icon display configuration information is deleted in the current application.
[0114] Optionally, the processor 510 is further configured to: after adding the desktop icon display configuration information in the current application, display the corresponding icon resource on the desktop of the terminal device;
[0115] After the current application deletes the desktop icon display configuration information, the corresponding icon resource is not displayed on the desktop of the terminal device.
[0116] Optionally, the processor 510 is further configured to: obtain a corresponding icon resource from the resource package according to the updated resource ID, and display the obtained icon resource on the desktop.
[0117] It should be understood that in the embodiment of the present invention, the radio frequency unit 501 can be used for receiving and sending signals during information transmission or communication. Specifically, after receiving downlink data from the base station, it is sent to the processor 510 for processing; in addition, uplink data is sent to the base station. Generally, the radio frequency unit 501 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc. In addition, the radio frequency unit 501 can also communicate with the network and other devices through a wireless communication system.
[0118] The terminal device provides users with wireless broadband Internet access through the network module 502, such as helping users to send and receive emails, browse web pages, and access streaming media.
[0119] The audio output unit 503 can convert the audio data received by the RF unit 501 or the network module 502 or stored in the memory 509 into an audio signal and output it as sound. Moreover, the audio output unit 503 can also provide audio output related to a specific function performed by the terminal device 500 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 503 includes a speaker, a buzzer, a receiver, etc.
[0120] The input unit 504 is used to receive audio or video signals. The input unit 504 may include a graphics processor (GPU) 5041 and a microphone 5042. The graphics processor 5041 processes the image data of a static picture or video obtained by an image capture terminal device (such as a camera) in a video capture mode or an image capture mode. The processed image frame can be played as a video on the display unit 506. The image frame processed by the graphics processor 5041 can be stored in the memory 509 (or other storage medium) or sent via the radio frequency unit 501 or the network module 502. The microphone 5042 can receive sound and can process such sound into audio data. The processed audio data can be converted into a format output that can be sent to a mobile communication base station via the radio frequency unit 501 in the case of a telephone call mode.
[0121] The terminal device 500 also includes at least one sensor 505, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 5061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 5061 and / or the backlight when the terminal device 500 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used to identify the terminal device posture (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; the sensor 505 can also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be repeated here.
[0122] The display unit 506 is used for video playback of information input by the user or information provided to the user. The display unit 506 may include a display panel 5061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0123] The user input unit 507 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the terminal device. Specifically, the user input unit 507 includes a touch panel 5071 and other input devices 5072. The touch panel 5071, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 5071 or near the touch panel 5071 using any suitable object or accessory such as a finger, stylus, etc.). The touch panel 5071 may include two parts: a touch detection terminal device and a touch controller. Among them, the touch detection terminal device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection terminal device, converts it into the contact point coordinates, and then sends it to the processor 510, receives the command sent by the processor 510 and executes it. In addition, the touch panel 5071 can be implemented in various types such as resistive, capacitive, infrared and surface acoustic waves. In addition to the touch panel 5071, the user input unit 507 may also include other input devices 5072. Specifically, other input devices 5072 may include but are not limited to a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail here.
[0124] Furthermore, the touch panel 5071 may be overlaid on the display panel 5061. When the touch panel 5071 detects a touch operation on or near it, it transmits the information to the processor 510 to determine the type of the touch event. Then, the processor 510 provides a corresponding visual output on the display panel 5061 according to the type of the touch event. Figure 5 In the figure, the touch panel 5071 and the display panel 5061 are used as two independent components to realize the input and output functions of the terminal device. However, in some embodiments, the touch panel 5071 and the display panel 5061 can be integrated to realize the input and output functions of the terminal device, which is not limited here.
[0125] The interface unit 508 is an interface for connecting an external terminal device to the terminal device 500. For example, the external terminal device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a terminal device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 508 may be used to receive input (e.g., data information, power, etc.) from an external terminal device and transmit the received input to one or more elements in the terminal device 500 or may be used to transmit data between the terminal device 500 and an external terminal device.
[0126] The memory 509 can be used to store software programs and various data. The memory 509 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 509 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0127] The processor 510 is the control center of the terminal device. It uses various interfaces and lines to connect various parts of the entire terminal device. By running or executing software programs and / or modules stored in the memory 509 and calling data stored in the memory 509, it executes various functions of the terminal device and processes data, thereby monitoring the terminal device as a whole. The processor 510 may include one or more processing units; optionally, the processor 510 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 510.
[0128] The terminal device 500 may also include a power supply 511 (such as a battery) for supplying power to various components. Optionally, the power supply 511 may be logically connected to the processor 510 through a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system.
[0129] In addition, the terminal device 500 includes some functional modules not shown, which will not be described here.
[0130] The terminal device provided in this embodiment parses the application information configuration file to obtain a parsed file, wherein the parsed file includes the application package name of at least one application and its corresponding desktop icon information; if the application package name of the parsed file contains a target application package name that matches the application package name of the scanned current application, the desktop icon information corresponding to the target application package name is obtained; and the current application is adjusted according to the obtained desktop icon information. Through the provided desktop icon modification scheme, the desktop icon information of the application is customized through the application information configuration file. When the application is scanned, the application is adjusted according to the desktop icon information in the application information configuration. The desktop icon information of the application can be flexibly modified, thereby improving the efficiency of modifying the desktop icon information of the application and reducing the time spent on application development.
[0131] The present application also provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the following steps are implemented:
[0132] Parsing the application information configuration file to obtain a parsed file, wherein the parsed file includes an application package name of at least one application program and its corresponding desktop icon information;
[0133] If there is a target application package name matching the scanned application package name of the current application program in the application package names of the parsed file, obtaining desktop icon information corresponding to the target application package name;
[0134] The current application is adjusted according to the acquired desktop icon information.
[0135] Optionally, when the computer program is executed by a processor, the following steps are further implemented:
[0136] If the obtained desktop icon information includes the icon resource name, obtaining the icon resource ID corresponding to the icon resource name;
[0137] Update the icon resource ID of the current application to the obtained icon resource ID;
[0138] and / or,
[0139] If the acquired desktop icon information includes the icon display control information, the desktop icon display configuration information of the current application is adjusted according to the icon display control information.
[0140] Optionally, when the computer program is executed by a processor, the following steps are further implemented:
[0141] Obtaining a correspondence between an icon resource name and an icon resource ID of the at least one application;
[0142] According to the correspondence between the icon resource name and the icon resource ID of the at least one application program, the icon resource ID corresponding to the icon resource name is determined.
[0143] Optionally, when the computer program is executed by a processor, the following steps are further implemented:
[0144] Adding an icon resource corresponding to the icon resource name of the at least one application program to the resource package;
[0145] Generating a corresponding icon resource ID for the icon resource of the at least one application program;
[0146] Generate a correspondence between the icon resource name and the icon resource ID of the at least one application.
[0147] Optionally, when the computer program is executed by a processor, the following steps are further implemented:
[0148] In the case where the icon display control information is information for displaying icons on the desktop of the terminal device and the current application does not include desktop icon display configuration information, adding desktop icon display configuration information to the current application; or
[0149] When the icon display control information is to not display the icon information on the desktop of the terminal device and the current application includes desktop icon display configuration information, the desktop icon display configuration information is deleted in the current application.
[0150] Optionally, when the computer program is executed by a processor, the following steps are further implemented:
[0151] After adding the desktop icon display configuration information in the current application, the corresponding icon resource is displayed on the desktop of the terminal device;
[0152] After the current application deletes the desktop icon display configuration information, the corresponding icon resource is not displayed on the desktop of the terminal device.
[0153] Optionally, when the computer program is executed by a processor, the following steps are further implemented:
[0154] The corresponding icon resource is obtained from the resource package according to the updated resource ID, and the obtained icon resource is displayed on the desktop.
[0155] In this embodiment, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0156] The computer-readable storage medium provided by the present disclosure can implement the method for modifying the desktop icon shown in Example 1 by executing a computing program. To avoid repetition, it will not be described here.
[0157] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or terminal including the element.
[0158] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0159] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
Claims
1. A method for modifying a desktop icon, characterized in that: Applied to a terminal device, the method comprises: Parsing the application information configuration file to obtain a parsed file, wherein the parsed file includes an application package name of at least one application program and its corresponding desktop icon information; If there is a target application package name matching the scanned application package name of the current application program in the application package names of the parsed file, obtaining desktop icon information corresponding to the target application package name; Adjusting the current application according to the obtained desktop icon information; The desktop icon information includes icon display control information; the icon display control information is used to define whether to display the icon resource corresponding to the icon resource name on the desktop of the terminal device; The adjusting the current application according to the obtained desktop icon information includes: If the acquired desktop icon information includes the icon display control information, adjusting the desktop icon display configuration information of the current application according to the icon display control information; The adjusting the desktop icon display configuration information of the current application according to the icon display control information includes: In the case where the icon display control information is information for displaying icons on the desktop of the terminal device and the current application does not include desktop icon display configuration information, adding desktop icon display configuration information to the current application; or When the icon display control information is to not display the icon information on the desktop of the terminal device and the current application includes desktop icon display configuration information, the desktop icon display configuration information is deleted in the current application.
2. The method according to claim 1, characterized in that The desktop icon information includes an icon resource name, and the adjusting the current application according to the obtained desktop icon information includes: If the obtained desktop icon information includes the icon resource name, obtaining the icon resource ID corresponding to the icon resource name; The icon resource ID of the current application is updated to the acquired icon resource ID.
3. The method according to claim 2, characterized in that The obtaining of the icon resource ID corresponding to the icon resource name includes: Obtaining a correspondence between an icon resource name and an icon resource ID of the at least one application; According to the correspondence between the icon resource name and the icon resource ID of the at least one application program, the icon resource ID corresponding to the icon resource name is determined.
4. The method according to claim 3, characterized in that The obtaining of the correspondence between the icon resource name and the icon resource ID of the at least one application program includes: Adding an icon resource corresponding to the icon resource name of the at least one application program to the resource package; Generating a corresponding icon resource ID for the icon resource of the at least one application program; Generate a correspondence between the icon resource name and the icon resource ID of the at least one application.
5. The method according to claim 1, characterized in that After adding desktop icon display configuration information in the current application, the method includes: Display the corresponding icon resources on the desktop of the terminal device; After the current application deletes the desktop icon display configuration information, the method includes: The corresponding icon resource is not displayed on the terminal device desktop.
6. The method according to claim 2, characterized in that After the icon resource ID of the current application is updated to the acquired icon resource ID, the method includes: The corresponding icon resource is obtained from the resource package according to the updated resource ID, and the obtained icon resource is displayed on the desktop.
7. A device for modifying desktop icons, characterized in that: Applied to a terminal device, the desktop icon modification device comprises: A parsing module, used to parse the application information configuration file to obtain a parsed file, wherein the parsed file includes an application package name of at least one application program and its corresponding desktop icon information; an acquisition module, configured to acquire desktop icon information corresponding to a target application package name if there is a target application package name matching the scanned application package name of the current application program in the application package names of the parsed file; An adjustment module, used to adjust the current application according to the obtained desktop icon information; The desktop icon information includes icon display control information; the icon display control information is used to define whether to display the icon resource corresponding to the icon resource name on the desktop of the terminal device; The adjustment module is further configured to adjust the desktop icon display configuration information of the current application according to the icon display control information if the acquired desktop icon information includes the icon display control information; In the case where the icon display control information is information for displaying icons on the desktop of the terminal device and the current application does not include desktop icon display configuration information, adding desktop icon display configuration information to the current application; or When the icon display control information is to not display the icon information on the desktop of the terminal device and the current application includes desktop icon display configuration information, the desktop icon display configuration information is deleted in the current application.
8. A terminal device, characterized in that: The invention comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is run by the processor, the method for modifying a desktop icon according to any one of claims 1 to 6 is executed.
9. A computer-readable storage medium, characterized in that: The computer program is stored therein, and when the computer program is run on a processor, the method for modifying a desktop icon according to any one of claims 1 to 6 is executed.
