WO2017181537A1 - 一种处理通知消息的方法和装置 - Google Patents

一种处理通知消息的方法和装置 Download PDF

Info

Publication number
WO2017181537A1
WO2017181537A1 PCT/CN2016/089447 CN2016089447W WO2017181537A1 WO 2017181537 A1 WO2017181537 A1 WO 2017181537A1 CN 2016089447 W CN2016089447 W CN 2016089447W WO 2017181537 A1 WO2017181537 A1 WO 2017181537A1
Authority
WO
WIPO (PCT)
Prior art keywords
notification message
notification
terminal
interface
application
Prior art date
Application number
PCT/CN2016/089447
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 中兴通讯股份有限公司
Publication of WO2017181537A1 publication Critical patent/WO2017181537A1/zh

Links

Images

Classifications

    • 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/46Multiprogramming arrangements
    • 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/46Multiprogramming arrangements
    • G06F9/466Transaction processing

Definitions

  • This document relates to, but is not limited to, information processing technology, and more particularly to a method and apparatus for processing a notification message.
  • terminals such as smart phones and tablet computers
  • the role of terminal devices in people's daily lives is becoming more and more important.
  • the current terminal system for example, the Android system, provides the function of clearing the notification message, but many application notification messages are set with the feature that cannot be removed, and the terminal's system cannot remove the notification messages of these applications. How to effectively clean up the application's notification message becomes a technical problem that needs to be solved.
  • Embodiments of the present invention provide a method and apparatus for processing a notification message, which can effectively process a notification message received by a terminal.
  • An embodiment of the present invention provides a method for processing a notification message, including:
  • the interface for disabling the notification authority in the system framework of the terminal is invoked to disable the notification permission of the application corresponding to the first notification message, according to the obtained package name of the application corresponding to the first notification message.
  • the first notification message is eliminated from the terminal.
  • the method further includes: determining, before the interface for disabling the notification authority in the system framework of the terminal, whether the package name of the application corresponding to the first notification message is recorded in a preset whitelist And, when the package name of the application corresponding to the first notification message is not recorded in the preset whitelist, generate a trigger message that triggers execution of an interface for disabling the notification authority in the system framework that invokes the terminal.
  • the method further includes: determining an application selected by the user according to the received external instruction, and recording the determined package name of the application selected by the user in the white list.
  • the method further includes: after the first notification message is cleared, calling an interface for disabling the notification authority in the system framework of the terminal, and restoring the notification permission of the application corresponding to the first notification message .
  • the method further includes: determining, according to an attribute of the obtained notification message, a notification message having a removable attribute, a second notification message, and calling an interface for removing the notification message in a system framework of the terminal. To remove the second notification message from the terminal.
  • the embodiment of the invention further provides an apparatus for processing a notification message, comprising: an attribute obtaining module, configured to acquire an attribute of one or more notification messages received by the terminal;
  • a package name obtaining module configured to determine, according to an attribute of the obtained notification message, a notification message having a non-removable attribute as a first notification message, and obtain a package name of the application corresponding to the first notification message;
  • the interface calling module is configured to invoke an interface for disabling the notification authority in the system framework of the terminal according to the obtained package name of the application corresponding to the first notification message, to disable the application corresponding to the first notification message
  • the notification authority removes the first notification message from the terminal.
  • the device further includes a determining module:
  • the determining module is configured to: determine whether the package name of the application corresponding to the first notification message is recorded in a preset whitelist, and when the package name of the application corresponding to the first notification message is not recorded in the preset whitelist Sending a trigger message to the interface calling module;
  • the interface calling module is configured to, according to the obtained package name of the application corresponding to the first notification message, invoke an interface for disabling the notification permission in the system framework of the terminal according to the received trigger message, to disable the Notifying the notification right of the application corresponding to the first notification message, the first pass Knowing the message is eliminated from the terminal.
  • the device further includes: a whitelist module, configured to determine an application selected by the user according to the received external instruction, and record the determined package name of the application selected by the user in the whitelist.
  • a whitelist module configured to determine an application selected by the user according to the received external instruction, and record the determined package name of the application selected by the user in the whitelist.
  • the interface calling module is further configured to: after the first notification message is cleared, invoke an interface for disabling the notification authority in the system framework of the terminal, and restore the corresponding corresponding to the first notification message. Notification permissions for the app.
  • the interface invoking module is further configured to: determine, according to an attribute of the obtained notification message, a notification message having a removable attribute to determine a second notification message, and invoke a notification for removing the notification in a system framework of the terminal. An interface of the message to remove the second notification message from the terminal.
  • the method and apparatus for processing a notification message include: determining, according to an attribute of the obtained notification message, a notification message having a non-removable attribute as a first notification message, and acquiring a first notification message
  • the package name of the corresponding application the interface for disabling the notification authority in the system framework of the terminal is invoked according to the package name of the application corresponding to the obtained first notification message, to disable the notification permission of the application corresponding to the first notification message, The first notification message is eliminated from the terminal.
  • the notification permission of the corresponding application is disabled by calling the interface of the terminal system framework, and when the notification permission of the application is disabled, the corresponding notification is The message is also cleared from the terminal, which prevents the user from being disturbed and occupies the resources of the terminal when receiving the unnecessary notification message, thereby improving the user experience.
  • FIG. 1 is a flow chart of a method of processing a notification message in accordance with one embodiment of the present invention
  • FIG. 2 is a flow chart of a method of processing a notification message in accordance with one embodiment of the present invention
  • FIG. 3 is a flow chart of a method of processing a notification message in accordance with one embodiment of the present invention.
  • FIG. 4 is a block diagram of an apparatus for processing a notification message in accordance with one embodiment of the present invention.
  • FIG. 5 is a block diagram of an apparatus for processing a notification message in accordance with one embodiment of the present invention.
  • a first embodiment of the present invention provides a method for processing a notification message, including:
  • Step 110 Acquire an attribute of one or more notification messages received by the terminal.
  • the notification message has different attributes, including: may be removed from the terminal in response to the user removal instruction, or remain in the terminal in response to the user removal instruction.
  • the implementation terminal of the present invention may include a mobile terminal such as a mobile phone or a tablet.
  • multiple notification messages may include two or more notification messages.
  • Step 120 Determine, according to the attribute of the obtained notification message, a notification message having a non-removable attribute as the first notification message, and obtain a package name of the application corresponding to the first notification message.
  • the terminal traverses all the notification messages to obtain the attributes thereof; based on the current system user interface (SystemUI) technology, the attribute information may be acquired; if the notification message has non-removable attributes, Then record the package name of the application; finally, a list of package names of the application that currently has the non-removable attribute notification message can be obtained, and the package name list can uniformly record the package names of multiple applications.
  • SystemUI system user interface
  • step 130 the interface for disabling the notification authority in the system framework of the terminal is invoked to disable the notification permission of the application corresponding to the first notification message according to the package name of the application corresponding to the obtained first notification message, and the first notification message is sent.
  • the broadcast is transmitted in an agreed manner with the terminal system framework by traversing the aforementioned package name list (for a system such as Android, broadcast is one of the standard ways of inter-process communication).
  • the broadcast will carry the package name of the application and the flag to enable or disable the notification permission (here the flag indicates that the notification permission is disabled); after receiving the broadcast, the system frame side of the terminal parses the application package name and enables the disable flag from the broadcast.
  • the application notification authority is generally not directly accessible to the application, so in the embodiment, the application notification authority is disabled or enabled by a communication with the framework.
  • disabling or enabling the notification authority may notify the framework to enable or disable the permission by setting a system standard notification manner (for example, broadcast).
  • broadcast a system standard notification manner
  • a communication party can be agreed through the application side and the frame side
  • the method is initiated by the application side.
  • the framework After receiving the broadcast, the framework obtains the information of the application according to the keywords in the broadcast, and determines whether the notification authority is enabled or disabled according to the application side information, and performs corresponding processing.
  • An application scenario of the embodiment of the present invention is as follows: The user's mobile phone currently receives 8 notification messages, and 3 of them are notification messages of non-removable attributes. According to the related technical solution, after the user performs the removal instruction, 5 pieces are removed from the mobile phone, and the other 3 pieces can be cleared unless the user manually disables the corresponding application notification message. Manually disabling the notification permission process of the application is cumbersome. The user may not know it at first, and the second one will not operate. Thirdly, even if it is going to operate, if the number of non-removable notifications is large, it needs to be operated one by one. trouble.
  • the user may trigger the processing flow of the embodiment by long pressing or double-clicking a preset button when the notification message needs to be processed, or triggering the processing by additionally adding a button on the graphic interface.
  • Notification message the button can be implemented by adding a new user interaction (UI) item or an additional UI interface.
  • UI user interaction
  • the attribute of the notification message is determined one by one, and if it is a notification message of the removable attribute, the disable notification can be directly called.
  • the permission interface clears the notification message.
  • the package name of the application of the current notification message can be obtained, and the broadcast system is used to call the mobile phone system framework to disable the notification permission of the corresponding application, and can also record The package name of the application under is ready to be enabled again later.
  • the notification authority is disabled, the notifications are automatically deleted. It can be seen that the technical solution of the embodiment is based on the automatic disabling of the notification authority of the application, so that the processing of the notification message is more effective, and the notification message of the non-removable attribute is avoided. The situation that cannot be removed reduces the interference of the notification message to the user and the occupation of the mobile phone resources.
  • a second embodiment of the present invention provides a method for processing a notification message, including:
  • Step 210 Determine an application selected by the user according to the received external command, and record the determined package name of the application selected by the user in the white list.
  • the form of providing the user to select the application is not limited.
  • the method may be: providing a graphical interface, the graphical interface supports the user to select the corresponding application to be whitelisted, and all notification messages of the application on the whitelist are not Will be cleared.
  • Step 220 Acquire an attribute of one or more notification messages received by the terminal.
  • Step 230 Determine, according to an attribute of the obtained notification message, a notification message having a non-removable attribute as a first notification message, and obtain a package name of the application corresponding to the first notification message.
  • Step 240 Determine whether the package name of the application corresponding to the first notification message is recorded in a preset white list.
  • step 250 when the package name of the application corresponding to the first notification message is not recorded in the preset white list, according to the package name of the application corresponding to the first notification message, the system frame of the terminal is used to disable the notification permission.
  • the interface cancels the first notification message from the terminal by disabling the notification permission of the application corresponding to the first notification message.
  • the user can add important applications to the whitelist, so as to avoid clearing the notification message of the application.
  • a trigger message may be generated when the package name of the application corresponding to the first notification message is not recorded in the preset whitelist, and the interface for disabling the notification authority in the system framework that invokes the terminal is triggered to be executed.
  • Step 260 After the first notification message is cleared, the interface for disabling the notification authority in the system framework of the terminal is invoked, and the notification permission of the application corresponding to the first notification message is restored.
  • the application package name may be traversed for a period of time (for example, 200 ms or not), and then the system interface of the mobile phone is sequentially invoked, and the application package name is transmitted to enable the notification permission of the application.
  • the technical solution of the example is to ensure that the user does not ignore the important notification message in order to avoid the subsequent notification of the application, so that the notification permission of the application needs to be restored.
  • a third embodiment of the present invention provides a method for processing a notification message, including:
  • Step 310 Acquire an attribute of one or more notification messages received by the terminal.
  • Step 320 Determine, according to the attribute of the obtained notification message, a notification message having a non-removable attribute as a first notification message, and obtain a package name of the application corresponding to the first notification message.
  • Step 330 Invoking an interface for disabling the notification authority in the system framework of the terminal according to the package name of the application corresponding to the first notification message, to disable the notification permission of the application corresponding to the first notification message, and using the first notification message from the terminal Eliminated on.
  • Step 340 according to the attribute of the obtained notification message, a notification message with a removable attribute
  • the second notification message is determined, and an interface for removing the notification message in the system framework of the terminal is invoked to remove the second notification message from the terminal.
  • the interface for removing the notification message of the terminal system framework can be directly called to perform the cleaning of the notification message, and in this way, the notification message is cleared more quickly and efficiently.
  • the method of the foregoing embodiment of the present invention may be implemented by using a mobile terminal such as a mobile phone or a tablet, or may be implemented by using an independent device to communicate with the terminal.
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the method for processing the notification message.
  • a fourth embodiment of the present invention provides an apparatus for processing a notification message, including:
  • the attribute obtaining module 410 is configured to acquire an attribute of one or more notification messages received by the terminal.
  • the notification message has different attributes, including: may be removed from the terminal in response to the user removal instruction, or remain in the terminal in response to the user removal instruction.
  • the implementation terminal of the present invention may include a mobile terminal such as a mobile phone or a tablet.
  • multiple notification messages may include two or more notification messages.
  • the package name obtaining module 420 is configured to determine, according to an attribute of the obtained notification message, a notification message having a non-removable attribute as a first notification message, and obtain a package name of the application corresponding to the first notification message;
  • the terminal after the terminal receives the notification message, it traverses all the notification messages to obtain its attributes; the information may be obtained based on the current SystemUI technology; if the notification message has a non-removable attribute, the package of the application is recorded. Name; finally get a list of package names of the application that currently has a non-removable attribute notification message, and the package name list can uniformly record the package names of multiple applications.
  • the interface invoking module 430 is configured to: according to the package name of the application corresponding to the obtained first notification message, invoke an interface for disabling the notification permission in the system framework of the terminal, to disable the notification permission of the application corresponding to the first notification message,
  • the first notification message is removed from the terminal.
  • the broadcast is transmitted in an agreed manner with the terminal system framework by traversing the aforementioned package name list (for a system such as Android, broadcast is one of the standard ways of inter-process communication).
  • the system framework side of the terminal parses the application's package name and enables the disable flag from the broadcast, and then invokes An interface in the terminal system framework for disabling notification permissions to disable notification permissions for the app. Once the notification permission of the application is disabled, the application notification message will be automatically deleted.
  • the application notification authority is generally not directly accessible to the application, so in the embodiment, the application notification authority is disabled or enabled by a communication with the framework.
  • An application scenario of the embodiment of the present invention is as follows: The user's mobile phone currently receives 8 notification messages, and 3 of them are notification messages of non-removable attributes. According to the related technical solution, after the user performs the removal instruction, 5 pieces are removed from the mobile phone, and the other 3 pieces can be cleared unless the user manually disables the corresponding application notification message. Manually disabling the notification permission process of the application is cumbersome. The user may not know it at first, and the second one will not operate. Thirdly, even if it is going to operate, if the number of non-removable notifications is large, it needs to be operated one by one. trouble.
  • the user may trigger the processing flow of the embodiment by long pressing or double-clicking a preset button when the notification message needs to be processed, or triggering the processing by additionally adding a button on the graphic interface.
  • the notification message when the user triggers, determines the attribute of the notification message item by item. If it is the notification message of the removable attribute, the interface that disables the notification authority can be directly called to clear the notification message, if it is a notification message of the non-removable attribute. Then, the package name of the application of the current notification message can be obtained, the broadcast is sent to invoke the mobile phone system framework to disable the notification permission of the corresponding application, and the package name of the application can be recorded for later re-enabling.
  • the notifications are automatically deleted. It can be seen that the technical solution of the embodiment is based on the automatic disabling of the notification authority of the application, so that the processing of the notification message is more effective, and the notification message of the non-removable attribute is avoided. The situation that cannot be removed reduces the interference of the notification message to the user and the occupation of the mobile phone resources.
  • a fifth embodiment of the present invention provides an apparatus for processing a notification message, including:
  • the whitelist module 510 is configured to determine an application selected by the user according to the received external command, and record the determined package name of the application selected by the user in the white list.
  • the form of providing the user to select the application is not limited.
  • the method may be: providing a graphical interface, and the graphical interface supports the user to select the corresponding application to be whitelisted, and all notification messages of the application on the whitelist. Will not be cleared.
  • the attribute obtaining module 520 is configured to acquire an attribute of one or more notification messages received by the terminal;
  • the package name obtaining module 530 is configured to determine, according to an attribute of the obtained notification message, a notification message having a non-removable attribute as a first notification message, and obtain a package name of the application corresponding to the first notification message;
  • the determining module 540 is configured to determine whether the package name of the application corresponding to the first notification message is recorded in the preset whitelist, and when the package name of the application corresponding to the first notification message is not recorded in the preset whitelist, Send a trigger message to the interface call module;
  • the interface invoking module 550 is configured to, according to the package name of the application corresponding to the acquired first notification message, invoke an interface for disabling the notification authority in the system framework of the terminal according to the received trigger message, to disable the corresponding corresponding to the first notification message.
  • the notification permission of the application removes the first notification message from the terminal.
  • the user can add important applications to the whitelist, so as to avoid clearing the notification message of the application.
  • the interface invoking module 550 is further configured to: after the first notification message is cleared, the interface for disabling the notification authority in the system framework of the relationship terminal restores the notification authority of the application corresponding to the first notification message.
  • the application may be delayed for a period of time (for example, 200 milliseconds (ms) or not), and then the application name of the mobile phone is sequentially invoked, and the application package name is transmitted to enable the notification permission of the application.
  • the technical solution of the embodiment is to ensure that the user does not ignore the important notification message in order to avoid the subsequent notification of the application, so that the notification permission of the application needs to be restored.
  • a sixth embodiment of the present invention provides an apparatus for processing a notification message, including:
  • the attribute obtaining module 410 is configured to acquire an attribute of one or more notification messages received by the terminal.
  • the package name obtaining module 420 is configured to determine, according to an attribute of the obtained notification message, a notification message having a non-removable attribute as a first notification message, and obtain a package name of the application corresponding to the first notification message;
  • the interface invoking module 430 is configured to invoke an interface for disabling the notification authority in the system framework of the terminal according to the package name of the application corresponding to the obtained first notification message, to disable the first notification message pair.
  • the notification permission of the application should be removed from the terminal.
  • the interface invoking module 430 is further configured to: determine, according to an attribute of the obtained notification message, a second notification message by using a notification message having a removable attribute, and invoke an interface for removing the notification message in a system framework of the terminal to The second notification message is removed from the terminal.
  • the interface for removing the notification message of the terminal system framework can be directly called to perform the cleaning of the notification message, and in this way, the notification message is cleared more quickly and efficiently.
  • each module/unit in the foregoing embodiment may be implemented in the form of hardware, for example, by implementing an integrated circuit to implement its corresponding function, or may be implemented in the form of a software function module, for example, being executed by a processor and stored in a memory. Programs/instructions to implement their respective functions.
  • the invention is not limited to any specific form of combination of hardware and software.
  • the foregoing technical solution avoids the interference of the user receiving the unnecessary notification message, improves the user experience, and avoids that the notification message that is difficult to be removed occupies the resource of the terminal.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

