Method and system for communication between c++ and java under android platform

A platform and sender technology, applied in the field of communication, can solve the problems of increased development workload, clumsy debugging, and cumbersome communication process, and achieve the effect of facilitating development work, reducing development difficulty, and eliminating cumbersome processes.

Active Publication Date: 2019-04-16
TCL CORPORATION
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Although the appearance of Jni satisfies the possibility of communication between native and Java, the communication process thus realized is very cumbersome, and the debugging is also very clumsy, which leads to the doubled development workload of this part.

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
  • Method and system for communication between c++ and java under android platform
  • Method and system for communication between c++ and java under android platform
  • Method and system for communication between c++ and java under android platform

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0033] The present invention provides a method and system for C++ and Java communication under the Android platform. In order to make the purpose, technical solution and effect of the present invention clearer and clearer, the present invention will be further described in detail below. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

[0034] The present invention provides a method for C++ and Java communication under the Android platform, wherein the method is as follows figure 1 As shown, the steps are:

[0035] One of S100, C++ and Java, as the sender, uses its pre-created message management class to send a message, then converts the format of the message through the pre-created Java local interface and forwards the converted message.

[0036] Based on the description of step S100, before the step S100, it should also include: respectively pre-creating two parts of the ...

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 a C++ and Java communication method in an Android platform and a C++ and Java communication system in the Android platform. The method comprises the following steps that: A, after either C++ or Java is used as a sender for sending out a message by utilizing a message management class of the sender, the message format is converted by a local interface of the Java, and the converted message is forwarded; B, the other one of the C++ or the Java is used as a receiver and obtains the message by utilizing a message monitor interface of the receiver, a practical receiving object is found by the message management class, and then, the message is sent to the found practical receiving object; and C, the return value of the practical received object is subjected to type conversion by the message management class of the receiver via the local interface of the Java and is returned to the sender. The method has the advantages that the complicated process for building Jni communication is omitted; a set of simple and practical C++ and Java communication interface is provided for a developer; and the development difficulty of programs involving with C++ and Java communication is reduced.

Description

technical field [0001] The invention relates to the field of communication technology, in particular to a method and system for C++ and Java communication under the Android platform. Background technique [0002] The development of programs under the Android platform is roughly divided into two parts: native and Java, and the native part can use C / C++ and other languages ​​to write programs. There are some programs that need to use both parts at the same time. This requires the ability to communicate between the two parts. The Android platform provides a Java native call method, namely Jni (Java NativeInterface). Although the appearance of Jni satisfies the possibility of communication between native and Java, the communication process thus realized is very cumbersome, and the debugging is also very clumsy, which leads to the multiplication of the development workload in this part. [0003] Therefore, the prior art still needs to be improved and developed. Contents of th...

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): G06F9/54
Inventor 秦龙龙卢伟超
Owner TCL CORPORATION
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