Unregistering alarm in Android Studio

I’m writing a code in order to schedule some alarms in Android, the point is, i needed to define a class in order to be able to do so (i need to define and cancel alarms from different services) in this class, everything is initialized like this from the main activity (every variable is defined in the head of the code):

public MyAlarmManager(Context context){
    alarmManager = (AlarmManager)

    Intent intentDayRep = new Intent(context, WeakingActivity.class);
    Intent intentNightRep = new Intent(context, HeartService.class);
    Intent intentDayStart = new Intent(context, AlarmDayService.class);
    Intent intentNightStart = new Intent(context, AlarmNightService.class);
    Intent intentNextDay = new Intent(context, SetUpService.class);

    pendingIntentDayRep =       PendingIntent.getActivity(context, 0, intentDayRep, PendingIntent.FLAG_UPDATE_CURRENT);
    pendingIntentNightRep =     PendingIntent.getService(context, 1, intentNightRep, PendingIntent.FLAG_UPDATE_CURRENT);
    pendingIntentDayStart =     PendingIntent.getService(context, 2, intentDayStart, PendingIntent.FLAG_UPDATE_CURRENT);
    pendingIntentNightStart =   PendingIntent.getService(context, 3, intentNightStart, PendingIntent.FLAG_UPDATE_CURRENT);
    pendingIntentNextDay =      PendingIntent.getService(context, 4, intentNextDay, PendingIntent.FLAG_UPDATE_CURRENT);

Now, this class is instantiated from the main activity, with it’s context, visible to every other class (services or activities)In this class i register the various alarm in different methods (but i never change the pending intents), for example (i’ve 5 of them):

public void setRepeatingNight(){

    Integer delta = nightRate*1000*60;
    alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, SystemClock.elapsedRealtime() + delta,
            delta, pendingIntentNightRep);

now, this method is called at some point during the execution and it works just fine (if i run adb shell dumpsys alarm i can see the allarm is there and i can also see it trigger)

Now, in order to cancel my alarms i have this method:

    public void clear()
    if(pendingIntentDayRep!=null) {
    if(pendingIntentNightRep!=null) {
    if(pendingIntentDayStart!=null) {
    if(pendingIntentNightStart!=null) {
    if(pendingIntentNextDay!=null) {

That execute flawlessly but without cancelling neither the pending intent or the corresponding alarm (Again, the pending intent wasn’t touched at all, they’re re-designed after the .clear() method with a .set() method in order to be able to register new alarms after deleting the old ones….that don’t get deleted)
What am I doing wrong ?