title: Java/Android Call method from string WITH Value
body: <p>Say I have a method that I wish to call which has an argument of a string</p>
  
  <p>To call, I would do something like this..
  myFunction(stringValue);</p>
  
  <p>NOW, how would i make that same call, but dynamically if I had a string with the value of 'myFunction'..</p>
  
  <p>something like</p>
  
  <pre><code>method = [convert "myFunction" string to method];
  method.invoke(stringValue);
  </code></pre>
  
  <hr>
  
  <p>I am currently trying something like</p>
  
  <p>java.lang.reflect.Method method;    </p>
  
  <pre><code>method = Class.forName("com.blah.MyActivity").getMethod('myFunction',String.class);
  method.invoke (stringValue);
  </code></pre>
  
  <p>but getting the error
  <em>IllegalArgumentException
  Message expected receiver of type com.blah.MyActivity, but got java.lang.String</em></p>