simple Java problem
<p>Example 1 - works</p>

<pre><code>public class MainScreen extends Activity implements OnClickListener {

    public void onClick(View v) {
        Button touchedButton = (Button) v;

        Test (MainScreen.this, touchedButton.getId());
         }

    public  void Test (MainScreen mainscreen, int touchedButton) {

    if (touchedButton == R.id.serviceButton )
    startService(new Intent(mainscreen, SimpleService.class));

    if (touchedButton == R.id.cancelButton)
    stopService(new Intent(mainscreen, SimpleService.class));
}
}
</code></pre>

<p>Example 2 – does not work</p>

<pre><code>public class MainScreen extends Activity implements OnClickListener {

    public void onClick(View v) {
        Button touchedButton = (Button) v;

        Secondary.Test (MainScreen.this, touchedButton.getId());
          }
}


public class Secondary  extends Activity {


public  void Test (MainScreen mainscreen, int touchedButton) {

    if (touchedButton == R.id.serviceButton )
    startService(new Intent(mainscreen,SimpleService.class));

    if (touchedButton == R.id.cancelButton)
    stopService(new Intent(mainscreen,SimpleService.class));
         }
}
</code></pre>

<p>Why does Example 2 not work?</p>
