Skip to content

The Android NDK is a toolset that lets you implement parts of your app in native code, using languages such as C and C++. This repo include some examples how to pass data between java - native codes.

License

Notifications You must be signed in to change notification settings

pgsamila/AndroidNDK-passing-complex-data

Repository files navigation

Android NDK Passing Complex Data

License

Introduction

The Android NDK Passing Complex Data project provides a demonstration of passing complex data structures between Java and C/C++ using the Android NDK (Native Development Kit). The project showcases how to exchange data between the Java layer and the native layer, enabling efficient and seamless communication.

Features

  • Demonstrates how to pass arrays and structures between Java and C/C++
  • Shows how to modify data in the native layer and return it to Java
  • Provides a clean and simple codebase for learning and experimentation

Requirements

  • Android Studio 4.0 or later
  • Android NDK
  • Android device or emulator running Android 5.0 (API level 21) or later

Installation

  1. Clone the repository:
    git clone https://github.com/pgsamila/AndroidNDK-passing-complex-data.git
  2. Open the project in Android Studio.
  3. Install the Android NDK and configure its path in the project settings.

Usage

  1. Connect your Android device or start an emulator.
  2. Build and run the application from Android Studio.
  3. The application displays a simple user interface with a "Pass Data" button.
  4. Tap the "Pass Data" button to pass an array from Java to C/C++, perform a calculation on it in the native layer, and return the modified data back to Java.
  5. The modified data is displayed on the screen.

Feel free to explore the code to understand the data passing mechanisms and modify it according to your requirements.

Contributing

Contributions are welcome! If you find a bug or have a suggestion for improvement, please open an issue or submit a pull request. Ensure your contributions adhere to the project's coding conventions and follow the existing style.

License

The Android NDK Passing Complex Data project is licensed under the MIT License. You are free to modify and distribute the code as per the terms of the license.

About

The Android NDK is a toolset that lets you implement parts of your app in native code, using languages such as C and C++. This repo include some examples how to pass data between java - native codes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages