title: Is it possible to call nested native functions in android?
body: <p>So I have a c++ class which has a lot of functions and they are nested calls within each function(Look at the sample below).  </p>
  
  <pre><code> void function1(){
  
        function2();
        function3();
  
   }
  
   void function2(){
  
        //Some implementation of function 2 here
  
   }
  
  
   void function2(){
  
        //Some implementation of function 3 here
  
   }
  </code></pre>
  
  <p>I now want to write a JNI wrapper to call function1, my question is whether I will have to write JNI wrappers for all the 3 functions or would it be enough if I write JNI for function1? </p>
  
  <p>Also, if I do have to write JNI wrappers for all the functions, is there anyway the function1 can call function2 &amp; function3 ? Because after modifying the name of the functions according to JNI, how do I call them?</p>
  
  <p>Example of my JNI :</p>
  
  <pre><code>    JNIEXPORT void JNICALL Java_com_example_MainActivity_function1(){
  
                //How do I call other functions here?
      }
  </code></pre>
  
  <p>Any pointers would be appreciated.</p>
  
  <p>Edit :  </p>
  
  <p>C++ class as requested :</p>
  
  <pre><code> void Controller::initialize(InitData Data)
   {
  // Create all managers
  
  Log.d("Log","came in logd");
  readConfig(Data);
  createManagers();
  
  // Create UserInterface
  
  createUserInterface();
  
  // Initialize all managers
  
  initializeManagers(); 
  
  // Initialize all modules
  
  initializeModules(Data);
  
  // Initialize loggers
  
  
  
    m_sessionModule-&gt;waitForSessionResponse();
  
   }
  </code></pre>
  
  <p>The rest of the functions being called are defined in the same class</p>