一种处理通知消息的方法和装置,包括:获取终端接收的一个或多个通知消息的属性(110);根据获取的通知消息的属性,将具有不可移除属性的通知消息确定为第一通知消息,并获取第一通知消息对应的应用的包名(120);根据获取的第一通知消息对应的应用的包名,调用终端的系统框架中的用于禁用通知权限的接口,以禁用第一通知消息对应的应用的通知权限,将第一通知消息从所述终端上消除(130)。对于终端接收的难以被移除的通知消息,通过调用终端系统框架的接口,来禁用相应应用的通知权限,从而使得终端的用户免于收到不必要的通知消息的干扰,提升了用户使用体验,避免了难以被移除的通知消息占用终端的资源。

Description

一种处理通知消息的方法和装置 技术领域
本文涉及但不限于信息处理技术,尤其涉及一种处理通知消息的方法和装置。
背景技术
目前,随着智能手机、平板电脑等终端的应用功能越来越丰富,终端设备在人们的日常生活中扮演的角色越来越重要。
但是,终端上应用增多的同时,应用的通知消息泛滥给用户带来了很大的困扰,很多通知消息的内容对用户毫无作用,反而会对终端系统的资源造成极大的浪费。
当前终端的系统,例如,安卓(Android)系统,提供了清理通知消息的功能,但是很多应用的通知消息被设置了无法移除的特性,造成终端的系统无法移除这些应用的通知消息。如何有效清理应用的通知消息,成为一个需要解决的技术问题。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本发明实施例提供一种处理通知消息的方法和装置,能够有效的处理终端接收的通知消息。
本发明实施例提供一种处理通知消息的方法,包括:
获取终端接收的一个或多个通知消息的属性;根据获取的通知消息的属性,将具有不可移除属性的通知消息确定为第一通知消息,并获取所述第一通知消息对应的应用的包名;
根据获取的所述第一通知消息对应的应用的包名,调用所述终端的系统框架中的用于禁用通知权限的接口,以禁用所述第一通知消息对应的应用的通知权限,将所述第一通知消息从所述终端上消除。
可选地,所述方法还包括:在调用所述终端的系统框架中的用于禁用通知权限的接口之前,判断所述第一通知消息对应的应用的包名是否记录在预设的白名单中,并在第一通知消息对应的应用的包名未记录在预设的白名单中时,生成触发执行调用所述终端的系统框架中的用于禁用通知权限的接口的触发消息。
可选地,所述方法还包括:根据接收的外部指令确定用户选择的应用,并将确定的所述用户选择的应用的包名记录在所述白名单内。
可选地,所述方法还包括:所述第一通知消息被清除后,调用所述终端的系统框架中的用于禁用通知权限的接口,恢复所述第一通知消息对应的应用的通知权限。
可选地,所述方法还包括:根据获取的通知消息的属性,将具有可移除属性的通知消息确定第二通知消息,调用所述终端的系统框架中的用于移除通知消息的接口,以从所述终端中移除所述第二通知消息。
本发明实施例还提供一种处理通知消息的装置,包括:属性获取模块,设置为获取终端接收的一个或多个通知消息的属性;
包名获取模块,设置为根据获取的通知消息的属性,将具有不可移除属性的通知消息确定为第一通知消息,并获取所述第一通知消息对应的应用的包名;
接口调用模块,设置为根据获取的所述第一通知消息对应的应用的包名,调用所述终端的系统框架中的用于禁用通知权限的接口,以禁用所述第一通知消息对应的应用的通知权限,将所述第一通知消息从所述终端上消除。
可选地,所述装置还包括判断模块:
判断模块设置为,判断所述第一通知消息对应的应用的包名是否记录在预设的白名单中,并在第一通知消息对应的应用的包名未记录在预设的白名单中时,发送触发消息到所述接口调用模块;
所述接口调用模块是设置为,根据获取的所述第一通知消息对应的应用的包名,根据接收的触发消息调用所述终端的系统框架中的用于禁用通知权限的接口,以禁用所述第一通知消息对应的应用的通知权限,将所述第一通 知消息从所述终端上消除。
可选地,所述装置还包括:白名单模块,设置为根据接收的外部指令确定用户选择的应用,并将确定的所述用户选择的应用的包名记录在所述白名单内。
可选地,所述接口调用模块还设置为,在所述第一通知消息被清除后,调用所述终端的系统框架中的用于禁用通知权限的接口,恢复所述第一通知消息对应的应用的通知权限。
可选地,所述接口调用模块还设置为:根据获取的通知消息的属性,将具有可移除属性的通知消息确定第二通知消息,调用所述终端的系统框架中的用于移除通知消息的接口,以从所述终端中移除所述第二通知消息。
根据以上技术方案,可知本发明实施例的处理通知消息的方法和装置包括:根据获取的通知消息的属性,将具有不可移除属性的通知消息确定为第一通知消息,并获取第一通知消息对应的应用的包名;根据获取的第一通知消息对应的应用的包名,调用终端的系统框架中的用于禁用通知权限的接口,以禁用第一通知消息对应的应用的通知权限,将第一通知消息从所述终端上消除。根据本发明实施例的技术方案,对于终端接收的难以被移除的通知消息,通过调用终端系统框架的接口来禁用相应应用的通知权限,当该应用的通知权限被禁用时,其对应的通知消息也会被从终端上清除,避免了用户收到不必要的通知消息时受到干扰和占用终端的资源,提升了用户的使用体验。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图概述
图1为根据本发明的一个实施例的处理通知消息的方法的流程图;
图2为根据本发明的一个实施例的处理通知消息的方法的流程图;
图3为根据本发明的一个实施例的处理通知消息的方法的流程图;
图4为根据本发明的一个实施例的处理通知消息的装置的框图;
图5为根据本发明的一个实施例的处理通知消息的装置的框图。
本发明的实施方式
下文中将结合附图对本申请的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。
如图1所示,本发明第一实施例提出一种处理通知消息的方法,包括:
步骤110,获取终端接收的一个或多个通知消息的属性;
在本实施例中,本领域的技术人员应当理解,通知消息具有不同的属性,包括:可以响应用户移除指令从终端中移除,或不响应用户移除指令仍然保持在终端中。本发明实施终端可以包括手机、平板等移动终端。
需要说明的是,多个通知消息可以包括两个或两个以上通知消息。
步骤120,根据获取的通知消息的属性,将具有不可移除属性的通知消息确定为第一通知消息,并获取第一通知消息对应的应用的包名。
在本实施例中,在终端接收到通知消息后,遍历所有通知消息,获取其属性;基于目前的系统用户界面(SystemUI)技术,可以获取属性信息;如果该条通知消息具有不可移除属性,则记录该应用的包名;最终可以得到一个当前具有不可移除属性通知消息的应用的包名列表,包名列表可以统一记录多个应用的包名。
步骤130,根据获取的第一通知消息对应的应用的包名,调用终端的系统框架中的用于禁用通知权限的接口,以禁用第一通知消息对应的应用的通知权限,将第一通知消息从终端上消除。在本实施例中,通过遍历前述的包名列表,通过和终端系统框架以约定的方式发送广播(对于Android等系统,广播是一种进程间通信的标准方式之一)。广播中会携带应用的包名以及是启用还是禁用通知权限的标志(此处该标志指示禁用通知权限);终端的系统框架侧收到广播后,从广播中解析出应用的包名和启用禁用标志,然后调用终端系统框架中的用于禁用通知权限的接口来禁用该应用的通知权限。一旦应用的通知权限被禁用,该应用通知消息会被自动删除。本领域技术人员应当理解,应用通知的权限一般应用是无法直接访问的,所以在本实施例中,通过和框架约定一种通信的方式来禁用或启用应用通知权限。本发明实施例,禁用或启用通知权限可以通过设定系统标准的通知方式(例如、广播)来通知框架来进行权限的启用或禁用。可以通过应用侧和框架侧约定一种通信方 式,由应用侧发起,框架收到广播后根据广播中的关键字来获取应用的信息,并根据应用侧信息确定是启用还是禁用通知权限,并执行相应处理。
本发明实施例的一个应用场景如下:用户的手机当前接收了8个通知消息,其中3条是不可移除属性的通知消息。根据相关技术方案,用户执行移除指令后会从手机中移除掉5条,另外3条除非用户手动禁用对应应用通知消息才可清除。手动禁用该应用的通知权限过程较为繁琐,用户一来可能不知道,二来也不会去操作,三来即使会去操作如果不可移除的通知数较多也需要一个个去操作,太过麻烦。本发明实施例的技术方案,用户可以在需要处理通知消息时,可通过长按或双击预设的按钮来触发本实施例的处理流程,也可以通过在图形界面上额外添加一个按钮来触发处理通知消息,按钮可以通过新增用户交互(UI)项或额外增加UI界面实现,当用户进行触发后,逐条判断通知消息的属性,如果是可移除属性的通知消息,那么可以直接调用禁用通知权限的接口进行通知消息的清除,如果是不可移除属性的通知消息,那么可以获取当前通知消息的应用的包名,发送广播来调用手机系统框架,以禁用对应应用的通知权限,同时可以记录下应用的包名以备后面再次启用。通知权限一旦被禁止,这些通知自动就会删除,可见在本实施例的技术方案,基于对应用的通知权限的自动禁用,使得对通知消息的处理更加有效,避免产生不可移除属性的通知消息无法被移除的情况,减少了通知消息对用户干扰以及对手机资源的占用。
如图2所示,本发明第二实施例提出一种处理通知消息的方法,包括:
步骤210,根据接收的外部指令确定用户选择的应用,并将确定的用户选择的应用的包名记录在白名单内。在本实施例中,对提供用户选择应用的形式不进行限制,例如可以是:提供一个图形界面,该图形界面支持用户选择将对应的应用加入白名单,白名单上的应用的所有通知消息不会被清除。
步骤220,获取终端接收的一个或多个通知消息的属性。
步骤230,根据获取的通知消息的属性,将具有不可移除属性的通知消息确定为第一通知消息,并获取第一通知消息对应的应用的包名。
步骤240,判断第一通知消息对应的应用的包名是否记录在预设的白名单中。
步骤250,在第一通知消息对应的应用的包名未记录在预设的白名单中时,根据第一通知消息对应的应用的包名,调用终端的系统框架中的用于禁用通知权限的接口,以禁用第一通知消息对应的应用的通知权限,将第一通知消息从终端上消除。在本实施例中,利用白名单的设计,用户可以将重要的应用加入白名单中,以免清理了该应用的通知消息。
本发明实施例,可以在第一通知消息对应的应用的包名未记录在预设的白名单中时生成触发消息,触发执行调用所述终端的系统框架中的用于禁用通知权限的接口。
步骤260,在第一通知消息被清除后,调用终端的系统框架中的用于禁用通知权限的接口,恢复第一通知消息对应的应用的通知权限。在本实施例中,可以延时一段时间(比如200ms,也可不延时)后再遍历应用的包名,依次调用手机的系统接口,传递应用的包名来启用该应用的通知权限,本实施例的技术方案作用在于,为避免应用后续会发出较重要的通知消息,保证用户不会忽略掉重要通知消息,所以需要恢复该应用的通知权限。
需要说明的是,调用终端的系统框架中的用于禁用通知权限的接口时,可以通过调用接口时设置不同的参数确定是禁用还是使用第一通知消息对应的应用的通知权限。
如图3所示,本发明第三实施例提出一种处理通知消息的方法,包括:
步骤310,获取终端接收的一个或多个通知消息的属性。
步骤320,根据获取的通知消息的属性,将具有不可移除属性的通知消息确定为第一通知消息,并获取第一通知消息对应的应用的包名。
步骤330,根据第一通知消息对应的应用的包名,调用终端的系统框架中的用于禁用通知权限的接口,以禁用第一通知消息对应的应用的通知权限,将第一通知消息从终端上消除。
步骤340,根据获取的通知消息的属性,将具有可移除属性的通知消息 确定为第二通知消息,并调用终端的系统框架中的用于移除通知消息的接口,以从终端中移除第二通知消息。在本实施例中,对于可移除属性的第二通知消息,可以直接调用终端系统框架的用于移除通知消息的接口来进行通知消息的清理,通过这种方式清理通知消息更加快速高效。
需要说明的是,本发明上述实施例方法可以通过手机、平板等移动终端实施,也可以采用独立的装置与终端连接通信后实施。
本发明实施例还提供一种计算机存储介质,计算机存储介质中存储有计算机可执行指令,计算机可执行指令用于执行上述的处理通知消息的方法。
如图4所示,本发明第四实施例提出一种处理通知消息的装置,包括:
属性获取模块410,设置为获取终端接收的一个或多个通知消息的属性。在本实施例中,本领域的技术人员应当理解,通知消息具有不同的属性,包括:可以响应用户移除指令从终端中移除,或不响应用户移除指令仍然保持在终端中。本发明实施终端可以包括手机、平板等移动终端。
需要说明的是,多个通知消息可以包括两个或两个以上通知消息。
包名获取模块420,设置为根据获取的通知消息的属性,将具有不可移除属性的通知消息确定为第一通知消息,并获取第一通知消息对应的应用的包名;
在本实施例中,在终端接收到通知消息后,遍历所有通知消息,获取其属性;可以基于目前的SystemUI技术获取这些信息;如果该条通知消息具有不可移除属性,则记录该应用的包名;最终可以得到一个当前具有不可移除属性通知消息的应用的包名列表,包名列表可以统一记录多个应用的包名。
接口调用模块430,设置为根据获取的第一通知消息对应的应用的包名,调用终端的系统框架中的用于禁用通知权限的接口,以禁用第一通知消息对应的应用的通知权限,将第一通知消息从终端上消除。在本实施例中,通过遍历前述的包名列表,通过和终端系统框架以约定的方式发送广播(对于安卓(Android)等系统,广播是一种进程间通信的标准方式之一)。广播中会 携带应用的包名以及是启用还是禁用通知权限的标志(此处该标志指示禁用通知权限);终端的系统框架侧收到广播后,从广播中解析出应用的包名和启用禁用标志,然后调用终端系统框架中的用于禁用通知权限的接口来禁用该应用的通知权限。一旦应用的通知权限被禁用,该应用通知消息会被自动删除。本领域技术人员应当理解,应用通知的权限一般应用是无法直接访问的,所以在本实施例中,通过和框架约定一种通信的方式来禁用或启用应用通知权限。
本发明实施例的一个应用场景如下:用户的手机当前接收了8个通知消息,其中3条是不可移除属性的通知消息。根据相关技术方案,用户执行移除指令后会从手机中移除掉5条,另外3条除非用户手动禁用对应应用通知消息才可清除。手动禁用该应用的通知权限过程较为繁琐,用户一来可能不知道,二来也不会去操作,三来即使会去操作如果不可移除的通知数较多也需要一个个去操作,太过麻烦。本发明实施例的技术方案,用户可以在需要处理通知消息时,可通过长按或双击预设的按钮来触发本实施例的处理流程,也可以通过在图形界面上额外添加一个按钮来触发处理通知消息,当用户进行触发后,逐条判断通知消息的属性,如果是可移除属性的通知消息,那么可以直接调用禁用通知权限的接口进行通知消息的清除,如果是不可移除属性的通知消息,那么可以获取当前通知消息的应用的包名,发送广播来调用手机系统框架,以禁用对应应用的通知权限,同时可以记录下应用的包名以备后面再次启用。通知权限一旦被禁止,这些通知自动就会删除,可见在本实施例的技术方案,基于对应用的通知权限的自动禁用,使得对通知消息的处理更加有效,避免产生不可移除属性的通知消息无法被移除的情况,减少了通知消息对用户干扰以及对手机资源的占用。
如图5所示,本发明第五实施例提出一种处理通知消息的装置,包括:
白名单模块510,设置为根据接收的外部指令确定用户选择的应用,并将确定的用户选择的应用的包名记录在白名单内。在本实施例中,对提供用户选择应用的形式不进行限制,例如可以是:提供一个图形界面,该图形界面支持用户选择将对应的应用加入白名单,白名单上的应用的所有通知消息 不会被清除。
属性获取模块520,设置为获取终端接收的一个或多个通知消息的属性;
包名获取模块530,设置为根据获取的通知消息的属性,将具有不可移除属性的通知消息确定为第一通知消息,并获取第一通知消息对应的应用的包名;
判断模块540,设置为判断第一通知消息对应的应用的包名是否记录在预设的白名单中,并在第一通知消息对应的应用的包名未记录在预设的白名单中时,发送触发消息到接口调用模块;
接口调用模块550是设置为,根据获取的第一通知消息对应的应用的包名,根据接收的触发消息调用终端的系统框架中的用于禁用通知权限的接口,以禁用第一通知消息对应的应用的通知权限,将第一通知消息从终端上消除。在本实施例中,利用白名单的设计,用户可以将重要的应用加入白名单中,以免清理了该应用的通知消息。
接口调用模块550还设置为,在第一通知消息被清除后,关系终端的系统框架中的用于禁用通知权限的接口,恢复第一通知消息对应的应用的通知权限。在本实施例中,可以延时一段时间(比如200毫秒(ms),也可不延时)后再遍历应用的包名,依次调用手机的接口,传递应用的包名来启用该应用的通知权限,本实施例的技术方案作用在于,为避免应用后续会发出较重要的通知消息,保证用户不会忽略掉重要通知消息,所以需要恢复该应用的通知权限。
本发明第六实施例提出一种处理通知消息的装置,包括:
属性获取模块410,设置为获取终端接收的一个或多个通知消息的属性。
包名获取模块420,设置为根据获取的通知消息的属性,将具有不可移除属性的通知消息确定为第一通知消息,并获取第一通知消息对应的应用的包名;
接口调用模块430,设置为根据获取的第一通知消息对应的应用的包名,调用终端的系统框架中的用于禁用通知权限的接口,以禁用第一通知消息对 应的应用的通知权限,将第一通知消息从终端上消除。
接口调用模块430,还设置为:根据获取的通知消息的属性,将具有可移除属性的通知消息确定第二通知消息,调用终端的系统框架中的用于移除通知消息的接口,以从终端中移除所述第二通知消息。在本实施例中,对于可移除属性的第二通知消息,可以直接调用终端系统框架的用于移除通知消息的接口来进行通知消息的清理,通过这种方式清理通知消息更加快速高效。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件(例如处理器)完成,所述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现。相应地,上述实施例中的每个模块/单元可以采用硬件的形式实现,例如通过集成电路来实现其相应功能,也可以采用软件功能模块的形式实现,例如通过处理器执行存储于存储器中的程序/指令来实现其相应功能。本发明不限制于任何特定形式的硬件和软件的结合。
虽然本申请所揭露的实施方式如上,但所述的内容仅为便于理解本申请而采用的实施方式,并非用以限定本申请,如本发明实施方式中的具体的实现方法。任何本申请所属领域内的技术人员,在不脱离本申请所揭露的精神和范围的前提下,可以在实施的形式及细节上进行任何的修改与变化,但本申请的专利保护范围,仍须以所附的权利要求书所界定的范围为准。
工业实用性
上述技术方案避免了用户收到不必要的通知消息的干扰,提升了用户使用体验,避免了难以被移除的通知消息占用终端的资源。

