Event handling method and device

An event processing and event technology, applied in the field of communication, can solve problems such as code reusability, maintainability and poor stability, and achieve the effect of facilitating reuse management and maintenance and improving stability

Active Publication Date: 2017-07-28
SHENZHEN TINNO WIRELESS TECH
View PDF6 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] In view of this, the embodiment of the present invention provides an event processing method and device to solve t

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
  • Event handling method and device
  • Event handling method and device
  • Event handling method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0046] An embodiment of the present invention provides an event processing method, which can be applied to terminals such as mobile phones and tablet computers using an Android system. The event processing method can be realized by a program, and the program can be installed on terminals such as mobile phones and tablet computers. In this document, a terminal adopting an Android system is referred to as an Android terminal.

[0047] figure 1 It is an example diagram of the first process flow of the event processing method provided by the embodiment of the present invention. Such as figure 1 As shown, in this embodiment, the event processing method is applied to an Android terminal, and the method includes the following steps:

[0048] S101, create a JNI (Java Native Interface, Java local interface) listening thread in the System_Server (system service) process, wherein the JNI listening thread is used to listen to the device driver event corresponding to the specified servi...

Embodiment 2

[0084] An embodiment of the present invention provides an event processing device, which can implement the steps of the event processing method in the first embodiment above.

[0085] image 3 The functional block diagram of the event processing device provided by the embodiment of the present invention. Such as image 3 As shown, in this embodiment, the event processing device can be set on an Android terminal, and the device includes:

[0086] Create a module 310, which is used to create a Java local interface JNI listening thread in the system service System_Server process, and the JNI listening thread is used to listen to device driver events corresponding to the specified service;

[0087] The running module 320 is used to run the JNI listening thread at the local layer;

[0088] The reporting module 330 is configured to report the device driver event corresponding to the specified service to the Java layer by invoking the corresponding JNI in response to the JNI liste...

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 embodiment of the invention provides an event handling method and device. The event handling method comprises the steps that after power-on initialization is completed on a designated service, a Java native interface (JNI) monitoring thread is created in the system server thread, wherein the JNI monitoring thread is used for monitoring corresponding device driver events of the designated service; the JNI monitoring thread is operated in a native layer; in response to the corresponding device driver events of the designated service monitored by the JNI monitoring thread, by calling a corresponding JNI, the corresponding device driver events of the designated service are reported to a Java layer. By means of an independent code, low-level events are reported to the upper Java layer; the code is centralized and independent, which is beneficial to reuse management and maintenance, and the centralized and independent code has the property of high cohesion and low coupling, so that the stability of the code is improved; therefore, the problems that in the prior art, event handling methods cause poor reusability, maintainability and stability of the code are solved.

Description

[0001] 【Technical field】 [0002] The present invention relates to the communication field, in particular to an event processing method and device. [0003] 【Background technique】 [0004] At present, Android (Android) system is widely used in mobile terminals such as smart phones and tablet computers. The Android system of the mobile terminal includes a device driver layer, a HAL (Hardware Abstract Layer, hardware abstraction layer) layer, a Framework (framework) layer and the Java application program on the top layer from bottom to top. Wherein, the Framework (framework) layer includes a Java framework layer and a native (Native) framework layer, where the native framework layer is referred to as the native layer. [0005] When the device driver layer gets a certain underlying event, the underlying event will be reported to the uppermost Java application program through the hardware abstraction layer and the framework. When realizing the project (ie Java application program...

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
IPC IPC(8): G06F9/54H04M1/725
CPCG06F9/546H04M1/72403
Inventor 郭名义
Owner SHENZHEN TINNO WIRELESS TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products