Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Design method of asynchronous communication tool in android

An asynchronous communication and tool technology, applied in the field of communication, can solve the problems of memory leakage, memory occupation, and difficulty in using Handler, and achieve the effect of solving cumbersome use and improving convenience.

Active Publication Date: 2021-04-27
WUHAN DOUYU NETWORK TECH CO LTD
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] Aiming at the existing technical problems in the traditional solution, the present invention provides a design method of an asynchronous communication tool in the Android system and an Android electronic device, which are used to solve the cumbersome use of asynchronous communication caused by the difficulty in using the Handler in the traditional solution and the need for asynchronous communication in the Handler. Messages are not released in time, leading to memory leaks, resulting in a large amount of memory occupation, making it impossible for other businesses to apply for the corresponding memory space

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
  • Design method of asynchronous communication tool in android
  • Design method of asynchronous communication tool in android

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0018] Hereinafter, embodiments of the present disclosure will be described with reference to the drawings. It should be understood, however, that these descriptions are exemplary only, and are not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Also, in the following description, descriptions of well-known structures and techniques are omitted to avoid unnecessarily obscuring the concepts of the present disclosure.

[0019] The terminology used herein is for the purpose of describing particular embodiments only, and is not intended to be limiting of the present disclosure. The terms "comprising", "comprising", etc. used herein indicate the presence of stated features,...

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

This disclosure provides a design method of an asynchronous communication tool in Android, including: defining the DyHandler class; defining the getDyHandler(Class cls) function for producing DyHandler objects; defining a Map collection for representing the mapping relationship between cls and the DyHandler class; When generating a DyHandler object, determine whether cls exists in the Map collection, and if it exists, call the getDyHandler(Class cls) function to obtain the DyHandler object; otherwise, call the constructor of the DyHandler class to obtain the DyHandler object; when the DyHandler object is no longer used, set the DyHandler Objects are removed from the Map collection. This method solves the problems of cumbersome use of Handler and memory leaks.

Description

technical field [0001] The present disclosure relates to the technical field of communication, and in particular to a method for designing an asynchronous communication tool in Android. Background technique [0002] In the traditional solution, asynchronous communication uses a Handler tool class provided by the Android system for communication. Due to the frequent use of Handler in this solution, and the need to instantiate objects and process message callbacks, it is easy to use It is very cumbersome, and when the message cannot be released in time, it is easy to cause a memory leak, resulting in a large amount of memory being occupied and not released, resulting in other businesses being unable to apply for the corresponding memory space, resulting in an exception. Contents of the invention [0003] Aiming at the existing technical problems in the traditional solution, the present invention provides a design method of an asynchronous communication tool in the Android sy...

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 Patents(China)
IPC IPC(8): H04L29/08H04L29/06G06F9/50
CPCG06F9/5022H04L67/34H04L69/03
Inventor 张磊陈少杰张文明
Owner WUHAN DOUYU NETWORK TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products