Android AlarmManager effect immediately, why?
<p>I'm learning to use AlarmManager in Android. I was looking for example in google and I found <a href="http://stackoverflow.com/questions/4459058/alarm-manager-example">stackoverflow.com</a>
I have a class </p>

<pre><code>public class Alarm extends BroadcastReceiver 
{    
     @Override
     public void onReceive(Context context, Intent intent) 
     {   
         PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
         PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "TESTTEST");
         wl.acquire();

         // Put here YOUR code.
         Toast.makeText(context, "Alarm !!!!!!!!!!", Toast.LENGTH_LONG).show(); // For example

         wl.release();
     }

 public void SetAlarm(Context context)
 {
     AlarmManager am=(AlarmManager)context.getSystemService(Context.ALARM_SERVICE);
     Intent i = new Intent(context, Alarm.class);
     PendingIntent pi = PendingIntent.getBroadcast(context, 0, i, 0);
     am.set(AlarmManager.RTC, 1000 * 10 , pi); // Millisec * Second * Minute    
 }

 public void CancelAlarm(Context context)
 {
     Intent intent = new Intent(context, Alarm.class);
     PendingIntent sender = PendingIntent.getBroadcast(context, 0, intent, 0);
     AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
     alarmManager.cancel(sender);
 }
}
</code></pre>

<p>And my activity</p>

<pre><code>protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        alarm = new Alarm();
        alarm.SetAlarm(getApplicationContext());


    }
</code></pre>

<p>I get this exapmle code from other post on stackoverflow.com
Why Toask ALARM!!! shows immediately ???</p>
