WO2011140968A1 - 一种在android的菜单中添加菜单项的方法及设备 - Google Patents

一种在android的菜单中添加菜单项的方法及设备 Download PDF

Info

Publication number
WO2011140968A1
WO2011140968A1 PCT/CN2011/073864 CN2011073864W WO2011140968A1 WO 2011140968 A1 WO2011140968 A1 WO 2011140968A1 CN 2011073864 W CN2011073864 W CN 2011073864W WO 2011140968 A1 WO2011140968 A1 WO 2011140968A1
Authority
WO
WIPO (PCT)
Prior art keywords
menu
local
menu item
party application
item
Prior art date
Application number
PCT/CN2011/073864
Other languages
English (en)
French (fr)
Inventor
赵京
Original Assignee
华为终端有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 华为终端有限公司 filed Critical 华为终端有限公司
Priority to EP11780189.4A priority Critical patent/EP2570917B1/en
Priority to ES11780189.4T priority patent/ES2554498T3/es
Publication of WO2011140968A1 publication Critical patent/WO2011140968A1/zh
Priority to US13/676,782 priority patent/US9319508B2/en
Priority to US15/053,400 priority patent/US9703454B2/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72406User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by software upgrading or downloading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72469User interfaces specially adapted for cordless or mobile telephones for operating the device by selecting functions from two or more displayed items, e.g. menus or icons

Definitions

  • the present invention relates to the field of computers, and in particular, to a method and device for adding menu items in a menu of an Android. Background of the invention
  • Android is a Linux kernel-based software platform and operating system. Android includes multiple functions and multiple local menus. Each local menu includes one or more menu items. Each menu item corresponds to a function, so that it can be accessed from the local menu. Start each function in .
  • Android can be used as a mobile phone operating system, and mobile phone manufacturers add different third-party applications on the Android platform to produce mobile phones with different functions.
  • Each third-party application includes one or more functions, and each function corresponds to one menu item, and a menu item corresponding to each function included in the third-party application is added to the local menu, so that the local menu may also be Start the functions included in third-party applications.
  • the mobile phone manufacturer adds the menu items included in the third-party application to the database by modifying the code in the Android platform, and when creating the local menu, from the database Get menu items and form a local menu, so that the menu items included in the third-party application are added to the local menu.
  • the handset manufacturer then burns the Android platform and third-party applications into the phone's memory.
  • the code of the Android platform is modified.
  • the embodiment of the invention provides a method and a device for adding a menu item in an Android menu.
  • the technical solution is as follows:
  • a method for adding a menu item in a menu of an Android comprising: receiving a request to open a local menu, where the request carries a menu ID, and creating a local menu corresponding to the menu ID;
  • a local menu to which menu items of the third application are added is displayed.
  • a device for adding a menu item in a menu of an Android includes: a first creating module, configured to receive a request to open a local menu, where the request carries a menu ID, and a local menu corresponding to the menu ID is created;
  • An obtaining module configured to obtain, according to the menu ID, a menu item of a corresponding third-party application in a correspondence between a menu item of the stored third-party application and a local menu ID;
  • a adding module configured to add a menu item of the third-party application to the local menu, and display a local menu of a menu item to which the third-party application is added.
  • the menu item that needs to be added to the local menu is obtained from the correspondence between the menu item of the stored third-party application and the local menu ID, and the acquired menu item is directly added to the local menu. Since the menu item of the third-party application is directly added to the local menu, the menu item of the third-party application can be added to the database of the Android platform and the menu item of the third-party application can be added without modifying the code of the Android. Go to the local menu. BRIEF DESCRIPTION OF THE DRAWINGS
  • FIG. 1 is a flowchart of a method for adding a menu item in an Android menu according to Embodiment 1 of the present invention
  • FIG. 2 is a flowchart of a method for adding a menu item in an Android menu according to Embodiment 2 of the present invention
  • Embodiment 3 is a schematic diagram of a first local main menu provided by Embodiment 2 of the present invention.
  • Embodiment 4 is a schematic diagram of a second local main menu provided by Embodiment 2 of the present invention.
  • FIG. 5 is a schematic diagram of a first local secondary menu provided by Embodiment 2 of the present invention
  • FIG. 6 is a schematic diagram of a second local secondary menu provided by Embodiment 2 of the present invention
  • an embodiment of the present invention provides a method for adding a menu item in an Android menu, including:
  • Step 101 Receive a request to open a local menu, where the request carries a menu ID, and creates a local menu corresponding to the menu ID carried;
  • Step 102 Obtain, according to the carried menu ID, a menu item corresponding to the third-party application in the corresponding relationship between the stored menu item of the third-party application and the local menu ID;
  • Step 103 Add the obtained menu item of the third-party application to the local menu, and display a local menu of the menu item for adding the third-party application.
  • the menu item of the third-party application and the ID of the local menu to which the menu item belongs are separately stored, and when the local menu is opened, the corresponding relationship between the stored menu item of the third-party application and the local menu ID is obtained.
  • the menu item that needs to be added to the local menu is added directly to the local menu. Since the menu item of the third-party application is directly added to the local menu, the menu item of the third-party application can be added to the database of the Android platform and the menu item of the third-party application can be added without modifying the code of the Android. Go to the local menu.
  • Example 2 Example 2
  • an embodiment of the present invention provides a method for adding a menu item in an Android menu, including:
  • Step 201 When a user installs a third-party application in the mobile phone, searching for a configuration file from the file collection of the third-party application;
  • the user can download a file collection of a third-party application from the application developer and store the file collection of the third-party application in the memory of the mobile phone.
  • the third-party application may include one or more functions, each of which is implemented by a corresponding API (Application Programming Interface) function, and therefore, the third party is stored in the file collection of the third-party application.
  • the API function for each function included in the application is not limited to the API (Application Programming Interface) function.
  • the configuration file exists in an Xml (Extensible Markup Language) file, and at least the following information exists in the configuration file, including menu items and
  • the menu item belongs to the local menu ID, and the menu item includes at least the menu item name and the identification information.
  • the identification information includes at least the menu ID or the function ID of the secondary menu.
  • the identification information may further include an application ID, if the identification information is included.
  • the menu ID of the secondary menu the identification information can uniquely identify a secondary menu. If the identification information includes a function ID, the identification information can uniquely identify a function.
  • the menu item may further include an ID of the icon, etc., and correspondingly, an icon exists in the file set of the third-party application.
  • the menu item name exists in the form of a string
  • the configuration file may include a plurality of menu items and an ID of a local menu to which each menu item belongs. Among them, the developer of the third-party application knows in advance each local menu in the Android platform, and if the developer of the third-party application wants to add a menu item of a third-party application to a local menu, it can directly The local menu ID to which the menu item of the third-party application belongs in the configuration file of the three-party application is the ID of the local menu.
  • a third-party application is a mail system, and a configuration file exists in the file collection of the mail system, and the information in the configuration file is as shown in Table 1.
  • the configuration file of the mail system shown in Table 1 includes two menu items and an ID of a local menu to which each menu item belongs.
  • the menu item name included in the first menu item is "mail”, and the identification information includes the function ID. "ID101" and the application ID is "ID10", and the icon ID is "ID102"; the menu item name included in the second menu item is "DirectMessage", and the identification information includes the function ID "ID103" and the application ID is "" ID10".
  • the icon ID may not be included in the menu item, so the icon ID in the last line of the record in Table 1 is empty.
  • Step 202 By parsing the found configuration file, obtain at least information about each menu item and a menu ID of a local menu to which each menu item belongs, and store the acquired information in the configuration manager. ;
  • the configuration manager is stored in an unoccupied space area in the phone memory, and the configuration manager is configured to store a correspondence between a menu item in the third-party application and a menu ID of the local menu to which the menu item belongs. For example, by parsing the configuration file as shown in Table 1, from the table The configuration file shown in 1 obtains two menu items and the local menu ID of each menu item, and stores the obtained two menu items and the local menu ID of each menu item in the configuration manager as shown in Table 2. in.
  • each local application when a mobile phone manufacturer produces a mobile phone, usually multiple local applications are set in the mobile phone, each local application includes multiple functions, and a corresponding local main menu is set for each local application, including one in the local main menu.
  • the identification information in each menu item includes at least one function ID or a menu ID of a local secondary menu; the structure of the local secondary menu is the same as the structure of the local main menu, and each local secondary menu is also Consists of multiple menu items.
  • the handset manufacturer also sets a unique ID for each local secondary menu and local main menu.
  • the local main menu and the local secondary menu can be collectively referred to as a local menu.
  • the correspondence between the menu ID of each local menu and each menu item included therein is stored in a database in the Android platform of the mobile phone.
  • a mobile phone includes local applications such as "information", “address book”, and "setup”, and each local application corresponds to a local main menu.
  • Table 3 the correspondence between the menu ID of the local main menu corresponding to the "information" local application and each menu item in the local main menu is shown.
  • each row of records includes a menu ID and a menu item.
  • the menu items in each row of records include a menu item name, identification information, and an icon ID, wherein the identification information may include a function ID and a second level.
  • Two fields of the menu ID, the identification information in each row of the second to fourth rows includes only the function ID, and the ID of the secondary menu is empty, and the identification information in the fifth row record includes only the secondary menu ID, and The function ID is empty.
  • the menu item in the 5th line record in Table 3 includes the secondary menu ID "ID 18", indicating that the menu item corresponds to a local secondary menu with ID "ID18".
  • the local secondary menu has the same structure as the local main menu, and also includes a plurality of menu items.
  • the mobile phone manufacturer shown in Table 4 also sets the menu ID and each menu item included in the local secondary menu. Correspondence.
  • mobile phone manufacturers store Tables 3 and 4 in the database in the Android platform.
  • the mobile phone manufacturer produces the mobile phone, the correspondence between the menu items stored in the database of the Android platform and the menu ID and each local application are burned. Written in the memory of the phone. Therefore, in the phone's memory, the database and configuration manager of the Android platform are located in different storage spaces.
  • the mobile phone manufacturer creates an icon for each local application, and binds the icon corresponding to each local application to the menu ID of the local main menu corresponding to the local application.
  • the user submits a request to open the menu by selecting an icon, and the request carries the menu ID bound to the icon, and then performs the following steps 203 to 206 to create a local main menu corresponding to the menu ID carried by the request. , including:
  • Step 203 Receive a request to open a menu, where the request carries a menu ID, and is created to carry The local main menu corresponding to the menu ID;
  • receiving a request to open a menu creating a menu list, and acquiring, according to a menu ID carried in the request for opening the menu, all the menu items corresponding to the menu item stored in the database of the Android platform and the menu ID,
  • the name of the menu item included in each menu item is filled in the created menu list.
  • the menu item name and the identification information in each menu item are bound to obtain the local main menu.
  • a menu item further includes an icon ID
  • the corresponding icon is obtained according to the icon ID, and correspondingly, the acquired icon and the menu item name in the menu item are filled together to the created menu. List.
  • each menu item includes an icon ID
  • the corresponding icon is obtained according to the icon ID in each menu item, and the menu item name and the corresponding icon in each menu item are filled in the menu list, and in the menu list, each menu is The name of the menu item included in the item is bound to the identification information, and the local main menu as shown in FIG. 3 is obtained.
  • the menu item shown in the third row in Table 5 includes the menu item name "write information", the identification information as the function "ID10", and the icon ID as "ID11”, and the corresponding icon is obtained according to the icon ID11, and the menu is obtained.
  • the menu item name in the item is "write information" and the acquired icon is filled in the menu list, and the "write information" in the menu item is bound to the function "ID10".
  • Step 204 Search for a corresponding menu item from the configuration manager according to the carried menu ID; where the searched menu item includes at least a menu item name and identification information;
  • the menu items found in the configuration manager are menu items of the third-party application.
  • the corresponding menu item is searched from the configuration manager as shown in Table 2, wherein the searched menu item includes the menu item name as "mail”, and the identification information includes the application ID "ID10" and The function ID is "ID101", and the menu item is a menu item of the "mail system” third-party application.
  • Step 205 Add the obtained menu item to the local main menu, and display the local main menu; specifically, in the menu list of the local main menu, respectively fill the menu name included in the obtained menu item in the unoccupied In the table, the menu item name in the obtained menu item is bound to the identification information in the local main menu, and the local main menu is displayed.
  • the unoccupied form is the aforementioned blank form.
  • the acquired menu item further includes an icon ID
  • the corresponding icon is obtained in the file collection of the third-party application installed in the mobile phone, and correspondingly, the icon and the menu item name in the menu item are filled in The unoccupied table in the menu list of the local main menu.
  • the corresponding icon in the file collection of the third-party application installed in the mobile phone, the corresponding icon is searched, and the menu item name "mail” in the menu item and the searched icon are filled in the menu item list.
  • the identification information in the menu item is bound to the menu item name "mail”
  • the application "ID10" and the function "ID101” are bound to the menu item name "mail”
  • the obtained local The main menu is shown in Figure 4.
  • an unoccupied space is partitioned in the mobile phone memory, and the space is used to store a menu item of a third-party application and a local menu ID to which the menu item belongs, and therefore, It is necessary to modify the Android code to store the menu item of the third-party application and the local menu ID of the menu item in the Android database.
  • the user needs to open a local main menu, first create a local main menu that the user needs to open, and then directly add a menu item of the third-party application in the local main menu, thereby adding the menu item of the third-party application to the local main. In the menu.
  • the background color of the menu item selected by the user is replaced with a specific background color.
  • a local main menu as shown in FIG. 4 can be displayed to the user.
  • the local main menu obtains the identification information bound to the menu item name in the menu item, and if the obtained identification information includes only the function ID, then according to The acquired function ID searches for the corresponding function from the memory of the mobile phone, that is, finds an API function that implements the function, and then directly calls the search function; if the acquired identification information includes the application ID and the function ID, the application ID is from the mobile phone.
  • Step 206 Receive a request to open a menu, a menu ID of the secondary menu carried in the request, and create a local secondary menu corresponding to the ID of the carried secondary menu;
  • a menu item further includes an icon ID
  • the corresponding icon is obtained according to the icon ID, and the acquired icon and the menu item name in the menu item are filled into the created menu list together.
  • the request to open the menu is received, and the request to open the menu carries the menu ID of ID18, creating a menu list, according to the ID 18 carried from Android.
  • Table 4 stored in the database find all the corresponding menu items, as shown in Table 6;
  • Step 207 Search for a corresponding menu item from the configuration manager according to the menu ID of the carried secondary menu; wherein the searched menu item includes at least the menu item name and the identification information;
  • the corresponding menu item is searched from the configuration manager as shown in Table 2, wherein the menu item includes the menu item name "DirectMessage", the identification information includes the function ID "ID 103" and the application The ID is "ID 10".
  • Step 208 Add the obtained menu item to the local secondary menu to display the local secondary menu. Specifically, the menu name included in the obtained menu item is filled in an unoccupied table in the menu list of the local secondary menu, and the menu item name and the identification information included in the menu item are performed in the local secondary menu. Bind, showing the local secondary menu.
  • the obtained menu item name "DirectMessage” is filled in the unoccupied table in the menu list of the local secondary menu, and the menu item name of the menu item and the function ID "ID103" are performed in the local secondary menu. Bind, get the local secondary menu as shown in Figure 6, and then display Show the local secondary menu as shown in Figure 6.
  • the mobile phone manufacturer sets an XSD (XML Schemas Definition) specification in the mobile phone, defines the structure of each local menu in the mobile phone in the XSD specification, and further, after performing step 201 and executing Before step 202, the searched configuration file may also be verified according to the XSD specification in the mobile phone. If the verification is passed, step 202 is performed; otherwise, the operation ends. For example, suppose that a local menu can be defined in the XSD and no new menu items can be added. If there is a menu item in the searched configuration file that needs to be added to the local menu, it will be obtained when the XSD specification is used to verify the search configuration file. The result is that the verification does not pass and the operation ends.
  • XSD XML Schemas Definition
  • the code in the Android platform in the mobile phone is not modified, so each local application in the mobile phone is not destroyed, when the third-party application needs When interacting with the local application, the third-party application first submits the information that needs to be exchanged to the Android platform, and then the Android platform receives the interactive information and forwards the interactive information to the local application.
  • the method provided in this embodiment can add a menu item of a third-party application to a local menu in any terminal device supporting the Android platform.
  • the menu item of the third-party application and the ID of the local menu to which the menu item belongs are stored in the configuration manager, and when the local menu is created, the configuration manager needs to be added to the local menu.
  • a menu item for a third-party application that adds the acquired menu item to the local menu. Since the menu item of the third-party application and the local menu ID to which the menu item belongs are stored in the configuration manager, it is no longer necessary to add the menu item of the third-party application to the Android database by modifying the Android code; The application's menu items are added directly to the local menu, allowing menu items from third-party applications to be added to the local menu.
  • an embodiment of the present invention provides a device for adding a menu item in an Android menu, including:
  • a first creating module 301 configured to receive a request to open a local menu, where the request carries a menu ID, and a local menu corresponding to the menu ID is created;
  • the obtaining module 302 is configured to obtain, according to the menu ID, a menu item corresponding to the third-party application in the corresponding relationship between the stored menu item of the third-party application and the local menu ID;
  • the adding module 303 is configured to add the obtained menu item of the third-party application to the local menu, and display a local menu of the menu item for adding the third-party application.
  • the menu item of the obtained third-party application includes at least a menu item name and identification information, and correspondingly,
  • the adding module 303 specifically includes:
  • a filling unit configured to fill, in a menu list of the local menu, a menu item name in the obtained third-party application menu item in an unoccupied table in the menu list;
  • a binding unit configured to bind the menu item name in the menu item of the obtained third-party application to the identifier information, where the identifier information is used to identify the function or the secondary menu;
  • a first display unit configured to display a local menu of a menu item for adding a third-party application; wherein, if the acquired menu item of the third-party application further includes an icon ID, the adding module 303 further includes:
  • a searching unit configured to search for an icon corresponding to the icon ID in a file collection of the third-party application; correspondingly,
  • a filling unit configured to fill the menu item name and the search icon in the menu item of the obtained third-party application in an unoccupied table in the menu list;
  • the device further includes:
  • a storage module configured to search for a configuration file from a file collection of a third-party application, by matching Parsing the file for parsing, obtaining the menu item of the third-party application and the local menu ID of the menu item, and storing the menu item of the third-party application and the local menu ID of the menu item in the unoccupied space;
  • the device further includes:
  • a verification module configured to: after the storage module finds the configuration file, verify the configuration file according to the structure of the defined local menu;
  • the device further includes:
  • a first obtaining module configured to: when the user selects a menu item in a local menu of a menu item to which the third-party application is added, obtain identifier information bound to a menu item name in the selected menu item;
  • a second obtaining module configured to obtain a function according to the function ID if the obtained identification information includes a function ID
  • a second creating module configured to: if the obtained identification information includes a secondary menu ID, create a secondary menu corresponding to the secondary menu ID;
  • the second creation module specifically includes:
  • a creating unit configured to create a local secondary menu corresponding to the secondary menu ID
  • An obtaining unit configured to obtain, according to the secondary menu ID, a menu item of a corresponding third-party application in a correspondence between a menu item of the stored third-party application and a local menu ID;
  • Adding a unit for adding a menu item of a third-party application to a local secondary menu a second display unit, configured to display a local secondary menu of a menu item for adding a third-party application; wherein the device may be an Android platform installed Mobile phone or terminal device supporting the Android platform.
  • the menu item of the third-party application and the ID of the local menu to which the menu item belongs are stored in the configuration manager, and when the local menu is created, the configuration manager needs to be added to the local menu.
  • a menu item for a third-party application that adds the acquired menu item to the local menu. Because the menu item of the third-party application and the local menu ID to which the menu item belongs are stored In the configuration manager, there is no need to modify the Android code to add the menu items of the third-party application to the Android database; since the menu items of the third-party application are directly added to the local menu, the third-party application is implemented. Menu items are added to the local menu.

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • User Interface Of Digital Computer (AREA)

Description

一种在 Andro i d的菜单中添加菜单项的方法及设备 本申请要求于 2010 年 05 月 14 日提交中国专利局、 申请号为 201010176312.X, 发明名称为"一种在 Android的菜单中添加菜单项的方法 及设备 "的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域
本发明涉及计算机领域,特别涉及一种在 Android的菜单中添加菜单项 的方法及设备。 发明背景
Android是基于 Linux内核的软件平台和操作系统, Android中包括多个功能 以及多个本地菜单, 每个本地菜单中包括一个或多个菜单项, 每个菜单项 对应一个功能, 如此可以从本地菜单中启动每个功能。 其中, Android可以 作为手机操作系统, 手机制造商在 Android平台上添加不同的第三方应用, 从而生产出功能不同的手机。 其中, 每个第三方应用包括一个或多个功能, 且每个功能对应一个菜单项, 将第三方应用包括的每个功能对应的一个菜 单项添加到本地菜单中, 如此, 也可以从本地菜单中启动第三方应用包括 的功能。
其中,在 Android平台内有一个用于存储菜单项的数据库,手机制造商 通过修改 Android平台中的代码,将第三方应用包括的菜单项添加到该数据 库中, 当创建本地菜单时, 从该数据库中获取菜单项并组成本地菜单, 如 此, 实现将第三方应用包括的菜单项添加到本地菜单中。 然后, 手机制造 商再将 Android平台和第三方应用烧写到手机的存储器中。
发明人发现现有技术至少存在以下问题:
手机制造商在向本地菜单添加某个第三方应用的菜单项时, 需要对 Android的代码进行修改, 另外, 手机出厂后, 由于烧写到手机存储器中的 数据不可以再被修改, 所以当用户下载某个第三方应用到手机中时, 用户 无法将该第三方应用中的菜单项添加到手机中的本地菜单中。 发明内容
为了能够在手机的本地菜单中添加第三方应用的菜单项且不需要对
Android平台的代码进行修改, 本发明实施例提供了一种在 Android的菜单 中添加菜单项的方法及设备。 所述技术方案如下:
一种在 Android的菜单中添加菜单项的方法, 所述方法包括: 接收打开本地菜单的请求, 所述请求中携带菜单 ID, 创建所述菜单 ID 对应的本地菜单;
根据所述菜单 ID,在已存储的第三方应用的菜单项和本地菜单 ID的对 应关系中, 获取对应的第三方应用的菜单项;
将所述第三方应用的菜单项添加到所述本地菜单中;
显示添加了所述第三应用的菜单项的本地菜单。
一种在 Android的菜单中添加菜单项的设备, 所述设备包括: 第一创建模块, 用于接收打开本地菜单的请求, 所述请求中携带菜单 ID, 创建所述菜单 ID对应的本地菜单;
获取模块, 用于根据所述菜单 ID, 在已存储的第三方应用的菜单项和 本地菜单 ID的对应关系中, 获取对应的第三方应用的菜单项;
添加模块, 用于将所述第三方应用的菜单项添加到所述本地菜单中, 显示添加了所述第三方应用的菜单项的本地菜单。
当打开本地菜单时, 通过从已存储的第三方应用的菜单项和本地菜单 ID的对应关系中获取需要添加到该本地菜单的菜单项, 直接将获取的菜单 项添加到该本地菜单中。 由于将第三方应用的菜单项直接添加到本地菜单 中, 因而不需要通过修改 Android的代码, 即可将第三方应用的菜单项添加 到 Android平台的数据库中以及实现将第三方应用的菜单项添加到本地菜 单中。 附图简要说明
此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一 部分, 并不构成对本发明的限定。 在附图中:
图 1是本发明实施例 1提供的一种在 Android的菜单中添加菜单项的方 法流程图;
图 2是本发明实施例 2提供的一种在 Android的菜单中添加菜单项的方 法流程图;
图 3是本发明实施例 2提供的第一种本地主菜单的示意图;
图 4是本发明实施例 2提供的第二种本地主菜单的示意图;
图 5是本发明实施例 2提供的第一种本地二级菜单的示意图; 图 6是本发明实施例 2提供的第二种本地二级菜单的示意图; 图 7是本发明实施例 3提供的一种在 Android的菜单中添加菜单项的设 备示意图。 实施本发明的方式
为使本发明的目的、 技术方案和优点更加清楚明白, 下面结合实施方 式和附图, 对本发明做进一步详细说明。 在此, 本发明的示意性实施方式 及其说明用于解释本发明, 但并不作为对本发明的限定。
实施例 1
如图 1所示,本发明实施例提供了一种在 Android的菜单中添加菜单项 的方法, 包括:
步骤 101 : 接收打开本地菜单的请求, 该请求中携带菜单 ID, 创建携 带的菜单 ID对应的本地菜单;
步骤 102: 根据携带的菜单 ID, 在已存储的第三方应用的菜单项和本 地菜单 ID的对应关系中, 获取对应的第三方应用的菜单项; 步骤 103: 将获取的第三方应用的菜单项添加到本地菜单中, 显示添加 第三方应用的菜单项的本地菜单。
在本发明实施例中, 单独存储第三方应用的菜单项和该菜单项所属的 本地菜单的 ID, 当打开本地菜单时, 根据已存储的第三方应用的菜单项和 本地菜单 ID的对应关系获取需要添加到该本地菜单的菜单项, 直接将获取 的菜单项添加到该本地菜单中。 由于将第三方应用的菜单项直接添加到本 地菜单中, 因而不需要通过修改 Android的代码, 即可将第三方应用的菜单 项添加到 Android平台的数据库中以及实现将第三方应用的菜单项添加到 本地菜单中。 实施例 2
如图 2所示,本发明实施例提供了一种在 Android的菜单中添加菜单项 的方法, 包括:
步骤 201 : 当用户在手机中安装某个第三方应用时,从该第三方应用的 文件集合中查找配置文件;
其中, 用户可以从应用开发商下载某个第三方应用的文件集合并将该 第三方应用的文件集合存储在手机的存储器中。 该第三方应用可以包括一 个或多个功能, 每个功能都由对应的 API ( Application Programming Interface, 应用程序编程接口) 函数来实现, 因此, 在该第三方应用的文件 集合中存储实现该第三方应用包括的每个功能的 API函数。
其中, 在该第三方应用的文件集合中存在一个配置文件, 该配置文件 以 Xml ( Extensible Markup Language, 可扩展标记语言 )文件的形式存在, 在该配置文件中至少存在如下信息, 包括菜单项和该菜单项所属的本地菜 单 ID, 而菜单项至少包括菜单项名称和标识信息, 标识信息至少包括二级 菜单的菜单 ID或功能 ID, 另外, 标识信息还可以包括应用 ID, 如果标识 信息中包括二级菜单的菜单 ID,则标识信息可以唯一的标识一个二级菜单, 如果标识信息中包括功能 ID, 则标识信息可以唯一的标识一个功能。 另夕卜, 该菜单项还可以包括图标的 ID等, 相应地, 该第三方应用的文件集合中还 存在图标。 另外, 菜单项名称以字符串的形式存在, 在配置文件中可以同 时包括多个菜单项以及每个菜单项所属本地菜单的 ID。 其中, 第三方应用 的开发商事先知道 Android平台内的每个本地菜单,如果第三方应用的开发 商想将某个第三方应用的菜单项添到某个本地菜单时, 则可以直接在该第 三方应用的配置文件中定义该第三方应用的菜单项所属的本地菜单 ID为该 本地菜单的 ID。
例如, 某个第三方应用为邮件系统, 在该邮件系统的文件集合中存在 一个配置文件, 该配置文件内的信息如表 1所示。 在表 1所示的邮件系统 的配置文件中, 包括两个菜单项以及每个菜单项所属本地菜单的 ID, 第一 个菜单项中包括的菜单项名称为 "邮件"、标识信息包括功能 ID为 "ID101" 和应用 ID为 "ID10", 以及图标 ID为 "ID102" ; 第二个菜单项中包括的菜 单项名称为 "DirectMessage"、 标识信息包括功能 ID为 "ID103"和应用 ID 为 "ID10"。 其中, 菜单项中可以不包括图标 ID, 因此, 表 1中的最后一行 记录中的图标 ID为空。
表 1
Figure imgf000007_0001
步骤 202: 通过对查找到的配置文件进行解析,从该配置文件中至少获 取每个菜单项以及每个菜单项所属的本地菜单的菜单 ID等信息, 并将获取 的信息存储在配置管理器中;
其中, 配置管理器存储在手机存储器中的未被占用的空间区域内, 配 置管理器用于存储第三方应用中的菜单项与该菜单项所属本地菜单的菜单 ID之间的对应关系。 例如, 通过对如表 1所示的配置文件进行解析, 从表 1 所示的配置文件中获取两个菜单项以及每个菜单项所属本地菜单 ID, 并 将获取的两个菜单项以及每个菜单项所属本地菜单 ID存储在如表 2所示的 配置管理器中。
表 2
Figure imgf000008_0001
其中, 手机制造商在生产手机时, 通常在手机中设置多个本地应用, 每个本地应用包括多个功能, 且为每个本地应用设置对应的一个本地主菜 单, 在本地主菜单中包括一个或多个菜单项, 每个菜单项中的标识信息至 少包括一个功能 ID或一个本地二级菜单的菜单 ID;本地二级菜单的结构与 本地主菜单的结构相同, 每个本地二级菜单也是由多个菜单项组成。 另外, 手机制造商还为每个本地二级菜单和本地主菜单设置唯一的一个 ID 来标 识, 为了便于说明, 可以将本地主菜单和本地二级菜单统称为本地菜单。
其中, 在手机的 Android平台内的数据库中存储每个本地菜单的菜单 ID与其包括的每个菜单项的对应关系。例如,某个手机中包括"信息"、 "通 信录" 和 "设置" 等本地应用, 而每个本地应用对应一个本地主菜单。 如 表 3所示为 "信息" 这个本地应用对应的本地主菜单的菜单 ID与该本地主 菜单内的每个菜单项的对应关系。 在表 3中每行记录中包括一个菜单 ID和 一个菜单项, 在表 3, 每行记录中的菜单项都包括菜单项名称、 标识信息和 图标 ID, 其中标识信息可以包括功能 ID和二级菜单 ID两个字段, 第 2至 4行的每行记录中的标识信息只包括功能 ID, 而二级菜单的 ID都为空, 第 5行记录中的标识信息只包括二级菜单 ID, 而功能 ID为空。 表 3
Figure imgf000009_0001
表 3中的第 5行记录中的菜单项内包括二级菜单 ID为 "ID 18", 表明 该菜单项对应一个 ID为 "ID18" 的本地二级菜单。 该本地二级菜单与本地 主菜单的结构相同, 其内也包括多个菜单项, 如表 4所示的手机制造商也 为该本地二级菜单设置菜单 ID和其内包括的每个菜单项的对应关系。
表 4
Figure imgf000009_0002
其中, 手机制造商都将表 3和表 4存储在 Android平台中的数据库中, 手机制造商在生产手机时,将 Android平台的数据库中存储的菜单项与菜单 ID的对应关系以及每个本地应用烧写在手机的存储器中。 因此, 在手机的 存储器中, Android 平台的数据库与配置管理器分别位于不同的存储空间 中。
其中, 在手机的桌面上, 手机制造商为每个本地应用创建一个图标, 且将每个本地应用对应的图标与该本地应用对应的本地主菜单的菜单 ID绑 定在一起。 用户通过选中某个图标, 提交打开菜单的请求, 且该请求中携 带绑定在该图标上的菜单 ID, 然后执行如下的步骤 203至 206, 进行创建 该请求携带的菜单 ID对应的本地主菜单, 包括:
步骤 203: 接收打开菜单的请求, 该请求中携带菜单 ID, 创建携带的 菜单 ID对应的本地主菜单;
具体地, 接收打开菜单的请求, 创建菜单列表, 根据打开菜单的请求 中携带的菜单 ID,在 Android平台的数据库中存储的菜单项与菜单 ID的对 应关系中, 获取对应的所有菜单项, 将每个菜单项中包括的菜单项名称填 充在创建的菜单列表中, 在菜单列表中, 将每个菜单项中的菜单项名称和 标识信息进行绑定, 得到本地主菜单。
进一步地, 如果某个菜单项中还包括图标 ID, 则在手机存储器中, 根 据图标 ID获取对应的图标, 相应地, 将获取的图标和该菜单项中的菜单项 名称一起填充到创建的菜单列表中。
例如, 接收打开菜单的请求, 该请求中携带菜单 ID为 ID1, 创建菜单 列表, 在 Android平台的数据库中存储的表 3中, 根据该请求中携带的 ID1 获取对应的所有菜单项, 如表 5所示, 其中, 每个菜单项中都包括图标 ID;
Figure imgf000010_0001
Figure imgf000010_0002
在手机的存储器中, 再根据每个菜单项中的图标 ID获取对应的图标, 将每个菜单项中的菜单项名称和对应的图标填充在菜单列表中, 在菜单列 表中, 将每个菜单项内包括的菜单项名称与标识信息进行绑定, 得到如图 3 所示的本地主菜单。 例如, 表 5中的第 3行所示的菜单项包括菜单项名称 为 "写信息"、标识信息为功能 "ID10"和图标 ID为 "ID11 " ,根据图标 ID11 获取对应的图标, 将该菜单项中的菜单项名称为 "写信息" 和获取的图标 填充在菜单列表中, 将该菜单项中的 "写信息" 与功能 "ID10" 进行绑定。 其中, 创建的菜单列表中只有一个空白的表格, 且当每次将某个菜单 项名称填充到该空白的表格后, 自动的为该菜单列表再创建一个空白的表 格, 因此, 菜单列表中会一直存在一个空白的表格。 可替代的, 也可以保 留 2个或多个空白表格。
步骤 204: 根据携带的菜单 ID, 从配置管理器中查找对应的菜单项; 其中, 查找的菜单项中至少包括菜单项名称和标识信息;
其中, 从配置管理器中查找的菜单项都为第三方应用的菜单项。 例如, 根据携带的 ID1, 从如表 2所示的配置管理器中查找对应的菜单项, 其中, 查找的菜单项中包括菜单项名称为 "邮件",标识信息包括应用 ID为 "ID10" 和功能 ID为 "ID101", 而该菜单项为 "邮件系统" 这个第三方应用的菜单 项。
步骤 205: 将获取的菜单项添加到本地主菜单中, 并显示本地主菜单; 具体地, 在本地主菜单的菜单列表中, 分别将获取的菜单项中包括的 菜单名称填充在未被占用的表格中, 在本地主菜单中将获取的菜单项中的 菜单项名称与标识信息进行绑定, 显示本地主菜单。 所述未被占用的表格 就是前述的空白表格。
进一步地, 如果获取的菜单项中还包括图标 ID, 则在安装在手机中的 第三方应用的文件集合中获取对应的图标, 相应地, 将该图标与该菜单项 中的菜单项名称填充在本地主菜单的菜单列表中的未被占用的表格中。
例如, 根据图标 ID为 "ID102", 在安装在手机的第三方应用的文件集 合中, 查找对应的图标, 将该菜单项中的菜单项名称 "邮件" 以及查找的 图标填充在菜单项列表中, 在该菜单列表中将该菜单项中的标识信息与菜 单项名称 "邮件" 进行绑定, 即将应用 "ID10" 和功能 "ID101 " 都绑定在 菜单项名称 "邮件" 上, 得到的本地主菜单如图 4所示。
其中, 在本实施例中, 在手机存储器中划分一个未被占用的空间, 该 空间用于存储第三方应用的菜单项和该菜单项所属本地菜单 ID, 因此, 不 需要通过修改 Android代码,将第三方应用的菜单项和该菜单项所属本地菜 单 ID存储在 Android的数据库中。 当用户需要打开某个本地主菜单时, 先 创建用户需要打开的本地主菜单, 然后直接在该本地主菜单中添加第三方 应用的菜单项, 从而实现将第三方应用的菜单项添加到本地主菜单中。
进一步地, 当用户在显示的本地主菜单中选择某个菜单项时, 将用户 选择的菜单项的背景色替换成特定的背景色。
例如, 可以将如图 4所示的本地主菜单显示给用户。 其中, 当用户在 本地主菜单中选中某一个菜单项时, 该本地主菜单获取绑定在该菜单项中 的菜单项名称上的标识信息, 如果获取的标识信息中只包括功能 ID, 则根 据获取的功能 ID从手机的存储器中查找对应的功能, 即查找实现该功能的 API函数, 然后直接调用查找的功能; 如果获取的标识信息中包括应用 ID 和功能 ID, 则根据应用 ID从手机的存储器中查找对应的应用的文件集合, 并根据功能 ID在查找的文件集合中查找对应的功能, 再调用查找的功能; 如果获取的标识信息中包括二级菜单 ID, 则生成打开菜单的请求, 且该请 求中携带获取的二级菜单 ID, 提交该打开菜单的请求, 然后按如下的步骤 206-208创建并显示该二级菜单, 包括:
步骤 206: 接收打开菜单的请求, 该请求中携带的二级菜单的菜单 ID, 创建携带的二级菜单的 ID对应的本地二级菜单;
具体地, 接收打开菜单的请求, 创建菜单列表, 根据打开菜单的请求 中携带的菜单 ID,从手机的 Android的数据库中的菜单项与菜单 ID的对应 关系中, 获取对应的所有菜单项, 将每个菜单项中包括的菜单项名称填充 在创建的菜单列表中, 在菜单列表中, 将每个菜单项中的菜单项名称和标 识信息进行绑定, 得到本地二级菜单。
进一步地, 如果某个菜单项中还包括图标 ID, 则在手机存储器中, 根 据图标 ID获取对应的图标, 将获取的图标和该菜单项中的菜单项名称一起 填充到创建的菜单列表中。 例如, 在如图 4所示菜单列表中, 当用户选中 "清空邮件" 后, 接收 打开菜单的请求,该打开菜单的请求中携带菜单 ID为 ID18,创建菜单列表, 根据携带的 ID18从 Android的数据库中存储的表 4中, 查找对应的所有菜 单项, 如表 6所示;
表 6
Figure imgf000013_0001
将表 6 中的菜单项名称 "收信箱"、 "发信箱" 和 "草稿箱" 填充到创 建的菜单列表中, 在菜单表列表中, 将 "收信箱" 与 "ID19" 进行绑定, 将 "发信箱" 与 "ID20" 进行绑定以及将 "草稿箱" 与 "ID21 " 进行绑定, 得到的本地二级菜单如图 5所示。 当然,创建二级菜单时也可以如步骤 203 中所述的, 在创建的菜单列表中始终保持至少一个空白表格。
步骤 207: 根据携带的二级菜单的菜单 ID, 从配置管理器中查找对应 的菜单项; 其中, 查找的菜单项至少包括菜单项名称和标识信息;
例如, 根据携带的 ID18, 从如表 2所示的配置管理器中查找对应的菜 单项, 其中, 该菜单项包括菜单项名称为 "DirectMessage", 标识信息包括 功能 ID为 "ID 103" 和应用 ID为 "ID 10"。
步骤 208:将获取的菜单项添加到本地二级菜单中,显示本地二级菜单。 具体地, 将获取的菜单项中包括的菜单名称填充在本地二级菜单的菜 单列表中的未被占用的表格中, 在本地二级菜单中将该菜单项包括的菜单 项名称与标识信息进行绑定, 显示本地二级菜单。
例如, 将获取的菜单项名称 "DirectMessage" 填充在本地二级菜单的 菜单列表中的未被占用的表格中, 在本地二级菜单中将该菜单项的菜单项 名称与功能 ID "ID103"进行绑定, 得到的本地二级菜单如图 6所示, 再显 示如图 6所示的本地二级菜单。
其中, 在本实施例中, 当用户需要打开某个本地二级菜单时, 先创建 用户需要打开的本地二级菜单, 然后直接在该本地二级菜单中添加第三方 应用的菜单项, 从而实现将第三方应用的菜单项添加到本地二级菜单中。
其中, 手机制造商在手机中设置一个 XSD ( XML Schemas Definition, XML结构定义)规格, 在 XSD规格中定义了手机中的每个本地菜单的结 构, 进一步地, 当执行完步骤 201之后且在执行步骤 202之前, 还可以根 据手机中的 XSD规格验证查找的配置文件,如果验证通过,则执行步骤 202, 否则, 操作结束。 例如, 假设在 XSD中定义某个本地菜单不能再添加新的 菜单项, 而查找的配置文件中存在需要添加到该本地菜单的菜单项, 则在 通过 XSD规格来验证查找配置文件时, 得到的结果为验证不通过, 并且操 作结束。
其中, 在本实施例中, 在添加第三方应用的菜单项的过程中, 没有对 手机中的 Android平台中的代码进行修改,所以手机中的每个本地应用没有 被破坏, 当第三方应用需要与本地应用进行交互信息时, 第三方应用首先 将需要交互的信息提交给 Android平台,再由 Android平台接收交互的信息 并将该交互的信息转交给该本地应用。
其中,本实施例提供的方法可以对任何支撑 Android平台的终端设备中 的本地菜单进行添加第三方应用的菜单项。
在本发明实施例中, 将第三方应用的菜单项和该菜单项所属的本地菜 单的 ID存储在配置管理器中, 当创建本地菜单时, 从配置管理器中获取需 要添加到该本地菜单的第三方应用的菜单项, 将获取的菜单项添加到该本 地菜单中。 由于将第三方应用的菜单项和该菜单项所属的本地菜单 ID存储 在配置管理器中,因而不需要再通过修改 Android代码将第三方应用的菜单 项添加到 Android的数据库中;由于将第三方应用的菜单项直接添加到本地 菜单中, 从而实现将第三方应用的菜单项添加到本地菜单中。 实施例 3
如图 7所示,本发明实施例提供了一种在 Android的菜单中添加菜单项 的设备, 包括:
第一创建模块 301, 用于接收打开本地菜单的请求, 该请求中携带菜单 ID, 创建该菜单 ID对应的本地菜单;
获取模块 302, 用于根据该菜单 ID, 在已存储的第三方应用的菜单项 和本地菜单 ID的对应关系中, 获取对应的第三方应用的菜单项;
添加模块 303, 用于将获取的第三方应用的菜单项添加到本地菜单中, 显示添加第三方应用的菜单项的本地菜单。
其中, 获取的第三方应用的菜单项至少包括菜单项名称和标识信息, 相应地,
添加模块 303具体包括:
填充单元, 用于在本地菜单的菜单列表中, 将获取的第三方应用的菜 单项中的菜单项名称填充在菜单列表中未被占用的表格中;
绑定单元, 用于将获取的第三方应用的菜单项中的菜单项名称与标识 信息进行绑定, 其中, 标识信息用于标识功能或二级菜单;
第一显示单元, 用于显示添加第三方应用的菜单项的本地菜单; 其中, 如果获取的第三方应用的菜单项还包括图标 ID, 添加模块 303 还包括:
查找单元,用于在第三方应用的文件集合中查找该图标 ID对应的图标; 相应地,
填充单元, 具体用于将获取的第三方应用的菜单项中的菜单项名称和 查找图标填充在菜单列表中未被占用的表格中;
进一步地, 该设备还包括:
存储模块, 用于从第三方应用的文件集合中查找配置文件, 通过对配 置文件进行解析, 获取第三方应用的菜单项和该菜单项所属本地菜单 ID, 并将第三方应用的菜单项和该菜单项所属本地菜单 ID存储在未被占用的空 间内;
进一步地, 该设备还包括:
验证模块, 用于当存储模块查找到配置文件后, 根据已定义的本地菜 单的结构, 对该配置文件进行验证;
进一步地, 该设备还包括:
第一获取模块, 用于当用户在添加了所述第三方应用的菜单项的本地 菜单中选择菜单项时, 获取绑定在选择的菜单项中的菜单项名称上的标识 信息;
第二获取模块, 用于如果获取的标识信息中包括功能 ID, 则根据该功 能 ID获取对应的功能;
第二创建模块, 用于如果获取的标识信息中包括二级菜单 ID, 则创建 该二级菜单 ID对应的二级菜单;
其中, 第二创建模块具体包括:
创建单元, 用于创建该二级菜单 ID对应的本地二级菜单;
获取单元, 用于根据该二级菜单 ID, 在已存储的第三方应用的菜单项 和本地菜单 ID的对应关系中, 获取对应的第三方应用的菜单项;
添加单元, 用于将第三方应用的菜单项添加到本地二级菜单中; 第二显示单元, 用于显示添加第三方应用的菜单项的本地二级菜单; 其中,该设备可以是安装 Android平台的手机或支撑 Android平台的终 端设备。
在本发明实施例中, 将第三方应用的菜单项和该菜单项所属的本地菜 单的 ID存储在配置管理器中, 当创建本地菜单时, 从配置管理器中获取需 要添加到该本地菜单的第三方应用的菜单项, 将获取的菜单项添加到该本 地菜单中。 由于将第三方应用的菜单项和该菜单项所属的本地菜单 ID存储 在配置管理器中,因而不需要再通过修改 Android代码将第三方应用的菜单 项添加到 Android的数据库中;由于将第三方应用的菜单项直接添加到本地 菜单中, 从而实现将第三方应用的菜单项添加到本地菜单中。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分 步骤是可以通过程序来指令相关硬件完成的, 该程序可以存储于一计算机 可读存储介质中, 存储介质可以包括: ROM、 RAM, 磁盘或光盘等。 以上所述的具体实施方式, 对本发明的目的、 技术方案和有益效果进 行了进一步详细说明, 所应理解的是, 以上所述仅为本发明的具体实施方 式而已, 并不用于限定本发明的保护范围, 凡在本发明的精神和原则之内, 所做的任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。

Claims

权利要求
1、 一种在 Android的菜单中添加菜单项的方法, 其特征在于, 所述方 法包括:
接收打开本地菜单的请求, 所述请求中携带菜单 ID, 创建所述菜单 ID 对应的本地菜单;
根据所述菜单 ID,在已存储的第三方应用的菜单项和本地菜单 ID的对 应关系中, 获取对应的第三方应用的菜单项;
将所述第三方应用的菜单项添加到所述本地菜单中;
显示添加了所述第三方应用的菜单项的本地菜单。
2、 如权利要求 1所述的方法, 其特征在于, 所述第三方应用的菜单项 至少包括菜单项名称和标识信息, 相应地, 所述将所述第三方应用的菜单 项添加到所述本地菜单中, 具体包括:
在所述本地菜单的菜单列表中, 将所述菜单项名称填充在所述菜单列 表中未被占用的表格中;
将所述菜单项的菜单项名称与所述标识信息进行绑定, 其中, 所述标 识信息用于标识功能或二级菜单。
3、 如权利要求 2所述的方法, 其特征在于, 如果所述第三方应用的菜 单项还包括图标 ID, 所述将所述菜单项名称填充在所述菜单列表中未被占 用的表格中之前, 还包括:
在所述第三方应用的文件集合中查找所述图标 ID对应的图标; 相应地, 所述将所述菜单项名称填充在所述菜单列表中未被占用的表 格中, 具体包括:
将所述菜单项名称和所述图标填充在所述菜单列表中未被占用的表格 中。
4、 如权利要求 1所述的方法, 其特征在于, 所述第三方应用的菜单项 和本地菜单 ID的对应关系通过以下方式获得: 从所述第三方应用的文件集合中查找配置文件, 通过对所述配置文件 进行解析, 获取所述第三方应用的菜单项和所述菜单项所属本地菜单 ID, 并将所述第三方应用的菜单项和所述菜单项所属本地菜单 ID存储在未被占 用的空间内。
5、 如权利要求 2所述的方法, 其特征在于, 所述显示添加了所述第三 方应用的菜单项的本地菜单之后, 还包括:
当用户在所述添加了所述第三方应用的菜单项的本地菜单中选择菜单 项时, 获取绑定在所述选择的菜单项中的菜单项名称上的标识信息;
如果所述标识信息中包括功能 ID, 则根据所述功能 ID启动对应的功 fib ,
如果所述标识信息中包括二级菜单 ID,则创建所述二级菜单 ID对应的 二级菜单。
6、 如权利要求 5所述的方法, 其特征在于, 所述创建所述二级菜单 ID 对应的二级菜单, 具体包括:
创建所述二级菜单 ID对应的本地二级菜单;
根据所述二级菜单 ID,在已存储的第三方应用的菜单项和本地菜单 ID 的对应关系中, 获取对应的第三方应用的菜单项;
将所述第三方应用的菜单项添加到所述本地二级菜单中;
显示添加所述第三方应用的菜单项的本地二级菜单。
7、 一种在 Android的菜单中添加菜单项的设备, 其特征在于, 所述设 备包括:
第一创建模块, 用于接收打开本地菜单的请求, 所述请求中携带菜单 ID, 创建所述菜单 ID对应的本地菜单;
获取模块, 用于根据所述菜单 ID, 在已存储的第三方应用的菜单项和 本地菜单 ID的对应关系中, 获取对应的第三方应用的菜单项;
添加模块, 用于将所述第三方应用的菜单项添加到所述本地菜单中, 显示添加了所述第三方应用的菜单项的本地菜单。
8、 如权利要求 7所述的设备, 其特征在于, 所述第三方应用的菜单项 至少包括菜单项名称和标识信息, 相应地, 所述添加模块具体包括:
填充单元, 用于在所述本地菜单的菜单列表中, 将所述菜单项名称填 充在所述菜单列表中未被占用的表格中;
绑定单元, 用于将所述菜单项的菜单项名称与所述标识信息进行绑定, 其中, 所述标识信息用于标识功能或二级菜单;
第一显示单元, 用于显示添加了所述第三方应用的菜单项的本地菜单。
9、 如权利要求 8所述的设备, 其特征在于, 所述添加模块还包括: 查找单元, 用于在所述第三方应用的文件集合中查找所述图标 ID对应 的图标;
相应地,
所述填充单元, 具体用于将所述菜单项名称和所述图标填充在所述菜 单列表中未被占用的表格中。
10、 如权利要求 7所述的设备, 其特征在于, 所述设备还包括: 存储模块, 用于从所述第三方应用的文件集合中查找配置文件, 通过 对所述配置文件进行解析, 获取所述第三方应用的菜单项和所述菜单项所 属本地菜单 ID, 并将所述第三方应用的菜单项和所述菜单项所属本地菜单 ID存储在未被占用的空间内。
11、 如权利要求 7所述的设备, 其特征在于, 所述设备还包括: 第一获取模块, 用于当用户在所述添加了所述第三方应用的菜单项的 本地菜单中选择菜单项时, 获取绑定在所述选择的菜单项中的菜单项名称 上的标识信息;
第二获取模块, 用于如果所述标识信息中包括功能 ID, 则根据所述功 能 ID获取对应的功能;
第二创建模块, 用于如果所述标识信息中包括二级菜单 ID, 则创建所 述二级菜单 ID对应的二级菜单。
12、 如权利要求 11所述的设备, 其特征在于, 所述第二创建模块具体 包括:
创建单元, 用于创建所述二级菜单 ID对应的本地二级菜单; 获取单元, 用于根据所述二级菜单 ID, 在已存储的第三方应用的菜单 项和本地菜单 ID的对应关系中, 获取对应的第三方应用的菜单项;
添加单元, 用于将所述第三方应用的菜单项添加到所述本地二级菜单 中;
第二显示单元, 用于显示添加所述第三方应用的菜单项的本地二级菜 单。
PCT/CN2011/073864 2010-05-14 2011-05-10 一种在android的菜单中添加菜单项的方法及设备 WO2011140968A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
EP11780189.4A EP2570917B1 (en) 2010-05-14 2011-05-10 Method and device for adding menu items in android menu
ES11780189.4T ES2554498T3 (es) 2010-05-14 2011-05-10 Método y dispositivo para añadir elementos de menú en el menú de Android
US13/676,782 US9319508B2 (en) 2010-05-14 2012-11-14 Method and device for adding menu item to android menu
US15/053,400 US9703454B2 (en) 2010-05-14 2016-02-25 Method and device for adding menu item to ANDROID menu

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010176312XA CN101833467B (zh) 2010-05-14 2010-05-14 一种在Android的菜单中添加菜单项的方法及设备
CN201010176312.X 2010-05-14

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US13/676,782 Continuation US9319508B2 (en) 2010-05-14 2012-11-14 Method and device for adding menu item to android menu

