Chapter     10

POSIX Socket API: Local Communication

In the previous two chapters, you explored the POSIX Socket API as it pertains to communication with remote parties. The POSIX Socket API can also be used to establish a communication channel locally on the device between two applications, or between the native and Java layers. In this chapter, you will continue to build on top of the Echo example application. The local socket communication example will demonstrate the following:

  • Local socket server implementation in the native layer.
  • Local client implementation in the Java layer.
  • Establishing a local socket communication between two applications.

Echo Local Activity Layout

Using the Project Explorer view, expand the res directory for ...

Get Pro Android C++ with the NDK now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.