GithubHelp home page GithubHelp logo

liuxuanhai / ndk-tutorials Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thoeni/ndk-tutorials

0.0 2.0 0.0 2.12 MB

Tutorials exploiting jni implementation under Android through the ndk

Makefile 8.59% C 56.87% Java 34.54%

ndk-tutorials's Introduction

################################# MASTER BRANCH ###############################
Tutorial1: Contains a very basic example of how a JNI callback to a Java Static
	   method works
Tutorial2: Contains an example to explore some possibilities of JNI callbacks
	   ran within a native thread, properly attached to the current JVM.
	   The callbacks go from native code to Android Activity, and interact
	   with the UI
Tutorial3: Contains an example where the native code calls back to an Android
	   Service. In this example the Service called "Tutorial3Service" just
	   loads the native shared library and permits a custom service which
	   extends it to override callback methods.
###############################################################################

The full package consists of 3 tutorials to explore JNI calls into Android
environment, through the ndk development kit.

How to make it work:

0- Clone the tutorials into your <ndk-root> folder

1- Create a new project in Eclipse from the existing sample source
In Eclipse:
Click File > New Android Project...
Select the Create project from existing source radio button.
Select any API level above Android 1.5
In the Location field, click Browse... and select the proper tutorialX dir.
Click Finish.

2- On the command line:
Change to the <ndk-root>/tutorials/tutorialX directory.
Run the following command to generate a build.xml file:
android update project -p .
Compile the native code using the ndk-build command.
cd <ndk-root>/tutorials/tutorialX
<ndk_root>/ndk-build

4- In Eclipse: after you launched the emulator, run project as Android App

ndk-tutorials's People

Contributors

thoeni avatar

Watchers

James Cloos avatar C++ avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.