I have a problem with my alarm manager.
I want execute my code every 2 minutes so i made an alarm like this :
AlarmManager manager = (AlarmManager)getSystemService(Context.ALARM_SERVICE);
Calendar calendar = Calendar.getInstance();
manager.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), 120000, pendingIntent);
But when i test this, my pendingIntent is executed every minutes.
If i start the application at 15:05:30 the first start of my pending intent is at : 15:06:00 and after every minutes.
I want to start when i start the application and after every 2 minutes.
Thx for your answers :)