-
Notifications
You must be signed in to change notification settings - Fork 61
Native Activity
Duy Tran Le edited this page Jun 7, 2018
·
5 revisions
Sample: native-activity The native-activity sample resides under the NDK installation root, in samples/native-activity. It is a very simple example of a purely native application, with no Java source code. In the absence of any Java source, the Java compiler still creates an executable stub for the virtual machine to run. The stub serves as a wrapper for the actual, native program, which is located in the .so file.
The app itself simply renders a color onto the entire screen, and then changes the color partly in response to movement that it detects.
Example from https://developer.android.com/ndk/samples/sample_na
See video demo https://www.youtube.com/watch?v=rS4FtvXPE8M
- Click File menu, then select Open file

- Go to directory
/sdcard/CPlusPlusNIDE/Examples/native-activity
and selectnative-activity.c
to open it

- Select
native-activity.c
to open it

- Now click Run button on the action bar
- You can enter
CFLAGS
,CXXFLAGS
orLDFLAGS
if need needed. In this case, just click Build button

- Wait for build complete and see result, perfect.
