title: How to access function or method from another module in android studio?
body: <p>I'm using Embeddinator-4000 and Xamarin to code in Visual C# and pass to Android Studio. I want to make a simple program. 
  <a href="https://github.com/mono/Embeddinator-4000" rel="nofollow noreferrer">https://github.com/mono/Embeddinator-4000</a>
  I followed the tutorial here to import aar file into android studio. </p>
  
  <p>In Visual Studio Xamarin:
  I had implement the codes of</p>
  
  <pre><code>namespace CalculatorLibrary
  {
  [Activity(Label = "CalculatorActivity")]
  public class CalculatorActivity : Activity
  {
      protected override void OnCreate(Bundle savedInstanceState)
      {
          base.OnCreate(savedInstanceState);
  
          //SetContentView(Resource.Layout.layout1);
      }       
      public double Add(double num1, double num2)
      {
          double sum;
          sum = num1 + num2;
          return sum;
      }
  }
  }
  </code></pre>
  
  <p>I had an output of aar file then I import into my android studio. I want to call my Add function in android studio.</p>
  
  <pre><code>import android.content.Intent;
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.Button;
  import android.widget.EditText;
  import android.widget.TextView;
  
  import calculatorlibrary.*;
   import md54223a39312377e7a37c3fe640756f5f0.CalculatorActivity;
  
  public class MainActivity extends AppCompatActivity {
  
  Button addButton;
  EditText num1text, num2text;
  TextView result;
  String num1string, num2string;
  double num1, num2, ans;
  CalculatorActivity cal = new CalculatorActivity();
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      addButton = findViewById(R.id.addbutton);
      num1text = findViewById(R.id.num1editText);
      num2text = findViewById(R.id.num2editText);
      result = findViewById(R.id.resulttextView);
  
  }
  
  @Override
  protected void onResume()
  {
      super.onResume();
  
      //Intent intent = new Intent(this, CalculatorActivity.class);
      //startActivity(intent);
  
      addButton.setOnClickListener(new View.OnClickListener(){
  
          @Override
          public void onClick(View view) {
              num1string = num1text.getText().toString();
              num2string = num2text.getText().toString();
              num1 = Double.parseDouble(num1string);
              num2 = Double.parseDouble(num2string);
  
              cal.Add(num1,num2); //I want to call this, but it can't find the Add() function.
              //ans = Add(num1, num2);
              //result.setText(Double.toString(ans));
          }
      });
  }
  </code></pre>