Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Fig. 1 is a flowchart illustrating a method for customizing functions in a host application interface by using a floating window, according to an embodiment of the present invention, where the method is implemented by a hosted toolkit bound to a host application, and the hosted toolkit may be an SDK (Software Development Kit). As shown in fig. 1, the method comprises the steps of:
step S100, receiving a configuration file related to the primary application sent by the server.
The parasitic toolkit bound to the main application may provide auxiliary functionality, and in particular, may utilize a floating window to expose floating window menu function items to the user. For example, when the master application is a game center application, the parasitic toolkit bound to the master application may provide functions of "view user center", "game acceleration", "view strategy", "participate in forum", and "live broadcast" to the user by using the floating window.
However, when the main application starts different programs, the required function items are different. In order to be able to customize different functions according to different programs, a configuration file related to the host application transmitted by the server is received in step S100. Wherein the configuration file comprises: and program identification, and floating window configuration parameters and floating window menu function item configuration parameters corresponding to the program identification. Specifically, the program identification may be a program name or a program ID; the floating window configuration parameter and the floating window menu function item configuration parameter are respectively the specific parameters for configuring the floating window and the floating window menu function item. Those skilled in the art can set the floating window configuration parameters and the floating window menu function item configuration parameters according to actual needs, which is not limited herein.
Step S101, when the main application starts the designated program, according to the designated program identification, inquiring the floating window configuration parameter and the floating window menu function item configuration parameter corresponding to the designated program identification in the configuration file.
The designated program identifier is a program identifier corresponding to the designated program. When the main application starts a designated program, if the program identifier of the designated program is identifier 1, the floating window configuration parameters and the floating window menu function item configuration parameters corresponding to the identifier 1 are inquired from the configuration file according to the identifier 1.
And step S102, creating and displaying the floating window by using the floating window configuration parameters corresponding to the specified program identification.
And after the floating window configuration parameters corresponding to the specified program identification are inquired from the configuration file, creating a floating window by using the floating window configuration parameters corresponding to the specified program identification, and displaying the floating window.
And step S103, configuring the menu function item of the floating window by using the floating window menu function item configuration parameter corresponding to the specified program identifier.
After the configuration parameters of the floating window menu function item corresponding to the specified program identification are inquired from the configuration file, the menu function item of the floating window is configured by using the configuration parameters of the floating window menu function item corresponding to the specified program identification, so that the menu function item corresponding to the specified program can be provided for a user through the floating window.
According to the method for customizing functions in the main application interface by using the floating window, when the main application starts the designated program, the floating window configuration parameters and the floating window menu function item configuration parameters corresponding to the designated program identifier in the configuration file are inquired according to the designated program identifier, then the floating window is created and displayed by using the floating window configuration parameters, and the menu function item of the floating window is configured by using the floating window menu function item configuration parameters. According to the technical scheme, the floating window can be used as the main application to customize the function matched with the program, so that the function customization is realized, and the function setting mode is optimized.
FIG. 2 is a flow diagram illustrating a method for function customization in a host application interface using floating windows, implemented by a hosted toolkit bound to a host application, according to another embodiment of the invention. As shown in fig. 2, the method comprises the steps of:
step S200, when the main application is started, a configuration file acquisition request is sent to the server.
When the main application starts, the parasitic toolkit bound with the main application sends a configuration file acquisition request to the server so as to acquire the configuration file related to the main application from the server.
Step S201, receiving a configuration file related to the primary application sent by the server.
Wherein the configuration file comprises: program identification, floating window configuration parameters corresponding to the program identification and floating window menu function item configuration parameters; specifically, the floating window configuration parameters may include: a floating window display style and a floating window size parameter; the floating window menu function item configuration parameters may include: icon parameters, location information and jump addresses.
Step S202, when the main application starts the designated program, the floating window configuration parameters and the floating window menu function item configuration parameters corresponding to the designated program identification in the configuration file are inquired according to the designated program identification.
Assume that the configuration file includes: program identification 1, floating window configuration parameter 1 and floating window menu function item configuration parameter 1 corresponding to program identification 1, program identification 2, floating window configuration parameter 2 and floating window menu function item configuration parameter 2 corresponding to program identification 2, and floating window configuration parameter 3 and floating window menu function item configuration parameter 3 corresponding to other program identifications except program identification 1 and program identification 2, if the program identification of the designated program is identification 4, namely designated program identification is identification 4, then querying a configuration file according to identification 4 to obtain floating window configuration parameter and floating window menu function item configuration parameter corresponding to identification 4 as floating window configuration parameter 4 and floating window menu function item configuration parameter 4 respectively.
And step S203, creating and displaying the floating window by using the floating window configuration parameters corresponding to the specified program identification.
Specifically, a floating window conforming to the floating window display style is created by using the floating window display style in the floating window configuration parameters corresponding to the designated program identifier, the size of the floating window is set by using the floating window size parameter in the floating window configuration parameters corresponding to the designated program identifier, and the floating window is displayed after the floating window is created.
And step S204, configuring the icons of the menu function items of the floating window by using the icon parameters in the configuration parameters of the menu function items of the floating window corresponding to the specified program identifier.
Specifically, the icon parameter may be a picture resource address corresponding to an icon of the menu function item. And acquiring the picture resource corresponding to the icon according to the picture resource address, and configuring the icon of the menu function item of the floating window by using the acquired picture resource.
And step S205, utilizing the position information in the configuration parameter of the menu function item of the floating window corresponding to the designated program identification to configure the arrangement position of the icons of the menu function item of the floating window.
In the case where the position information describes the arrangement position of the icon of each menu function item, the arrangement position of the icon of the menu function item of the floating window is arranged using the position information.
And step S206, configuring the jump behavior corresponding to the icon of the menu function item of the floating window by using the jump address in the configuration parameter of the menu function item of the floating window corresponding to the specified program identifier.
Wherein, the jump address is the address of the corresponding page providing the specific function. For example, the jump address corresponding to the "view walk" function item is the address of the page providing walk; and the jump address corresponding to the live broadcast function item is the address of the live broadcast page. After configuring the jump behavior corresponding to the icon of the menu function item of the floating window, the user can jump to the page corresponding to the corresponding function item by clicking the icon of the menu function item in the floating window.
According to the method for customizing functions in the main application interface by using the floating window, when the main application starts a designated program, the floating window configuration parameters and the floating window menu function item configuration parameters corresponding to the designated program identifier in the configuration file are inquired according to the designated program identifier, then the floating window is created and displayed by using the floating window configuration parameters, and the icons of the menu function items of the floating window, the arrangement positions of the icons and the jump behaviors corresponding to the icons are configured by using the floating window menu function item configuration parameters. According to the technical scheme, the floating window can be used as a main application to customize the function matched with the program, so that the function customization is realized, and the function setting mode is optimized; in addition, the created floating window can enable a user to conveniently use the menu function items, and the user can jump to the page corresponding to the corresponding function item by clicking the icon of the menu function item in the floating window.
FIG. 3 is a block diagram illustrating an apparatus for customizing functionality in a host application interface using a floating window, which may be disposed in a hosted toolkit bound to a host application, according to an embodiment of the present invention. As shown in fig. 3, the apparatus 300 for customizing functions in a main application interface by using a floating window includes: a receiving module 310, a querying module 320, a creating module 330, and a configuring module 340.
The receiving module 310 is adapted to: and receiving the configuration file related to the main application sent by the server.
Specifically, the configuration file includes: and program identification, and floating window configuration parameters and floating window menu function item configuration parameters corresponding to the program identification.
The query module 320 is adapted to: when the main application starts the designated program, the floating window configuration parameters and the floating window menu function item configuration parameters corresponding to the designated program identification in the configuration file are inquired according to the designated program identification.
The creation module 330 is adapted to: and creating and displaying the floating window by using the floating window configuration parameters corresponding to the specified program identification.
The configuration module 340 is adapted to: and configuring the menu function item of the floating window by using the floating window menu function item configuration parameter corresponding to the appointed program identifier.
The configuration module 340 configures the menu function item of the floating window by using the floating window menu function item configuration parameter corresponding to the specified program identifier, so that the menu function item corresponding to the specified program can be provided to the user through the floating window.
According to the device for customizing functions in the main application interface by using the floating window, when the main application starts a designated program, the query module queries the floating window configuration parameters and the floating window menu function item configuration parameters corresponding to the designated program identifier in the configuration file according to the designated program identifier, the creation module creates and displays the floating window by using the floating window configuration parameters, and the configuration module configures the menu function items of the floating window by using the floating window menu function item configuration parameters. According to the technical scheme, the floating window can be used as the main application to customize the function matched with the program, so that the function customization is realized, and the function setting mode is optimized.
Fig. 4 is a block diagram illustrating an apparatus for customizing functions in a main application interface using a floating window according to another embodiment of the present invention, which may be provided in a parasitic toolkit bound to a main application. As shown in fig. 4, the apparatus 400 for customizing functions in a main application interface by using a floating window includes: a sending module 410, a receiving module 420, a querying module 430, a creating module 440, and a configuring module 450.
The sending module 410 is adapted to: and when the main application is started, sending a configuration file acquisition request to the server.
When the main application starts, the sending module 410 sends a configuration file obtaining request to the server so as to obtain the configuration file related to the main application from the server.
The receiving module 420 is adapted to: and receiving the configuration file related to the main application sent by the server.
Wherein the configuration file comprises: program identification, floating window configuration parameters corresponding to the program identification and floating window menu function item configuration parameters; specifically, the floating window configuration parameters may include: a floating window display style and a floating window size parameter; the floating window menu function item configuration parameters may include: icon parameters, location information and jump addresses.
The query module 430 is adapted to: when the main application starts the designated program, the floating window configuration parameters and the floating window menu function item configuration parameters corresponding to the designated program identification in the configuration file are inquired according to the designated program identification.
The creation module 440 is adapted to: and creating and displaying the floating window by using the floating window configuration parameters corresponding to the specified program identification.
Specifically, the creating module 440 creates a floating window conforming to the floating window display style by using the floating window display style in the floating window configuration parameters corresponding to the specified program identifier, sets the size of the floating window by using the floating window size parameter in the floating window configuration parameters corresponding to the specified program identifier, and displays the floating window after the floating window is created.
The configuration module 450 is adapted to: configuring icons of menu function items of the floating window by using icon parameters in the configuration parameters of the menu function items of the floating window corresponding to the appointed program identification; configuring the arrangement position of the icons of the menu function items of the floating window by using the position information in the configuration parameters of the menu function items of the floating window corresponding to the appointed program identification; and configuring the jump behavior corresponding to the icon of the menu function item of the floating window by using the jump address in the configuration parameter of the menu function item of the floating window corresponding to the appointed program identifier.
According to the device for customizing functions in the main application interface by using the floating window, when the main application starts a designated program, the query module queries the floating window configuration parameters and the floating window menu function item configuration parameters corresponding to the designated program identifier in the configuration file according to the designated program identifier, the creation module creates and displays the floating window by using the floating window configuration parameters, and the configuration module configures the icons of the menu function items of the floating window, the arrangement positions of the icons, and the skipping behaviors corresponding to the icons by using the floating window menu function item configuration parameters. According to the technical scheme, the floating window can be used as a main application to customize the function matched with the program, so that the function customization is realized, and the function setting mode is optimized; in addition, the created floating window can enable a user to conveniently use the menu function items, and the user can jump to the page corresponding to the corresponding function item by clicking the icon of the menu function item in the floating window.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components in accordance with embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.