From bed7c8dd202276a53b843334457d83b352ce692d Mon Sep 17 00:00:00 2001 From: David Friedman Date: Wed, 27 May 2015 17:05:56 -0700 Subject: Docs: Removing "TODO"s, and adding a couple of links to reference docs. Change-Id: I34fe6acee2fdf777e8b78a5ab8c46393bb7f0f3e --- docs/html-ndk/ndk/guides/concepts.jd | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/docs/html-ndk/ndk/guides/concepts.jd b/docs/html-ndk/ndk/guides/concepts.jd index 45dceeb420aa..c2eccd4bd18e 100644 --- a/docs/html-ndk/ndk/guides/concepts.jd +++ b/docs/html-ndk/ndk/guides/concepts.jd @@ -111,7 +111,7 @@ ARMEABI (default), MIPS, and x86. For more information, see {@link android.app.NativeActivity} class in the manifest. Native Activities and Applications provides more detail on how to do this, under -“Using the {@code native-activity.h} interface.” +“Using the {@code native_activity.h} interface.” @@ -206,14 +206,16 @@ of Android applications with the correct structure.

The Android NDK provides you with two choices to implement your native activity:

@@ -223,9 +225,11 @@ also available, allowing you to modify the implementation.

For more information on how to use this static library, examine the native-activity sample application and its documentation. Further reading is also available in the comments in the {@code <ndk_root>/sources/android/native_app_glue/android_native_app_glue.h} file.

-

Using the native-activity.h interface

+

Using the native_activity.h interface

-

To implement a native activity with the {@code native-activity.h} interface:

+

To implement a native activity with the +{@code native_activity.h} +interface:

  1. Create a {@code jni/} directory in your project's root directory. This directory stores all of @@ -263,15 +267,17 @@ library containing the entry point to the application (such as C/C++ {@code main </manifest> -
  2. Create a file for your native activity, and implement the {@code ANativeActivity_onCreate()} -function, which the app calls when the native activity starts. This function, analogous -to {@code main} in C/C++, receives a pointer to an {@code ANativeActivity} structure, -which contains function pointers to the various callback implementations that you need to write. +
  3. Create a file for your native activity, and implement the function named in the + +{@code ANativeActivity_onCreate} variable. +The app calls this function when the native activity starts. This function, analogous +to {@code main} in C/C++, receives a pointer to an +{@code ANativeActivity} +structure, which contains function pointers to the various callback implementations that you need +to write. Set the applicable callback function pointers in {@code ANativeActivity->callbacks} to the implementations of your callbacks.
  4. - -
  5. Set the {@code ANativeActivity->instance} field to the address of any instance of specific data that you want to use.
  6. Implement anything else that you want your activity to do upon starting.
  7. @@ -297,7 +303,5 @@ the {@code jni/} directory, the build script automatically packages the {@code . from it into the APK.
-

You can find further information on using {@code native-activity.h} here.

- -- cgit v1.2.3-59-g8ed1b