Claims (10)

  1. 一种处理通知消息的方法,所述方法包括:
    获取终端接收的一个或多个通知消息的属性;
    根据获取的通知消息的属性,将具有不可移除属性的通知消息确定为第一通知消息,并获取所述第一通知消息对应的应用的包名;
    根据获取的所述第一通知消息对应的应用的包名,调用所述终端的系统框架中的用于禁用通知权限的接口,以禁用所述第一通知消息对应的应用的通知权限,将所述第一通知消息从所述终端上消除。
  2. 根据权利要求1所述的方法,所述方法还包括:在调用所述终端的系统框架中的用于禁用通知权限的接口之前,
    判断所述第一通知消息对应的应用的包名是否记录在预设的白名单中,并在第一通知消息对应的应用的包名未记录在预设的白名单中时,生成触发执行调用所述终端的系统框架中的用于禁用通知权限的接口的触发消息。
  3. 根据权利要求2所述的方法,所述方法还包括:
    根据接收的外部指令确定用户选择的应用,并将确定的所述用户选择的应用的包名记录在所述白名单内。
  4. 根据权利要求1所述的方法,所述方法还包括:
    所述第一通知消息被清除后,调用所述终端的系统框架中的用于禁用通知权限的接口,恢复所述第一通知消息对应的应用的通知权限。
  5. 根据权利要求1至4中任一项所述的方法,所述方法还包括:
    根据获取的通知消息的属性,将具有可移除属性的通知消息确定第二通知消息,调用所述终端的系统框架中的用于移除通知消息的接口,以从所述终端中移除所述第二通知消息。
  6. 一种处理通知消息的装置,所述装置包括:
    属性获取模块,设置为获取终端接收的一个或多个通知消息的属性;
    包名获取模块,设置为根据获取的通知消息的属性,将具有不可移除属 性的通知消息确定为第一通知消息,并获取所述第一通知消息对应的应用的包名;
    接口调用模块,设置为根据获取的所述第一通知消息对应的应用的包名,调用所述终端的系统框架中的用于禁用通知权限的接口,以禁用所述第一通知消息对应的应用的通知权限,将所述第一通知消息从所述终端上消除。
  7. 根据权利要求6所述的装置,所述装置还包括判断模块:
    判断模块设置为,判断所述第一通知消息对应的应用的包名是否记录在预设的白名单中,并在第一通知消息对应的应用的包名未记录在预设的白名单中时,发送触发消息到所述接口调用模块;
    所述接口调用模块是设置为,根据获取的所述第一通知消息对应的应用的包名,根据接收的触发消息调用所述终端的系统框架中的用于禁用通知权限的接口,以禁用所述第一通知消息对应的应用的通知权限,将所述第一通知消息从所述终端上消除。
  8. 根据权利要求7所述的装置,所述装置还包括:
    白名单模块,设置为根据接收的外部指令确定用户选择的应用,并将确定的所述用户选择的应用的包名记录在所述白名单内。
  9. 根据权利要求6所述的装置,
    所述接口调用模块还设置为,在所述第一通知消息被清除后,调用所述终端的系统框架中的用于禁用通知权限的接口,恢复所述第一通知消息对应的应用的通知权限。
  10. 根据权利要求6至9中任一项所述的装置,
    所述接口调用模块还设置为:根据获取的通知消息的属性,将具有可移除属性的通知消息确定第二通知消息,调用所述终端的系统框架中的用于移除通知消息的接口,以从所述终端中移除所述第二通知消息。
