Chapter 3 Android Platforms

3.1 Summary of Android Platforms and Supported Features

The following table shows the supported products/features for each architecture. A ● means supported in this release, an empty cell means unsupported in this release.

Table 3.1 Android Systems - Supported Features

RTI Architecture [1]

Supported Features

Languages

 

Java [2]

Python [3]

.NET (C#) [4]

C/C++ [5]

Modern C++ [6], [7]

Protocol Buffers Extension

 

Android 12, 14, 16

arm64Android12clang12.0.8ndkr23b [9]

 

 

 

 

Android AOSP 14

arm64AndroidAOSP14clang17.0.2 [9]

 

 

 

 

 

Transports

 

UDP/IPv4

UDP/IPv6

Multicast

TCP/IPv4

Shared Memory (w/ zero copy)

 

 

Android 12, 14

arm64Android12clang12.0.8ndkr23b

 

 

 

Android AOSP 14

arm64AndroidAOSP14clang17.0.2

 

 

 

 

Infrastructure Services

 

Persistence Service

Routing Service

Recording and Replay Services

Web Integration Service

 

 

 

Android 12, 14

arm64Android12clang12.0.8ndkr23b

             

Android AOSP 14

arm64AndroidAOSP14clang17.0.2

             

Connext Professional Libraries

 

Request/Reply

Monitoring Library

Distributed Logger

LBED

Monitoring Library 2.0

 

 

Android 12, 14

arm64Android12clang12.0.8ndkr23b

 

See "Observability Framework" rows below

 

 

Android AOSP 14

arm64AndroidAOSP14clang17.0.2

 

 

 

Core Library Features

 

Monotonic Clock

CPU Core Affinity

Durable writer history & reader state

RTI DDS thread name

Backtrace

Cmake Find Package

 

Android 12, 14

arm64Android12clang12.0.8ndkr23b

 

 

 

 

 

 

Android AOSP 14

arm64AndroidAOSP14clang17.0.2

 

 

 

 

 

 

Tools

 

Shapes Demo

Launcher

Monitor

Admin Console

System Designer

rtiddsgen server

Utilities (rtiddsping, rtiddsspy)

Android 12, 14

arm64Android12clang12.0.8ndkr23b

 

 

 

 

 

 

Android AOSP 14

arm64AndroidAOSP14clang17.0.2

 

 

 

 

 

 

Observability Framework

 

Observability Collector Service

Monitoring Library 2.0

 

 

 

 

 

Android 12, 14

arm64Android12clang12.0.8ndkr23b

 

         

Android AOSP 14

arm64AndroidAOSP14clang17.0.2

 

         

Security Extensions

 

Security Plugins (for OpenSSL) [8]

Security Plugins (for wolfSSL)

TLS Support [8]

Security Plugins SDK

   

 

Android 12, 14

arm64Android12clang12.0.8ndkr23b

 

 

   

 

Android AOSP 14

arm64AndroidAOSP14clang17.0.2

 

 

 

 

   

 

Add-ons

 

Cloud Discovery Service

Real-Time WAN Transport

Ada Language Support

Limited Bandwidth Plugins

Queuing Service (Experimental)

 

 

Android 12, 14

arm64Android12clang12.0.8ndkr23b

 

         

Android AOSP 14

arm64AndroidAOSP14clang17.0.2

 

         

Footnotes for the above table:

1

Supports DDS 1.4, RTPS 2.5, and DDS X-Types 1.4.

2

Built with Eclipse Temurin OpenJDK 21.0.7, compatible with Java 8 and above. Also tested with AdoptOpenJDK 17.0.6 and 25.0.1.

3

Supported on Python 3.10-3.14. Free-threaded (no-GIL) builds of CPython 3.13+ are not currently supported.

4

The C# API is provided as multi-targeted .NET Standard 2.0 and 2.1 libraries, built using the .NET 10 SDK. This allows consumption from the following runtimes, per Microsoft compatibility guidance: .NET 5 and newer, .NET Core 2.1 and newer, and .NET Framework 4.8.1 and newer. Unity projects can consume the libraries on either .NET Standard 2.0 or 2.1 profiles depending on the Unity version and API Compatibility Level settings. Unity versions 2021.2 and later include support for .NET Standard 2.1, while earlier versions target .NET Standard 2.0.

5

Supports C++98 compilers or newer.

6

Tested with C++11 unless stated otherwise.

7

Supporting Modern C++ means supporting the RPC feature unless otherwise stated.

8

Tested with OpenSSL 3.5.5 unless stated otherwise.

9

Advanced example generation in code generator not supported.

3.1.1 Monotonic Clock Support

See Configuring the Clock per DomainParticipant, in the RTI Connext Core Libraries User's Manual for information on the monotonic clock.

3.2 Building Applications for Android Platforms

3.2.1 Required Libraries and Compiler Flags

First, see the basic instructions in Chapter 2 Building Applications—Notes for All Platforms.

See Table 3.2 Building Instructions for Android Architectures for a list of the compiler flags and libraries you will need to link into your application.

Depending on which Connext features you want to use, you may need additional libraries; see 3.2.2 Additional Libraries for Other Features.

Make sure you are consistent in your use of debug and release versions of the libraries. Do not mix release and debug libraries.

Release and Debug Terminology:

Both release and debug versions of the libraries are provided. For Connext, debug libraries are created with debug symbols to facilitate debugging with debugger, for example. Release libraries do not contain debug information.

The Connext debug libraries are intended solely for development and debugging purposes. These libraries are not optimized for performance or resource consumption and may include additional diagnostic information that can affect runtime behavior. They are not intended for use in production environments. Please ensure that only the release libraries are used in production deployments. Debug libraries can be identified by the suffix "d" in their names.

Additional Documentation: 

See the RTI Connext Core Libraries Getting Started Guide Addendum for Android Systems.

Verified Compiler Flags:

Compiler flags outside those documented in Table 3.2 Building Instructions for Android Architectures have not been verified by RTI and can cause undefined behavior.

Table 3.2 Building Instructions for Android Architectures

API

Library Format

Required RTI Libraries and JAR Files1, 2

Required System Libraries

Required Compiler Flags

C++3

Release

libnddscore.so

libnddsc.so

libnddscpp.so (or libnddscpp2.so)

librticonnextmsgcpp.so

libc++_shared.so

For Android 12, 14: 

-L$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android -lc++_shared

 

For AOSP 14:

See 3.2.1.1 Linking executables for C++ and 3.2.1.3 Building shared libraries instead of executables (C and C++)

For Android 12, 14:

-DRTI_LINUX -DRTI_UNIX -DRTI_64BIT -DRTI_ANDROID=12

 

For AOSP 14:

-Wno-return-type-c-linkage -Wno-deprecated-register -nostdlibinc -march=armv8-a -target aarch64-linux-android -I${AOSP_ROOT}/external/libcxx/include -I${AOSP_ROOT}/external/libcxxabi/include -isystem ${AOSP_ROOT}/bionic/libc/include -isystem ${AOSP_ROOT}/bionic/libc/kernel/uapi -isystem ${AOSP_ROOT}/bionic/libc/kernel/android/uapi -isystem ${AOSP_ROOT}/bionic/libc/kernel/uapi/asm-arm64 -I${AOSP_ROOT}/system/logging/liblog/include -I${AOSP_ROOT}/libnativehelper/include_jni -fpic -DLINUX -DRTI_LINUX -DRTI_ANDROID=14 -DRTI_AOSP=14 -DRTI_64BIT -DRTI_LINUX26 -DRTI_UNIX

Debug

libnddscored.so

libnddscd.so

libnddscppd.so (or libnddscpp2d.so)

librticonnextmsgcppd.so

libc++_shared.so

C

Release

libnddscore.so

libnddsc.so

librticonnextmsgc.so

For Android 12, 14: 

-L$(ANDROID_NDK_ROOT)/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/31 -llog -lc -lm

 

For AOSP 14:

See 3.2.1.2 Linking executables for C and 3.2.1.3 Building shared libraries instead of executables (C and C++)

For Android 12, 14: 

-DRTI_LINUX -DRTI_UNIX -DRTI_64BIT -DRTI_ANDROID=12

 

For AOSP 14:

-nostdlibinc -march=armv8-a -target aarch64-linux-android -fpic -DLINUX -DRTI_LINUX -DRTI_ANDROID=14 -DRTI_AOSP=14 -DRTI_64BIT -DRTI_LINUX26 -DRTI_UNIX -isystem ${AOSP_ROOT}/bionic/libc/include -isystem ${AOSP_ROOT}/bionic/libc/kernel/uapi -isystem ${AOSP_ROOT}/bionic/libc/kernel/android/uapi -isystem ${AOSP_ROOT}/bionic/libc/kernel/uapi/asm-arm64 -I${AOSP_ROOT}/system/logging/liblog/include -I${AOSP_ROOT}/libnativehelper/include_jni

Debug

libnddscored.so

libnddscd.so

librticonnextmsgcd.so

Java

Release

When not building Apps (*.apk):

nddsjava.jar

rticonnextmsg.jar

 

When building Apps (*.apk):

nddsjava.jar

libnddsjava.so

libnddscore.so

libnddsc.so

rticonnextmsg.jar

N/A

None required

Debug

When not building Apps (*.apk):

nddsjavad.jar

rticonnextmsgd.jar

 

When building Apps (*.apk):

nddsjavad.jar

libnddsjavad.so

libnddscored.so

libnddscd.so

rticonnextmsgd.jar

3.2.1.1 Linking executables for C++

  1. Prepend the following before the output executable:
  2. -fuse-ld=lld -nostdlib -target aarch64-linux-android ${AOSP_ROOT}/out/soong/.intermediates/bionic/libc/crtbegin_dynamic/android_arm64_armv8-a/crtbegin_dynamic.o -L${AOSP_ROOT}/out/soong/.intermediates/external/libcxx/libc++/android_arm64_armv8-a_shared -lc++ -L${AOSP_ROOT}/out/soong/.intermediates/system/logging/liblog/liblog/android_arm64_armv8-a_shared -llog -L${AOSP_ROOT}/out/soong/.intermediates/bionic/libc/libc/android_arm64_armv8-a_shared -lc -L${AOSP_ROOT}/out/soong/.intermediates/bionic/libm/libm/android_arm64_armv8-a_shared -lm
  1. Add the following after the output executable:
  2. ${AOSP_ROOT}/out/soong/.intermediates/external/libcxxabi/libc++demangle/android_arm64_armv8-a_static/libc++demangle.a -Wl,--start-group ${AOSP_ROOT}/prebuilts/clang/host/linux-x86/clang-r487747c/lib/clang/17.0.2/lib/linux/libclang_rt.builtins-aarch64-android.a -Wl,--end-group ${AOSP_ROOT}/out/soong/.intermediates/bionic/libc/crtend_android/android_arm64_armv8-a/obj/bionic/libc/arch-common/bionic/crtend.o -Wl,--exclude-libs=libclang_rt.builtins-aarch64-android.a

3.2.1.2 Linking executables for C

  1. Prepend the following before the output executable:
    -fuse-ld=lld -nostdlib -target aarch64-linux-android ${AOSP_ROOT}/out/soong/.intermediates/bionic/libc/crtbegin_dynamic/android_arm64_armv8-a/crtbegin_dynamic.o -L${AOSP_ROOT}/out/soong/.intermediates/system/logging/liblog/liblog/android_arm64_armv8-a_shared -llog -L${AOSP_ROOT}/out/soong/.intermediates/bionic/libc/libc/android_arm64_armv8-a_shared -lc -L${AOSP_ROOT}/out/soong/.intermediates/bionic/libm/libm/android_arm64_armv8-a_shared -lm
  1. Add the following after the output executable:
    ${AOSP_ROOT}/out/soong/.intermediates/bionic/libc/crtend_android/android_arm64_armv8-a/obj/bionic/libc/arch-common/bionic/crtend.o

3.2.1.3 Building shared libraries instead of executables (C and C++)

If building shared libraries rather than executables, use the linking instructions for executables above for the appropriate language, and instead of linking against crtbegin_dynamic.o (the first object to link, before the output executable) link with: ${AOSP_ROOT}/out/soong/.intermediates/bionic/libc/crtbegin_so/android_arm64_armv8-a/crtbegin_so.o

Likewise, rather than linking against crtend.o (the last object to link, after the output executable) link with: ${AOSP_ROOT}/out/soong/.intermediates/bionic/libc/crtend_so/android_arm64_armv8-a/obj/bionic/libc/arch-common/bionic/crtend_so.o

3.2.2 Additional Libraries for Other Features

This section discusses libraries for features that are not supported for every platform. Refer to Table 3.1 Android Systems - Supported Features to see if these libraries are supported on your platform.

If you plan to use the additional RTI libraries described in this section, they must be linked before the required RTI libraries (see Table 3.2 Building Instructions for Android Architectures) in your included libraries for linking.

Make sure you are consistent in your use of debug and release versions of the libraries. For example, if your Connext application is linked with the release version of the Connext libraries, you will need to also use the release version of the library. Do not mix release and debug libraries.

3.2.2.1 Libraries Required for Distributed Logger

To use the Distributed Logger APIs, link against the additional libraries in Table 3.3 Additional Libraries for using RTI Distributed Logger.

Table 3.3 Additional Libraries for using RTI Distributed Logger

Language

Release

Debug

C

librtidlc.so

librtidcd.so

C++

(Traditional API)

librtidlc.so

librtidlcpp.so

librtidlcd.so

librtidlcppd.so

Java

distlog.jar

distlogdatamodel.jar

distlogd.jar

distlogdatamodeld.jar

3.2.2.2 Libraries Required for Monitoring

Table 3.4 Additional Libraries for Using Monitoring

Library Format

Monitoring Libraries4

Release

librtimonitoring.so

Debug

librtimonitoringd.so

Table 3.5 Additional Libraries for Using Monitoring Library 2.0

Library Format

Monitoring Libraries 2.05

Release

librtimonitoring2.so

Debug

librtimonitoringd2.so

3.2.2.3 Libraries Required for Real-Time WAN Transport

If you choose to use RTI Real-Time WAN Transport, you must download and install a separate package that contains the transport libraries. See the RTI Connext Installation Guide for details.

Using Real-Time WAN Transport requires using one of the libraries in Table 3.6 Additional Libraries for Using RTI Real-Time WAN Transport APIs. Select the file appropriate for your chosen library format.

For more information, see Enabling Real-Time WAN Transport, in the RTI Connext Core Libraries User's Manual.

Table 3.6 Additional Libraries for Using RTI Real-Time WAN Transport APIs

Library Format

Real-Time WAN Transport Libraries6

Release

libnddsrwt.so

Debug

libnddsrwtd.so

3.2.2.4 Libraries Required for TCP Transport and TLS Support

These transports are supported on Android 12 and 14, but not AOSP 14.

To use the TCP Transport APIs, link against the additional libraries in Table 3.7 Additional Libraries for Using RTI TCP Transport APIs. If you are using RTI TLS Support, also link against the libraries in Table 3.8 Additional Libraries for Using RTI TCP Transport APIs with TLS Enabled. Select the files appropriate for your chosen library format.

Table 3.7 Additional Libraries for Using RTI TCP Transport APIs

Library Format

TCP Transport Libraries7

Release

libnddstransporttcp.so

Debug

libnddstransporttcpd.so

Table 3.8 Additional Libraries for Using RTI TCP Transport APIs with TLS Enabled

Library Format

TCP Transport Libraries8

OpenSSL Libraries9

Release

libnddstls.so

librtisslsupport.so

Debug

libnddstlsd.so

3.2.3 Target Configuration

Connext supports the Android operating system as a target platform. The target can be in one of two configurations: a consumer device (e.g., a Google™ Nexus™ 7 tablet) or as a "raw" Linux distribution. Building applications for the target occurs on a development machine using an Android SDK and, for C/C++, an Android NDK.

For a consumer device, all programs (applications and DDS utilities) must be installed on the device as Apps (*.apk files). No Connext components or libraries have to be pre-installed on the device—that is taken care of by the Android build and packaging tools. See the Android documentation for a full description of building and packaging Android Apps.

For a raw Linux distribution, all programs are executables that are linked with the necessary Connext libraries (see Chapter 3 Android Platforms). The build process is similar to other Linux variants, see 5.2 Building Applications for Linux Platforms.

3.2.4 ‘Release’ and ‘Debug’ Terminology

Android and Connext use these terms differently. For Android, "release" and "debug" refer to how application packages (*.apk) are signed as part of the Android Security Model. A "release" package is cryptographically signed by a key that can be trusted by virtue of some certificate chain. A "debug" package is signed by a key distributed with the SDK. It says nothing about the origin of the package. It allows the package to be installed during development testing, hence "debug." For Connext, debug means libraries created with debug symbols to facilitate debugging with gdb, for example. A "release" library does not contain debug information.

3.2.5 How the Connext Libraries were Built

Table 3.9 Library-Creation Details for Android Architectures provides details on how the libraries were built. This table is provided strictly for informational purposes; you do not need to use these parameters to compile your application. You may find this information useful if you are involved in any in-depth debugging.

The details for building user applications is in Chapter 2 Building Applications—Notes for All Platforms.

Table 3.9 Library-Creation Details for Android Architectures

RTI Architecture

Library

Format

Compiler Flags Used by RTI

arm64Android12clang12.0.8ndkr23b

when not using Java

Release

--target=aarch64-none-linux-android31 -DLINUX -DSIZEOF_LONG=8 -O3 -funwind-tables -no-canonical-prefixes -fexceptions -frtti -stdlib=libc++ -flto=thin -O3 -DNDEBUG -fPIC -fvisibility=hidden -fno-strict-aliasing

Debug

--target=aarch64-none-linux-android31 -DLINUX -DSIZEOF_LONG=8 -O0 -funwind-tables -no-canonical-prefixes -fexceptions -frtti -stdlib=libc++ -g -fPIC -fno-strict-aliasing

arm64Android12clang12.0.8ndkr23b when using Java

Release

-target 1.8 -source 1.8

Debug

-target 1.8 -source 1.8 -g

arm64AndroidAOSP14clang17.0.2

Dynamic Release

--target=aarch64-linux-android -DLINUX -DSIZEOF_LONG=8 -O3 -march=armv8-a -nostdlibinc -flto=thin -DNDEBUG -fPIC -fvisibility=hidden -fno-strict-aliasing

Dynamic Debug

--target=aarch64-linux-android -DLINUX -DSIZEOF_LONG=8 -O0 -march=armv8-a -nostdlibinc -O0 -g -fPIC -fno-strict-aliasing

3.3 Running Your Applications

For the environment variables that must be set at run time, see Table 3.10 Running Instructions for Android Architectures.

Table 3.10 Running Instructions for Android Architectures

RTI Architecture

Library Format

Required Environment Variables

All supported Android architectures

when not using Java

App (*.apk)

None

Dynamic

LD_LIBRARY_PATH=$LD_LIBRARY_PATH: <path-to-ndds-libs>

All supported Android architectures

when using Java

App (*.apk)

None

Dex

LD_LIBRARY_PATH=$LD_LIBRARY_PATH: <path-to-ndds-libs>

CLASSPATH=<path-to-dex>/classes.dex

3.4 Unsupported Features

Using DDS_WireProtocolQosPolicyAutoKind's RTPS_AUTO_ID_FROM_MAC to calculate the GUID prefix is not supported.

3.5 Thread Configuration

3.5.1 Thread Settings and Thread-Priority Definitions

See Table 3.11 Thread Settings for Android Platforms and Table 3.12 Thread-Priority Definitions for Android Platforms.

Table 3.11 Thread Settings for Android Platforms

Applicable Threads

DDS_ThreadSettings_t

Platform-Specific Setting

Asynchronous Publisher,

Asynchronous flushing thread

mask

OS default thread type

priority

OS default thread priority

stack_size

OS default stack size

cpu_list

CPU core affinity not supported

cpu_rotation

Database thread

mask

DDS_THREAD_SETTINGS_STDIO

priority

OS default thread priority

stack_size

OS default stack size

cpu_list

CPU core affinity not supported

cpu_rotation

Event thread

mask

DDS_THREAD_SETTINGS_STDIO | DDS_THREAD_SETTINGS_FLOATING_POINT

priority

OS default thread priority

stack_size

OS default stack size

cpu_list

CPU core affinity not supported

cpu_rotation

ReceiverPool threads

mask

DDS_THREAD_SETTINGS_STDIO | DDS_THREAD_SETTINGS_FLOATING_POINT

priority

OS default thread priority

stack_size

OS default stack size

cpu_list

CPU core affinity not supported

cpu_rotation

Table 3.12 Thread-Priority Definitions for Android Platforms

Thread-Priority Definition

Operating-System Priority

THREAD_PRIORITY_DEFAULT

If any of these constants are used to set the priority of the thread in the QoS, the OS's default thread priority will be used.

THREAD_PRIORITY_HIGH

THREAD_PRIORITY_ABOVE_NORMAL

THREAD_PRIORITY_NORMAL

THREAD_PRIORITY_BELOW_NORMAL

THREAD_PRIORITY_LOW

3.5.2 Automatic Thread-Specific Storage Cleanup

Android systems support automatic thread-specific storage cleanup. Use of the DomainParticipantFactory::unregister_thread API is therefore not required to clean up thread-specific storage in user threads (although it is safe to do so).

3.6 Socket Buffer Size Configuration

See Table 3.13 UDP send_socket_buffer_size and Table 3.14 UDP receive_socket_buffer_size. For more information on the send_socket_buffer_size and receive_socket_buffer_size properties, see Setting Builtin Transport Properties with the PropertyQosPolicy, in the RTI Connext Core Libraries User's Manual.

Table 3.13 UDP send_socket_buffer_size

Property

Behavior

NDDS_TRANSPORT_UDPV4_SOCKET_BUFFER_SIZE_OS_DEFAULT

Uses default send socket buffer size net.core.wmem_default

NDDS_TRANSPORT_UDPV4_SOCKET_BUFFER_SIZE_OS_MAX

Uses maximum send socket buffer size net.core.wmem_max

NDDS_TRANSPORT_UDPV6_SOCKET_BUFFER_SIZE_OS_DEFAULT

Uses default send socket buffer size net.core.wmem_default

NDDS_TRANSPORT_UDPV6_SOCKET_BUFFER_SIZE_OS_MAX

Uses maximum send socket buffer size net.core.wmem_max

Table 3.14 UDP receive_socket_buffer_size

Property

Behavior

NDDS_TRANSPORT_UDPV4_SOCKET_BUFFER_SIZE_OS_DEFAULT

Uses default receive socket buffer size net.core.rmem_default

NDDS_TRANSPORT_UDPV4_SOCKET_BUFFER_SIZE_OS_MAX

Uses maximum receive socket buffer size net.core.rmem_max

NDDS_TRANSPORT_UDPV6_SOCKET_BUFFER_SIZE_OS_DEFAULT

Uses default receive socket buffer size net.core.rmem_default

NDDS_TRANSPORT_UDPV6_SOCKET_BUFFER_SIZE_OS_MAX

Uses maximum receive socket buffer size net.core.rmem_max

3.7 Third-Party Software Versions Used for Android 12 Development and Testing

Table 3.15 Third-Party Software for Android 12 (arm64Android12clang12.0.8ndkr23b)

Third-Party Software

Version

Android Build Tools

35.0.0

Android Command-Line Tools

3.0

Android SDK Platforms-Tools

33

Android API Level

31

Android NDK

23.0.7243079

Gradle

8.14

Gradle Plugin

8.10

 

Table 3.16 Third-Party Software for Android 14 (arm64AndroidAOSP14clang17.0.2)

Third-Party Software

Version

Android Build Tools

35.0.0

Android Command-Line Tools

3.0

Android NDK

25.0.8474149

Gradle Plugin

8.14

Gradle

8.10