Home | History | Annotate | Download | only in reference
      1 page.title=ANativeActivity Struct Reference
      2 page.customHeadTag=<link rel="stylesheet" type="text/css" href="doxygen-dac.css">
      3 @jd:body
      4 <!-- Generated by Doxygen 1.8.6 -->
      5 </div><!-- top -->
      6 <div class="header">
      7   <div class="summary">
      8 <a href="#pub-attribs">Data Fields</a>  </div>
      9   <div class="headertitle">
     10 <div class="title">ANativeActivity Struct Reference<div class="ingroups"><a class="el" href="group___native_activity.html">Native Activity</a></div></div>  </div>
     11 </div><!--header-->
     12 <div class="contents">
     13 
     14 <p><code>#include &lt;native_activity.h&gt;</code></p>
     15 <table class="memberdecls">
     16 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
     17 Data Fields</h2></td></tr>
     18 <tr class="memitem:af96995a13e77baf0d71c37d20c79ad51"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="struct_a_native_activity_callbacks.html">ANativeActivityCallbacks</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity.html#af96995a13e77baf0d71c37d20c79ad51">callbacks</a></td></tr>
     19 <tr class="separator:af96995a13e77baf0d71c37d20c79ad51"><td class="memSeparator" colspan="2">&#160;</td></tr>
     20 <tr class="memitem:a5e163c28566d4563eafeabd7dcab7eeb"><td class="memItemLeft" align="right" valign="top">JavaVM *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity.html#a5e163c28566d4563eafeabd7dcab7eeb">vm</a></td></tr>
     21 <tr class="separator:a5e163c28566d4563eafeabd7dcab7eeb"><td class="memSeparator" colspan="2">&#160;</td></tr>
     22 <tr class="memitem:ae6f0d0cd46e56b7e299b489cb60dd27e"><td class="memItemLeft" align="right" valign="top">JNIEnv *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity.html#ae6f0d0cd46e56b7e299b489cb60dd27e">env</a></td></tr>
     23 <tr class="separator:ae6f0d0cd46e56b7e299b489cb60dd27e"><td class="memSeparator" colspan="2">&#160;</td></tr>
     24 <tr class="memitem:ab10b01c3c23c4ddb9d2ddadd71b03c94"><td class="memItemLeft" align="right" valign="top">jobject&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity.html#ab10b01c3c23c4ddb9d2ddadd71b03c94">clazz</a></td></tr>
     25 <tr class="separator:ab10b01c3c23c4ddb9d2ddadd71b03c94"><td class="memSeparator" colspan="2">&#160;</td></tr>
     26 <tr class="memitem:aa52947cdd1476b95e858d83c0f5b0220"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity.html#aa52947cdd1476b95e858d83c0f5b0220">internalDataPath</a></td></tr>
     27 <tr class="separator:aa52947cdd1476b95e858d83c0f5b0220"><td class="memSeparator" colspan="2">&#160;</td></tr>
     28 <tr class="memitem:a2a61553b2f660ea8b57fcc2b495e109f"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity.html#a2a61553b2f660ea8b57fcc2b495e109f">externalDataPath</a></td></tr>
     29 <tr class="separator:a2a61553b2f660ea8b57fcc2b495e109f"><td class="memSeparator" colspan="2">&#160;</td></tr>
     30 <tr class="memitem:a40b4b64be7ecfac23751618313eb610d"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity.html#a40b4b64be7ecfac23751618313eb610d">sdkVersion</a></td></tr>
     31 <tr class="separator:a40b4b64be7ecfac23751618313eb610d"><td class="memSeparator" colspan="2">&#160;</td></tr>
     32 <tr class="memitem:ae1b90392cd257d16fd66a85bac1b08cd"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity.html#ae1b90392cd257d16fd66a85bac1b08cd">instance</a></td></tr>
     33 <tr class="separator:ae1b90392cd257d16fd66a85bac1b08cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
     34 <tr class="memitem:a0f76f065768b8f896ce47a3089fb438d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity.html#a0f76f065768b8f896ce47a3089fb438d">assetManager</a></td></tr>
     35 <tr class="separator:a0f76f065768b8f896ce47a3089fb438d"><td class="memSeparator" colspan="2">&#160;</td></tr>
     36 <tr class="memitem:a0aff284eb9ab311d81f20955258798cf"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_native_activity.html#a0aff284eb9ab311d81f20955258798cf">obbPath</a></td></tr>
     37 <tr class="separator:a0aff284eb9ab311d81f20955258798cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
     38 </table>
     39 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
     40 <div class="textblock"><p>This structure defines the native side of an android.app.NativeActivity. It is created by the framework, and handed to the application's native code as it is being launched. </p>
     41 </div><h2 class="groupheader">Field Documentation</h2>
     42 <a class="anchor" id="a0f76f065768b8f896ce47a3089fb438d"></a>
     43 <div class="memitem">
     44 <div class="memproto">
     45       <table class="memname">
     46         <tr>
     47           <td class="memname"><a class="el" href="group___asset.html#ga90c459935e76acf809b9ec90d1872771">AAssetManager</a>* assetManager</td>
     48         </tr>
     49       </table>
     50 </div><div class="memdoc">
     51 <p>Pointer to the Asset Manager instance for the application. The application uses this to access binary assets bundled inside its own .apk file. </p>
     52 
     53 </div>
     54 </div>
     55 <a class="anchor" id="af96995a13e77baf0d71c37d20c79ad51"></a>
     56 <div class="memitem">
     57 <div class="memproto">
     58       <table class="memname">
     59         <tr>
     60           <td class="memname">struct <a class="el" href="struct_a_native_activity_callbacks.html">ANativeActivityCallbacks</a>* callbacks</td>
     61         </tr>
     62       </table>
     63 </div><div class="memdoc">
     64 <p>Pointer to the callback function table of the native application. You can set the functions here to your own callbacks. The callbacks pointer itself here should not be changed; it is allocated and managed for you by the framework. </p>
     65 
     66 </div>
     67 </div>
     68 <a class="anchor" id="ab10b01c3c23c4ddb9d2ddadd71b03c94"></a>
     69 <div class="memitem">
     70 <div class="memproto">
     71       <table class="memname">
     72         <tr>
     73           <td class="memname">jobject clazz</td>
     74         </tr>
     75       </table>
     76 </div><div class="memdoc">
     77 <p>The NativeActivity object handle.</p>
     78 <p>IMPORTANT NOTE: This member is mis-named. It should really be named 'activity' instead of 'clazz', since it's a reference to the NativeActivity instance created by the system for you.</p>
     79 <p>We unfortunately cannot change this without breaking NDK source-compatibility. </p>
     80 
     81 </div>
     82 </div>
     83 <a class="anchor" id="ae6f0d0cd46e56b7e299b489cb60dd27e"></a>
     84 <div class="memitem">
     85 <div class="memproto">
     86       <table class="memname">
     87         <tr>
     88           <td class="memname">JNIEnv* env</td>
     89         </tr>
     90       </table>
     91 </div><div class="memdoc">
     92 <p>JNI context for the main thread of the app. Note that this field can ONLY be used from the main thread of the process; that is, the thread that calls into the <a class="el" href="struct_a_native_activity_callbacks.html">ANativeActivityCallbacks</a>. </p>
     93 
     94 </div>
     95 </div>
     96 <a class="anchor" id="a2a61553b2f660ea8b57fcc2b495e109f"></a>
     97 <div class="memitem">
     98 <div class="memproto">
     99       <table class="memname">
    100         <tr>
    101           <td class="memname">const char* externalDataPath</td>
    102         </tr>
    103       </table>
    104 </div><div class="memdoc">
    105 <p>Path to this application's external (removable/mountable) data directory. </p>
    106 
    107 </div>
    108 </div>
    109 <a class="anchor" id="ae1b90392cd257d16fd66a85bac1b08cd"></a>
    110 <div class="memitem">
    111 <div class="memproto">
    112       <table class="memname">
    113         <tr>
    114           <td class="memname">void* instance</td>
    115         </tr>
    116       </table>
    117 </div><div class="memdoc">
    118 <p>This is the native instance of the application. It is not used by the framework, but can be set by the application to its own instance state. </p>
    119 
    120 </div>
    121 </div>
    122 <a class="anchor" id="aa52947cdd1476b95e858d83c0f5b0220"></a>
    123 <div class="memitem">
    124 <div class="memproto">
    125       <table class="memname">
    126         <tr>
    127           <td class="memname">const char* internalDataPath</td>
    128         </tr>
    129       </table>
    130 </div><div class="memdoc">
    131 <p>Path to this application's internal data directory. </p>
    132 
    133 </div>
    134 </div>
    135 <a class="anchor" id="a0aff284eb9ab311d81f20955258798cf"></a>
    136 <div class="memitem">
    137 <div class="memproto">
    138       <table class="memname">
    139         <tr>
    140           <td class="memname">const char* obbPath</td>
    141         </tr>
    142       </table>
    143 </div><div class="memdoc">
    144 <p>Available starting with Honeycomb: path to the directory containing the application's OBB files (if any). If the app doesn't have any OBB files, this directory may not exist. </p>
    145 
    146 </div>
    147 </div>
    148 <a class="anchor" id="a40b4b64be7ecfac23751618313eb610d"></a>
    149 <div class="memitem">
    150 <div class="memproto">
    151       <table class="memname">
    152         <tr>
    153           <td class="memname">int32_t sdkVersion</td>
    154         </tr>
    155       </table>
    156 </div><div class="memdoc">
    157 <p>The platform's SDK version code. </p>
    158 
    159 </div>
    160 </div>
    161 <a class="anchor" id="a5e163c28566d4563eafeabd7dcab7eeb"></a>
    162 <div class="memitem">
    163 <div class="memproto">
    164       <table class="memname">
    165         <tr>
    166           <td class="memname">JavaVM* vm</td>
    167         </tr>
    168       </table>
    169 </div><div class="memdoc">
    170 <p>The global handle on the process's Java VM. </p>
    171 
    172 </div>
    173 </div>
    174 <hr/>The documentation for this struct was generated from the following file:<ul>
    175 <li><a class="el" href="native__activity_8h.html">native_activity.h</a></li>
    176 </ul>
    177 </div><!-- contents -->
    178