Unwanted automated creation of new instances of an activity class
<p>I have an activity (called Sender) with the most basic UI, only a button that sends a message when clicked. In the onClickListener I only call this method:</p>

<pre><code>private void sendSMS(String msg)
    {
     PendingIntent pi = PendingIntent.getActivity(this, 0, 
      new Intent(this, Sender.class), 0);
     PendingIntent pi = PendingIntent.getActivity(this, 0, myIntent, 0);
     SmsManager sms = SmsManager.getDefault();
     sms.sendTextMessage("1477", null, msg, pi, null);
    }
</code></pre>

<p>This works ok, the message is sent but every time a message is sent a new instance of Sender is started on top of the other. If I call sendSMS method three times, three new instances are started. I'm quite new to android so I need some help with this, I only want the same Sender to be on all the time</p>
