title: How to I can call a method from another activity with passing data?
body: <p>I have 2 activities.
  I start one, and at a point I start another one:</p>
  
  <pre><code> Intent enabler = new Intent(this, cprompt.class);
          startActivity(enabler);
  </code></pre>
  
  <p>I want to call a method from the old one, but I want to pass some data too.</p>
  
  <p>This is how I tried: </p>
  
  <pre><code>Activity1.sendcommand(DATA);
  </code></pre>
  
  <p>And I got this: </p>
  
  <pre><code>Cannot make a static reference to the non-static method sendcommand(String) from the type Activity1
  </code></pre>
  
  <p>And I don't want change the method to static.
  The only way if I make a Listener? If I have to, you can describe for me to how?</p>
  
  <p>The java is new for me... :/ But if this problem is solved I think I am done with my program :)</p>