title: How to call native activity from java activity?
body: <p>I know we can call an activity from another android activity as described in <a href="https://stackoverflow.com/questions/2794120/call-other-activities-in-an-activity">this</a> question. My question is can we call a native activity from android activity through an intent or by using any other way? If yes, how?</p>
  
  <p><code>Android.mk</code> file of my native activity is following and native activity code is building fine</p>
  
  <pre><code>LOCAL_PATH := $(call my-dir)
  include $(CLEAR_VARS)
  LOCAL_MODULE    := mynativeactivity
  LOCAL_SRC_FILES := main.c
  LOCAL_LDLIBS    := -llog -landroid -lEGL -lGLESv1_CM
  LOCAL_STATIC_LIBRARIES := android_native_app_glue
  include $(BUILD_SHARED_LIBRARY)
  $(call import-module,android/native_app_glue)
  </code></pre>
  
  <p>I am using this piece of xml to include my native activity in <code>AndroidManifest.Xml</code> file. And I think I am making a mistake here.</p>
  
  <pre><code> //...rest of the xml including my main java activity here
    &lt;activity android:name="android.app.NativeActivity" android:label="mynativeactivity" &gt;
              &lt;meta-data android:name="android.app.mynativeactivity"                  android:value="native-activity" /&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
  </code></pre>
  
  <p>Can anyone tell me how can I fix XML above so that in my first java based activity I can do something like this (if it is possible)</p>
  
  <pre><code> Intent intent = new Intent(this, mynativeactivity.class);
   startActivity(intent);
  </code></pre>
  
  <p>Currently I can't compile this code because compiler cannot locate <code>mynativeactivity</code></p>