Publications (1)

Publication Number Publication Date
WO2011140968A1 true WO2011140968A1 (zh) 2011-11-17

Family

ID=42717547

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/073864 WO2011140968A1 (zh) 2010-05-14 2011-05-10 一种在android的菜单中添加菜单项的方法及设备

Country Status (7)

Country Link
US (2) US9319508B2 (zh)
EP (1) EP2570917B1 (zh)
CN (1) CN101833467B (zh)
DE (1) DE202011110649U1 (zh)
ES (1) ES2554498T3 (zh)
PT (1) PT2570917E (zh)
WO (1) WO2011140968A1 (zh)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101833467B (zh) 2010-05-14 2013-12-04 华为终端有限公司 一种在Android的菜单中添加菜单项的方法及设备
CN101986266B (zh) * 2010-10-22 2013-05-29 浙江大学 Android手机操作系统移植到凌动处理器开发板的方法
CN102253833A (zh) * 2011-06-28 2011-11-23 宇龙计算机通信科技(深圳)有限公司 一种基于安卓Android平台下应用的操作方法及装置
US9189132B2 (en) 2012-09-29 2015-11-17 Oracle International Corporation Dynamic configurable menu using self-describing applications
CN103793875B (zh) * 2014-02-25 2017-11-24 厦门美图之家科技有限公司 一种支持第三方应用的图像处理系统
US10353541B1 (en) * 2015-03-27 2019-07-16 Open Text Corporation Context menu fragment management
JP2017033098A (ja) * 2015-07-29 2017-02-09 富士通テン株式会社 オーディオ装置およびオーディオ装置のメニュー表示方法
US10409792B1 (en) * 2015-09-30 2019-09-10 Groupon, Inc. Apparatus and method for data object generation and control
CN105468381A (zh) * 2016-01-04 2016-04-06 苏州奇松软件有限公司 一种安卓和iOS快速集成第三方类库的系统及操作方法
CN107844345B (zh) * 2016-09-20 2021-01-01 中兴通讯股份有限公司 一种应用菜单的生成方法和装置
US10223135B2 (en) 2016-12-30 2019-03-05 Dropbox, Inc. User interface extender
CN110955431B (zh) * 2018-09-27 2024-02-13 北京国双科技有限公司 编译环境的处理方法及装置
CN109324730A (zh) * 2018-09-30 2019-02-12 努比亚技术有限公司 快捷方式生成方法、终端及计算机可读存储介质
CN109753529A (zh) * 2018-12-24 2019-05-14 青岛海信电器股份有限公司 应用程序设置菜单项的管理方法、系统及智能电视
CN110941839B (zh) * 2019-11-18 2022-10-14 中国经济信息社有限公司 用户权限管理方法和系统、设备及存储介质
CN113392129B (zh) * 2021-06-28 2024-04-12 恒安嘉新(北京)科技股份公司 一种菜单搜索方法、装置、电子设备及存储介质
CN114047863A (zh) * 2022-01-07 2022-02-15 共道网络科技有限公司 一种页面交互方法和装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080153473A1 (en) * 2006-12-21 2008-06-26 Motorola, Inc. Method and apparatus for dynamic menuing of applications in a mobile communication device
US7590430B1 (en) * 2004-11-01 2009-09-15 Sprint Communications Company L.P. Architecture and applications to support device-driven firmware upgrades and configurable menus
CN101833467A (zh) * 2010-05-14 2010-09-15 华为终端有限公司 一种在Android的菜单中添加菜单项的方法及设备

