Time for action – creating a Java UI
Let's create a new Java project with a JNI module.
- Create a new hybrid Java/C++ project as shown in Chapter 2, Starting a Native Android Project:
- Name it
RenderScript
. - The main package is
com.packtpub.renderscript
. minSdkVersion
is 9 andtargetSdkVersion
is 19.- Define the
android.permission.WRITE_EXTERNAL_STORAGE
permission in theAndroidManifest.xml
file. - Turn the project into a native project as already seen.
- Remove the native source and header files that have been created by ADT.
- Name the main Activity
RenderScriptActivity
and its layoutactivity_renderscript.xml
.
- Name it
- Define the
project.properties
file as follows. These lines activate theRenderScript
support library, which allows porting code to older devices until ...
Get Android NDK Beginner's Guide - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.