Unlock instant, AI-driven research and patent intelligence for your innovation.

Android message notification distribution method

A message notification and notification technology, applied in the field of Android communication, can solve problems such as poor compatibility and complex logic, and achieve the effect of reducing development costs

Inactive Publication Date: 2018-11-13
山东华软金盾软件股份有限公司
View PDF2 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] 1. The logic is complex: since the Android system version 5.0, the API for judging whether the program is in the foreground has been changed, so when calling this API, the system version needs to be judged;
[0005] 2. Poor compatibility: For some models, if the screen is locked when the program is in the foreground, the system API will judge that the program is in the foreground, so the lock screen notification will not be sent

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Android message notification distribution method
  • Android message notification distribution method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] The present invention will be further described below.

[0021] A method for distributing Android message notifications, comprising the steps of:

[0022] a) When the Android program starts, use the lowest priority to register an event subscriber Subscriber in the publish / subscribe event bus EventBus of the Android system, listen to the event through the event subscriber Subscriber and define it as EventReceiver. Since an event subscriber Subscriber is registered with the lowest priority in EventBus, he is always the last to listen to the event

[0023] b) When the Android program switches from the background to the foreground, the onResume function of the Android system is called back, and a Subscriber is registered with the highest priority in the onResume function and defined as EventInterceptor. Since a Subscriber is registered with the highest priority in the onResume function, he is always the first to listen to the event.

[0024] c) When the Android program is...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses an Android message notification distribution method. The method comprises the following steps: registering an event subscriber by using the highest priority; registering a Subscriber by using the lowest priority, and calling the Subscriber as an EventReceiver; creating an Event by the Android system according to the message, and sending the Event through an Event Bus, wherein all registered Subscribers successively receive the Event according the high and low of the priority, the Subscriber with high priority receives at first, and the Subscriber with low priority receives at last; if the EventInterceptor receives the Event, extracting the parameter sendNotification from the Event, and setting the parameter sendNotification as the false; if the EventInterceptor doesnot receive the Event, the EventInterceptor is unregistered; when the EventReceiver receives the Event, not sending a status bar notification, and displaying the message in a chat interface; and if the parameter sendNotification value is true, sending the parameter sendNotification. The method disclosed by the invention is unnecessary to consider the model adaption prolem, and the development cost is reduced.

Description

technical field [0001] The invention relates to the technical field of Android communication, in particular to an Android message notification distribution method. Background technique [0002] In instant messaging products, processing and displaying messages is an essential function of the client. When receiving a new message from the server, the client program determines how to process the message by judging whether it is in the foreground: If the program is in the foreground To run, the message needs to be displayed directly on the interface, and the user must be notified by means of sound or vibration; if the program is running in the background, it needs to be displayed on the top status bar, and the user should be notified by floating notification or lock screen notification. [0003] An existing technology is to judge whether the program is in the foreground by calling the system API, and then process the message. The specific process is as follows figure 1 shown. T...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): H04L12/58H04L29/06
CPCH04L51/043H04L63/306H04L51/224H04L51/214
Inventor 王明超
Owner 山东华软金盾软件股份有限公司