Family Cites Families (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5826051A (en) * 1995-12-27 1998-10-20 Intel Corporation Method and apparatus for simplifying active window selection, application activation, and shared command execution in a multi-application environment
US7831930B2 (en) * 2001-11-20 2010-11-09 Universal Electronics Inc. System and method for displaying a user interface for a remote control application
US7213241B2 (en) 2002-07-02 2007-05-01 Intel Corporation Methods and apparatus for dispatching Java™ software as an application managed by an operating system control manager
CN100499479C (zh) 2003-08-13 2009-06-10 华为技术有限公司 智能网平台中业务管理代理点动态支持多语种的方法
JP4579030B2 (ja) * 2004-06-02 2010-11-10 株式会社リコー 情報処理装置、ファイル処理方法、ファイル処理プログラム及び記録媒体
CN1859474A (zh) * 2005-05-08 2006-11-08 北京博动科技有限公司 一种移动通信终端的动态业务菜单生成方法及系统
US20070028231A1 (en) 2005-08-01 2007-02-01 International Business Machines Corporation System and method for start menu and application uninstall synchronization
KR100738541B1 (ko) 2005-08-30 2007-07-11 삼성전자주식회사 사용자 인터페이스를 위한 동적 메뉴 구성 장치 및 그 방법
CN100492284C (zh) * 2006-01-19 2009-05-27 腾讯科技(深圳)有限公司 一种显示菜单的方法、系统及客户端
SE0700002L (sv) * 2007-01-02 2008-07-03 Hi3G Access Ab Mobiltelefon för användning i ett mobiltelefonnät
CN101080075A (zh) 2007-06-28 2007-11-28 中兴通讯股份有限公司 一种菜单可配置的移动终端及其菜单配置方法
US8880695B2 (en) 2007-11-22 2014-11-04 Sony Corporation Information processing apparatus and information processing method
KR101474561B1 (ko) 2007-11-27 2014-12-19 삼성전자주식회사 이동통신 단말기에서의 어플리케이션 실행방법 및 장치
KR20090065775A (ko) * 2007-12-18 2009-06-23 삼성전자주식회사 응용프로그램의 기능을 구성하고 실행하는 방법 및 이를위한 휴대 단말기
CN101222710A (zh) * 2008-01-31 2008-07-16 中兴通讯股份有限公司 一种移动终端上实现菜单动态配置的系统及方法
CN101246424A (zh) * 2008-02-22 2008-08-20 深圳国人通信有限公司 一种基于文件的菜单自动生成系统和方法
CN101557431A (zh) 2008-04-07 2009-10-14 三星电子株式会社 在移动通信终端中生成菜单的方法
CN101661367A (zh) * 2008-08-25 2010-03-03 扬智科技股份有限公司 菜单快捷方式的生成方法及使用者接口装置
CN101699396A (zh) 2009-10-21 2010-04-28 厦门敏讯信息技术股份有限公司 一种无线终端菜单的生成方法及其装置
US8126903B2 (en) * 2009-12-21 2012-02-28 Sap Ag Computer implemented method for allocating drivers and passengers sharing a trip

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7590430B1 (en) * 2004-11-01 2009-09-15 Sprint Communications Company L.P. Architecture and applications to support device-driven firmware upgrades and configurable menus
US20080153473A1 (en) * 2006-12-21 2008-06-26 Motorola, Inc. Method and apparatus for dynamic menuing of applications in a mobile communication device
CN101833467A (zh) * 2010-05-14 2010-09-15 华为终端有限公司 一种在Android的菜单中添加菜单项的方法及设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2570917A4 *

Also Published As

Publication number Publication date
EP2570917A1 (en) 2013-03-20
US9319508B2 (en) 2016-04-19
ES2554498T3 (es) 2015-12-21
EP2570917A4 (en) 2013-08-07
EP2570917B1 (en) 2015-09-09
CN101833467A (zh) 2010-09-15
US20130074010A1 (en) 2013-03-21
PT2570917E (pt) 2015-12-16
US9703454B2 (en) 2017-07-11
DE202011110649U1 (de) 2015-09-02
CN101833467B (zh) 2013-12-04
US20160170588A1 (en) 2016-06-16

Similar Documents

Publication Publication Date Title
WO2011140968A1 (zh) 一种在android的菜单中添加菜单项的方法及设备
US10194288B2 (en) Sticker distribution system for messaging apps
US10554599B2 (en) Conversion of detected URL in text message
US20220191653A1 (en) Layers in messaging applications
CN113747376B (zh) 消息扩展应用程序商店
CN110019081B (zh) 数据持久化处理方法、装置、系统及可读存储介质
JP6062987B2 (ja) ネットワークストレージ管理システム
US10088980B2 (en) Method and system for providing menu data for mobile applications
EP3335411B1 (en) Electronic device and method of managing application programs thereof
US20170359283A1 (en) Music creation app in messaging app
US20130227085A1 (en) Terminal and method for using cloud services
EP2993603B1 (en) Permission determining method and device for application program
US20130226975A1 (en) Method for file management and mobile device using the same
US9471896B2 (en) Memo synchronization system, mobile system, and method for synchronizing memo data
TW201439792A (zh) 資料庫訪問系統及方法
US20150381714A1 (en) Application registration and interaction
US20140304285A1 (en) Terminal and method for managing files associated with an application
US20240126739A1 (en) Method and apparatus for processing table of document, and device and medium
US20090150795A1 (en) Object model and user interface for reusable map web part
WO2023077932A1 (zh) 一种自动注册楼层化代码方法及装置、存储介质
JP2013542542A (ja) アプリケーションのファイルシステムアクセス
US9529900B2 (en) Visual interface browser
CN112527289A (zh) 一种基于Golang以及Mongodb的动态表单系统
US20130239027A1 (en) Apparatus and method for generating wiki previews
TW201342233A (zh) 手機內外資源統一管理方法及系統

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11780189

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2011780189

Country of ref document: EP