PCT/CN2016/089447 2016-04-22 2016-07-08 一种处理通知消息的方法和装置 WO2017181537A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610255975.8 2016-04-22
CN201610255975.8A CN107305499B (zh) 2016-04-22 2016-04-22 清理移动终端通知消息的方法和装置

Publications (1)

Publication Number Publication Date
WO2017181537A1 true WO2017181537A1 (zh) 2017-10-26

Family

ID=60115703

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/089447 WO2017181537A1 (zh) 2016-04-22 2016-07-08 一种处理通知消息的方法和装置

Country Status (2)

Country Link
CN (1) CN107305499B (zh)
WO (1) WO2017181537A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108093129A (zh) * 2017-12-05 2018-05-29 广东小天才科技有限公司 移动终端的应用程序通知处理方法、装置、终端及介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103970774A (zh) * 2013-01-30 2014-08-06 腾讯科技(深圳)有限公司 通知图标清理方法和装置
CN104182497A (zh) * 2014-08-14 2014-12-03 宇龙计算机通信科技(深圳)有限公司 通知消息的回收方法及系统
US20150365360A1 (en) * 2013-02-01 2015-12-17 Tencent Technology (Shenzhen) Company Limited Method and apparatus for processing push message in notification center of mobile terminal, and storage medium
CN105306712A (zh) * 2015-10-27 2016-02-03 上海斐讯数据通信技术有限公司 通知消息的管理方法以及管理系统

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101635894A (zh) * 2009-08-28 2010-01-27 中兴通讯股份有限公司 一种垃圾信息监控系统、监控方法、信息发送方法
CN103546641A (zh) * 2013-10-29 2014-01-29 广东欧珀移动通信有限公司 移动终端通知栏消息过滤方法与装置
CN105095749B (zh) * 2014-05-22 2018-03-27 北京奇虎科技有限公司 状态栏通知的接管方法及装置
CN105183307B (zh) * 2015-06-15 2018-05-04 北京奇虎科技有限公司 应用程序消息显示控制方法及装置
CN105162959A (zh) * 2015-08-04 2015-12-16 广东欧珀移动通信有限公司 一种消息通知的处理方法及装置
CN105354492B (zh) * 2015-10-16 2018-07-17 珠海格力电器股份有限公司 移动通讯终端及其消息通知控制方法和装置
CN105450505A (zh) * 2015-11-03 2016-03-30 北京金山安全软件有限公司 通知消息处理方法、装置及终端设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103970774A (zh) * 2013-01-30 2014-08-06 腾讯科技(深圳)有限公司 通知图标清理方法和装置
US20150365360A1 (en) * 2013-02-01 2015-12-17 Tencent Technology (Shenzhen) Company Limited Method and apparatus for processing push message in notification center of mobile terminal, and storage medium
CN104182497A (zh) * 2014-08-14 2014-12-03 宇龙计算机通信科技(深圳)有限公司 通知消息的回收方法及系统
CN105306712A (zh) * 2015-10-27 2016-02-03 上海斐讯数据通信技术有限公司 通知消息的管理方法以及管理系统

Also Published As

Publication number Publication date
CN107305499B (zh) 2022-03-04
CN107305499A (zh) 2017-10-31

Similar Documents

Publication Publication Date Title
US9973506B2 (en) Method and apparatus for clearing notification icon, and storage medium
CN106484509B (zh) 一种弹窗的输出方法、装置及终端
CN108182131B (zh) 监控应用运行状态的方法、装置、存储介质及电子设备
US9612886B2 (en) Method and device for monitoring API function scheduling in mobile terminal
US9569607B2 (en) Security verification method and apparatus
US20150365360A1 (en) Method and apparatus for processing push message in notification center of mobile terminal, and storage medium
JP7020630B2 (ja) 電子デバイスにおけるハードウェアリソースアクセスを管理するための方法および装置
US11272051B2 (en) Method for notification reminder, terminal, and storage medium
US20180359356A1 (en) Prompting method and apparatus
TWI671680B (zh) 一種應用的操作方法及裝置
WO2015106727A1 (en) Method and apparatus for switching audio output device
WO2014201872A1 (en) Method and device for processing short messages
WO2019233466A1 (zh) 用于应用保持的方法与设备
CN107341059A (zh) 一种微信公众号并发消息处理机制
WO2017181537A1 (zh) 一种处理通知消息的方法和装置
WO2018161535A1 (en) Method, apparatus and terminal device for sending broadcast
WO2017071214A1 (zh) 忽略手机来电的处理方法及装置
CN111159298A (zh) 业务请求处理方法、装置、电子设备及存储介质
CN111241588B (zh) 一种在应用中实现辅助功能的方法及装置
CN104978179B (zh) 一种应用管理方法及装置
CN104346228A (zh) 共享应用程序的方法及终端
CN113110901A (zh) 桌面锁定控制方法及装置
CN105959497B (zh) 通讯方法及装置
CN107835318B (zh) 进程启动的管控方法、装置及存储介质和移动终端
CN114915837B (zh) 视频渲染的触发方法、装置、电子设备及存储介质

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

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

Ref document number: 16899124

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16899124

Country of ref document: EP

Kind code of ref document: A1