How to call a private method of a class in different package
<p>There is a BookView.class that has a private method defined as below </p>

<pre><code>  public class BookView{
    private boolean importBook(String epubBookPath){
    //The function that adds books to database.
    }
  }
</code></pre>

<p>I am trying to call this function from a different package. My code is</p>

<pre><code>    protected void onPostExecute(String file_url) {
        // dismiss the dialog after the file was downloaded
        dismissDialog(progress_bar_type);

        /*Now we add the book information to the sqlite file.*/
        TextView textView=(TextView)findViewById(R.id.textView1);
        String filename = textView.getText().toString();
        String baseDir = Environment.getExternalStorageDirectory().getAbsolutePath();
        String epubBookPath = baseDir+filename;
        Log.i("epubBookPath:",epubBookPath); //No errors till here!

        try {
            Method m=BookView.class.getDeclaredMethod("importBook");
            m.setAccessible(true);//Abracadabra 
            //I need help from here! How do i pass the epubBookPath to the private importBook method.
        } catch (NoSuchMethodException e) {

            e.printStackTrace();
        }
        Intent in = new Intent(getApplicationContext(),
                CallEPubUIActivity.class);        
        startActivity(in);
    }
</code></pre>

<p>EDIT:</p>

<p>I found another public method in the jar file which is doing the above work.</p>

<pre><code>  public void jsImportBook(String epubBookPath) {
     if (!BookView.this.importBook(epubBookPath))
     return;
   BookView.this.createBookshelf();
  }
</code></pre>
